I can't find the thread, sorry. Could someone help?
-
I remember an old thread in which there is the solution I'm looking for, but I can't find it.
I need the formula used to calculate the lot size to be used on any trade with a fixed TP. What I mean is:I want to get 100 USD per trade but I will use different TP distances depending on market conditions. SL will be used at a fixed distance different from that of TP. What formula can be used to find the lot sixe required to achieve that money target for that specific TP distance?
Thanks in advance.
-
@l-andorrà Hello,
This link may help you. It contains the information and formulas. All you need to do is shift things around.
-
@q8carpenter Thank you for the help, but that info I already had. What I need is the 'translation' into fxDreema blocks.

-
@l-andorrà
This is the formula for currencies with USD base keeping in mind that I have removed the pip size rules from the settings:
0.001 = 0.01
0.00001 = 0.0001
0.000001 = 0.0001
-
You can make the TP and SL as a variables based on the ATR indicator. I used to do that with a custom indicator called nononsenseforex ATR.
-
@username100 Thank you for the suggestion, but I prefer not to use that indicator because it could interfere other calculations within the EA.
-
@q8carpenter Not sure I fully understand. Let me use this example. I want to get the lot size necessary to achieve 50 USD with a TP distance of 120 pips. If I understand your formula correctly, 'money_tp' would be 50 and 'vol' is exactly what I'm looking for. How can the calculation be executed?
-
@l-andorrà 50/120 = 0.41 lots
Now you will need to test one thing though:
The 120 in the above formula is either pips or pipettes. (0.0001 or 0.00001) and I'm not next to my pc at the moment to do a quick test.
The other thing is that this will work with the EURUSD but I'm not sure if its the same on other currencies. -
@l-andorrà said in I can't find the thread, sorry. Could someone help?:
I remember an old thread in which there is the solution I'm looking for, but I can't find it.
I need the formula used to calculate the lot size to be used on any trade with a fixed TP. What I mean is:I want to get 100 USD per trade but I will use different TP distances depending on market conditions. SL will be used at a fixed distance different from that of TP. What formula can be used to find the lot sixe required to achieve that money target for that specific TP distance?
Thanks in advance.
I suggest you use the "check profit (unrealised)" blue box then select the option which says profit money (total sum). This way, irrespective of the SL, lot size or TP, the Bot will be on the lookout for when the profit is 100USD.
-
@q8carpenter Thank you for the example. I got the isea. However, I want some formula to be used on every symbol, not only for EURUSD. Isn't there any way to make the equivalent value for any other one?
-
@didymario7 Thank you for your help, but I do need to include the TP distance in the equation.
-
0 pip stop loss = no stop loss
You can simply use 0.1 pips or -0.1 (i.e. SL with a small profit) so that stop loss will move instead of disappearing. -
@l-andorrà
If Im right the "price mouvements - profit" relation is detailed as follows :
revenu(profit) = price change * contract size * lot size * leverage
100 = x * 100.000 * 0.1 * 10
100=x*100.000
x=100/100.000
x=0.001
For EURUSD x=10 pips -
@seb-0 Thank you but what I need is lot size, not pips distance. I already have the distance for TP to be considered. What I need is the required lot size to get a specific amount of money for that TP distance.
-
@l-andorrà
Then you just need to replace the lot size by the x in the equation :-100(usd) = 0.001(price) * 100 000(contract) * x(lots) * 10(leverage)
-100 / (0.001 * 100 000 * 10) = x ..........So the lot size needed is : profit / (price * contract * leverage)
-0.1 = x