
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
That's the way to do it!!!
// сначала то что чаще всего встречается
v = NormalizeDouble(v, 3);
if(v < MarketInfo(symbol, MODE_MINLOT)) v = MarketInfo(symbol, MODE_MINLOT);
// затем рассчитать знаки после запятой для объема, которого не может быть но они фсе равно проверяют
string volume_min = (string) SymbolInfoDouble(symbol, SYMBOL_VOLUME_MIN);
int volume_digits = 0;
int pos = StringFind(volume_min, ".", 0);
if(pos > 0){
volume_min = StringSubstr(volume_min, pos+1, StringLen(volume_min)-pos);
volume_digits = StringLen(volume_min);
v = NormalizeDouble(v, volume_digits);
}
Your lotDigit is a tricky fool that always calculates 0. This is not in the example in the documentation. Apparently you like a lot of brackets?
Also this: FreeMg*Risk/100/Margin/Step... Where did 100 come from? Obviously from the ceiling.
That's a lot of strings. It's really a lot, but what are you calculating?
There it is.
http://mql4you.ru/mql-school/yazyk-mql-urok-3.html
Also this: FreeMg*Risk/100/Margin/Step... Where does 100 come from? Clearly from the ceiling.
100 is a conversion from percent ;-). That is, Risk/100 gives a value between 0 and 1.
Ta e May. I don't use any risk, much less 100% (the lot has 100% ???) and pass the check.
Your lotDigit is a tricky fool that always calculates 0. This is not in the example in the documentation. Apparently you like a lot of brackets?
Also this: FreeMg*Risk/100/Margin/Step... Where did 100 come from? Obviously from the ceiling.
That's a lot of strings. It's really a lot, what do you calculate?
in this case lotDigit counts the number of digits for rounding, you can check - this tricky fool will always be greater than zero (if fractional lot is allowed)
...looks like you don't use fractional lots either.
in this case lotDigit counts the number of digits for rounding, you can check - this tricky fool will always be greater than zero (if fractional lot is allowed)
...it looks like you don't use fractional lots either