How to get position size before open a trade?
-
Hello
I would like to get the position (lots) size before a trade is opened when the EA is using any money management method.
If my EA is using a Money Manegement method, how can I get the volumen size calculated for the trade? Because I would like to use this value in some formula calculation. As an example, I want to risk a % of Free Margin Account to calculate the lots for the trade based on the SL (PIPS) but I prefer to have differents positions for the trade. So If the volumen size is 1.5 lots, I prefer 3 positions of 0.5 lots instead of just one in order to manage each one independently.
Is it possible? I just found this to get the volumen size of a position but when the trade is running.

Thanks
-
All MM methods are positioned right into the blocks who create new orders and the calculations of the lot size is made just before the order is created. The lot size that is calculated remains "inside the block".
And most of those MM methods read the latest lot size (of the last closed trade for example) to use it to calculate the next one. You want to separate that lot size into multiple orders, so basically you can't use those MM methods, they don't work for you.
But why do you want to make 3 orders instead of 1? Is it because you think that if you make something more complex, it could magically work better? Because I don't believe in that

-
Hi @fxDreema
Thanks for your response.
What I want is to build a system with a method similar to close a full position partially but avoiding the issues related to close partially orders in MT4/5. Well, maybe they are not big issues but are confusing for me. As an example, the one that if you close partially a position, a new trade is opened.
I have tested using the pink block "close (partially)" in my projects but I don't like (personal opinion) how it works in MT4/5.
The target is: if my project has multiple profit targets, I want multiple positions with a fraction volume of the lot size given by the MM method. One position for each profit level. In this way, I will be able to manage each position independently. Of course, it will be required more work for building the project but I am getting more familiar with the builder's logic and it is easy to build the condition for each position.
I am testing dividing the Risk% by the number of positions to be opened:
Risk(%) -> PartialRisk(%) = Risk(%)/positions
Each position will have a PartialRisk(%) inside its own block. Maybe it is not a polite way but it could be work.
I appreciate a lot your comments.
Regards
Jose
-
@fxDreema - I really wish there was a Risk % of Equity option that could be used in other blocks. I'm developing an EA and want to have an option for a "Signal Mode" so instead of trading it just alerts the user on what the details of the trade are, lot size included. This can be done using formulas but I'm using a price-based stop loss and not pip based so it just makes things so much more complicated than they need to be. You already have something that can calculate this, why isn't it available in other blocks?