
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.
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 ?
This is wrong, missworded (?)
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.
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 ?
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()
The problem is not fully defined. If you say you want to risk 2% then you have to fix one of the variables: the stop loss level or the trade volume. Since you're asking about calculating the lot size that means you don't want it fixed but that requires you to become interested in stop loss pips even though you say you're not. If you don't have a stop loss then risking 2% means taking a fixed lot size, e.g. 1.0, and waiting till your current losses reach 2% of the initial margin. You don't need to calculate the lot size here as you see.
Once stop loss level enters the view, the calculation is simple:
double tradeVolume = AccountFreeMargin() * Risk/100 / ( StopLossPoints * MarketInfo( Symbol(), MODE_TICKVALUE ) );
That is, given a stop loss level for any particular trade, you will always have the specified percentage of your initial margin lost if the stop loss is taken.
You will also want to normalize the resulting value by MODE_LOTSTEP and cap it with MODE_MINLOT and MODE_MAXLOT.
How Can I calculate all my opened order size in USD ?
General rules and best pratices of the Forum. - General - MQL5 programming forum
Makes no sense. How do I calculate my quart in USD?
Never risk more than a small percentage of your account, certainly less than 2% per trade, 6% total to the account. Risk depends on your initial stop loss, lot size, and the value of the pair. It does not depend on margin and leverage.MODE_TICKVALUE is not reliable on non-fx instruments with many brokers - MQL4 programming forum 2017.10.10
Is there an universal solution for Tick value? - Currency Pairs - General - MQL5 programming forum 2018.02.11
Lot value calculation off by a factor of 100 - MQL5 programming forum 2019.07.19
Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5 or 0.1 Lots maximum.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Makes no sense. How do I calculate my quart in USD?
Never risk more than a small percentage of your account, certainly less than 2% per trade, 6% total to the account. Risk depends on your initial stop loss, lot size, and the value of the pair. It does not depend on margin and leverage.MODE_TICKVALUE is not reliable on non-fx instruments with many brokers - MQL4 programming forum 2017.10.10
Is there an universal solution for Tick value? - Currency Pairs - General - MQL5 programming forum 2018.02.11
Lot value calculation off by a factor of 100 - MQL5 programming forum 2019.07.19
Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5 or 0.1 Lots maximum.
Im not talking about risk, I just want to know the amount in USD of Opened Orders.
Im not talking about risk, I just want to know the amount in USD of Opened Orders.