If I read you correctly, you don't need the divide/10, which would give you 1 lot in your example.
On a micro (or is it nano?) account, working backwards from your equation: 1 lot x $1/pip x 10pips = $10
If I read you correctly, you don't need the divide/10, which would give you 1 lot in your example.
On a micro (or is it nano?) account, working backwards from your equation: 1 lot x $1/pip x 10pips = $10
Hi there blogzr3,
Thanks for the answer. Actually, I put in there the divide/10 because at MIG if I open 0.1 lots, then I have 1$ per pip, but if I open with 1 lots, I got $10/pip. With MIG, the minimum lots I can open a trade with is 0.1, and thus this should be the base unit of the calculation...
This means (for me) that if for 1 pip the dollar value is $1, then for 10 pip profit will be $10, so in this case the lot should be 0.1 when opening the trade, and not 1 lot, as the equation suggests. 1 lot is exactly 10 times bigger than 0.1 lot, so if I open a trade with 1 lot and make 10 pip move, I will get $100 and not $10... So something is obviously wrong. I figured if I divide the result by 10, I will get the correct value. But this is not the case. Let's take the following example.
Lots=(Pr/(D/Ps))/10
Currency Pair=EUR/USD
Pr=$100
D=10
Ps=$1
...
then
Lots=(100/(10/1))/10=1 -- which is correct. If I were to repeat this for various Pr values, I would still get correct results... So the equation is fine for EUR/USD... However:
Currency Pair=EUR/GBP
Pr=$100
D=10
Ps=$1.64
...
then
Lots=(100/(10/1.64))/10=1.64 -- Is this still correct? If it is, then I have no problem... But for me this feels a little off... Here's why:
You see if the EUR/GBP needs 1 lot to open to reach $100 in 10 pips, then why does EUR/GBP, with supposedly higher pip value, need to open bigger (1.64) lots to reach the same goal in the same distance?
For me this doesn't make any sense, and thus I think the calculation is completely wrong... But if this is not the way to count it, then what is? :-)
Thanks much!
Hi there blogzr3,
Thanks for the answer. Actually, I put in there the divide/10 because at MIG if I open 0.1 lots, then I have 1$ per pip, but if I open with 1 lots, I got $10/pip. With MIG, the minimum lots I can open a trade with is 0.1, and thus this should be the base unit of the calculation...
This means (for me) that if for 1 pip the dollar value is $1, then for 10 pip profit will be $10, so in this case the lot should be 0.1 when opening the trade, and not 1 lot, as the equation suggests. 1 lot is exactly 10 times bigger than 0.1 lot, so if I open a trade with 1 lot and make 10 pip move, I will get $100 and not $10... So something is obviously wrong. I figured if I divide the result by 10, I will get the correct value. But this is not the case. Let's take the following example.
Lots=(Pr/(D/Ps))/10
Currency Pair=EUR/USD
Pr=$100
D=10
Ps=$1
...
then
Lots=(100/(10/1))/10=1 -- which is correct. If I were to repeat this for various Pr values, I would still get correct results... So the equation is fine for EUR/USD... However:
Currency Pair=EUR/GBP
Pr=$100
D=10
Ps=$1.64
...
then
Lots=(100/(10/1.64))/10=1.64 -- Is this still correct? If it is, then I have no problem... But for me this feels a little off... Here's why:
You see if the EUR/GBP needs 1 lot to open to reach $100 in 10 pips, then why does EUR/GBP, with supposedly higher pip value, need to open bigger (1.64) lots to reach the same goal in the same distance?
For me this doesn't make any sense, and thus I think the calculation is completely wrong... But if this is not the way to count it, then what is? :-)
Thanks much!
Your formula simplifies to:
(Pr*Ps)/(D*10)
However, I think you will get the result you want by changing it to:
Pr/(D*Ps*10)
In my opinion, a better way would be to use MarketInfo(Symbol(),MODE_TICKVALUE). This will preclude the need for you to individually calculate Ps for every combination of pair and deposit currency.
In this case your formulae would become:
(Pr*Tv)/1000
Let me know what you think.
CB
Your formula simplifies to:
(Pr*Ps)/(D*10)
However, I think you will get the result you want by changing it to:
Pr/(D*Ps*10)
In my opinion, a better way would be to use MarketInfo(Symbol(),MODE_TICKVALUE). This will preclude the need for you to individually calculate Ps for every combination of pair and deposit currency.
In this case your formulae would become:
(Pr*Tv)/1000
Let me know what you think.
CB
So simple... This could work for me. Thank you very much! Let me implement this and test for a while...
So simple... This could work for me. Thank you very much! Let me implement this and test for a while...
Dear cloudbreaker,
Based on your clues I came up with the following formula which seems to be perfect for my needs:
L=(PR/I)/Pv
...where:
PR=Profit in base currency
I=Movement distance in pips
Pv=MarketInfo(Symbol(),MODE_TICKVALUE);
L=Lots to open the order with
So far in testing it works like a charm, and gives expected results for L. Of course, L has to be rounded up or down to 1 decimal places to be compatible with broker.
Thank you for putting me onto the right track!!
Hi,
Im trying to get the lot size for a new order using the the previous profits from the orders that i just closed and a fixed take profit.
Im using the following in mql4:
ThisLot = NormalizeDouble(((MathAbs(EPTotalSellProfit)*(MarketInfo(Symbol(), MODE_TICKVALUE) / MarketInfo(Symbol(), MODE_TICKSIZE) ))/1000),LotDigits) * pipMultiplier* EPLotFactor;
Where:
EP total sell profit is: for (int e = OrdersTotal()-1; e >= 0 ; e--) { if ( OrderSelect(e,SELECT_BY_POS, MODE_TRADES) && OrderSymbol()==Symbol() && (OrderMagicNumber()==Magic ) ){ if(OrderType()==OP_SELL){ EPTotalSellProfit = OrderProfit() + OrderCommission() + OrderSwap() + EPTotalSellProfit; OrderClose(OrderTicket(),OrderLots(),Ask,SLIPPAGE(),White); } } }
PipMultiplier is:
if (Digits==3 || Digits==5) pipMultiplier = 10; else pipMultiplier = 1;
And lot factor is an number of my choice...
What is wrong in this calculation ?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm sure the fault is with me, but I was searching for the answer to this - seemingly simple - question for some days now and I still don't get it. I thought maybe you could show me a solution:
Let's assume we want to open a single trade position. Given are the following parameters (important for this calculation):
This will be a Long position...
Pr=Profit target dollar size to be reached
Ps=Pip dollar size
Tp=Take Profit level
Op=Open level (essentially the opening price level)
D=(Tp-Op)/Point //The pip distance between Op and Tp
I want to take these parameters and calculate what must be the size of the lot to open the trade with.
I was experimenting with the following equation, but I'm not sure this is correct:
Lots=(Pr/(D/Ps))/10
Assuming that at 0.1 Lots, the EUR/USD pip dollar size is $1/pip, this seems to be correct:
Currency Pair=EUR/USD
Pr=$10
D=10
Ps=$1
...then
Lots=(10/(10/1))/10=0.1
And indeed, 0.1 Lots have to be there when opening a trade. But I still think that this way of counting is incorrect and it's luck only that seems to work on EUR/USD... Could you show me a correct way to do this which is good for all currency pairs?
Thank you!