Tran Thanh Tuyen:
I get this error on validation my product but it is running well on backtests.
Please help me!
double GetLotSize() { double minlot = MarketInfo(Symbol(), MODE_MINLOT); double maxlot = MarketInfo(Symbol(), MODE_MAXLOT); double leverage = AccountLeverage(); double lotsize = MarketInfo(Symbol(), MODE_LOTSIZE); double stoplevel = MarketInfo(Symbol(), MODE_STOPLEVEL); double MinLots = 0.01; double MaximalLots = 50.0; double lots = Lots; if(MM) { lots = NormalizeDouble(AccountFreeMargin() * Risk/100 / 1000.0, LotDigits); if(lots < minlot) lots = minlot; if (lots > MaximalLots) lots = MaximalLots; if (AccountFreeMargin() < Ask * lots * lotsize / leverage) { Print("We have no money. Lots = ", lots, " , Free Margin = ", AccountFreeMargin()); Comment("We have no money. Lots = ", lots, " , Free Margin = ", AccountFreeMargin()); } } else lots=NormalizeDouble(Lots, Digits); return(lots); }
Tran Thanh Tuyen:
else lots=NormalizeDouble(Lots, Digits);
Why do you nornalize Lots to Digits?
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
I get this error on validation my product but it is running well on backtests.
Please help me!