Download MetaTrader 5

How do I calculate lot size? - page 3

To add comments, please log in or register
Alain Helstroffer
45
Alain Helstroffer 2014.08.24 20:29  
chaffinsjc:

Let's say my mini account has margin of $10,000, and I want to risk 2% on the next trade (that is, simply use $200 to buy <some amount> of contracts).

[I realize this is a limited view of "risk". I'm not interested in stopLoss pips, or profit targets, or whatever.]

Using MetaTrader, I get the following mini account information from my broker:

accountLeverage = AccountLeverage(); // value = 200
modeLotSize = MarketInfo("EURUSDm", MODE_LOTSIZE); // value = 10000
modeLotStep = MarketInfo("EURUSDm", MODE_LOTSTEP); // value = .01
modeMinLot = MarketInfo("EURUSDm", MODE_MINLOT) ); // value = .01

QUESTION: How do I calculate the lot size for $200? (It would be useful to know the cost of a minimum size lot. In this case, the minimum size lot is .01).

QUESTION: Is the lot size calculation formula the same for all currency pairs?

Thank you very much in advance.


I send to you a good lot size calculator based on the equity and not on the balance. It's better if ou have more one trade.

Alain Helstroffer
45
Alain Helstroffer 2014.08.24 20:32  
I send to you my lot size calc. It's based on equity and not on Balance. It's better if you use more thant 1 trade together.
Files:
ffoorr
1046
ffoorr 2014.08.25 06:59  

In the documentation :

MODE_TICKVALUE

16

Tick value in the deposit currency

MODE_TICKSIZE

17

Tick size in points


For my five digit broker : mode_tickvalue = 1; mode_ticksize = 0.00001

So why every body give this line : 

   double pipValue = MarketInfo(Symbol(),MODE_TICKVALUE);
 if (Digits==3 || Digits==5) pipValue *= 10;

Aint this wrong ?

ffoorr
1046
ffoorr 2014.08.25 07:13  

This is wrong, missworded (?)

double pipValue = MarketInfo(Symbol(),MODE_TICKVALUE);
 if (Digits==3 || Digits==5) pipValue *= 10;

It should be : if Digits == 5 AND if you work in Pips, then  ....

if (Digits==3 || Digits==5) pipValue *= 10;

if someone work in Point, someone don't care about Pips.

Keith Watford
Moderator
9642
Keith Watford 2014.08.25 07:35  
ffoorr:

In the documentation :

MODE_TICKVALUE

16

Tick value in the deposit currency

MODE_TICKSIZE

17

Tick size in points


For my five digit broker : mode_tickvalue = 1; mode_ticksize = 0.00001

So why every body give this line : 

Aint this wrong ?

   double pipValue = MarketInfo(Symbol(),MODE_TICKVALUE);
 if (Digits==3 || Digits==5) pipValue *= 10;

 

 That is just for when people input values as pips. Point is not usually equal to 1 pip.
whroeder1
14765
whroeder1 2014.08.25 13:25  
ffoorr:  Aint this wrong ?

There is Tick, PIP, and Point. They are all different in general. A tick is the smallest change of price. A Point is the least significant digit quoted. In currencies a pip is defined as 0.0001 (or for JPY 0.01)

On a 4 digit broker a point (0.0001) = pip (0.0001). [JPY 0.01 == 0.01] On a 5 digit broker a point (0.00001) = 1/10 pip (0.00010/10). Just because you quote an extra digit doesn't change the value of a pip. (0.0001 == 0.00010) EA's must adjust pips to points (for mq4.) In currencies a tick is a point. Price can change by least significant digit (1.23456 -> 1.23457)

In metals a Tick is still the smallest change but is larger than a point. If price can change from 123.25 to 123.50, you have a TickSize of 0.25 and a point of 0.01. Pip has no meaning.

This is why you don't use TickValue by itself. Only as a ratio with TickSize. See DeltaValuePerLot()

123
To add comments, please log in or register