Just passed validation as it is. The only mod was to remove the CheckUserInput() from controlling trades. Demoted it to only give warnings. There must be a small bug in the auto validation.
Can u give us an example your code that pass? i'm very confused right now :(
if(OrdersTotal()>=(int)AccountInfoInteger(ACCOUNT_LIMIT_ORDERS))
{
Print("Limit for orders reached.");
result=1;
}
to
if(OrdersTotal()>(int)AccountInfoInteger(ACCOUNT_LIMIT_ORDERS))
{
Print("Limit for orders reached.");
result=1;
}
I have broken down the code to the very basics so it can be publicized. It returns the error shown with automatic validation. What could be the problem?
The code follows.
Hello,
the automatic validation working with 'Auto Trading' disabled.
So, try to change this code..
if(IsTradeAllowed()==false || IsConnected()==false || AccountInfoInteger(ACCOUNT_TRADE_EXPERT)==false)
with this one....
if(IsConnected()==false || AccountInfoInteger(ACCOUNT_TRADE_EXPERT)==false)
what is wrong with this validation test ?
I reduced my code so that almost nothing is left and I still get this "no trade operation" error
I even send the above code (with that corrections) and I get this error again !!!!
someone help please
what is wrong with this validation test ?
I reduced my code so that almost nothing is left and I still get this "no trade operation" error
I even send the above code (with that corrections) and I get this error again !!!!
someone help please
I found two threads in rus part of the forum: there are many pages there on those threads, but the general conclusion is the following: this error is related to the coding (minimal lot size checking, for every pair checking and more).
I can not help in coding because I am not a coder sorry.
----------------
I can not send EA for verification. Validation error: no trading operations. - the thread (rus language)
Tortured mistake there are no trading operations - - the thread (rus language)
Hello, i struggle with the same problem...
in my case, the solution was...
1. Check all volume in all orders with this function:
bool CheckVolumeValue(double volume) { //--- minimal allowed volume for trade operations double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN); if(volume<min_volume) { return(false); } //--- maximal allowed volume of trade operations double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX); if(volume>max_volume) { return(false); } //--- get minimal step of volume changing double volume_step=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_STEP); int ratio=(int)MathRound(volume/volume_step); if(MathAbs(ratio*volume_step-volume)>0.0000001) { return(false); } return(true); }
2. And optimized lots with this function:
double LotsOptimized() { double lot=LotFix; int orders=HistoryTotal(); // history orders total int losses=0; // number of losses orders without a break //--- select lot size lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,1); //--- calcuulate number of losses orders without a break if(DecreaseFactor>0) { for(int i=orders-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false) { Print("Error in history!"); break; } if(OrderSymbol()!=Symbol() || OrderType()>OP_SELL) continue; //--- if(OrderProfit()>0) break; if(OrderProfit()<0) losses++; } if(losses>1) lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,1); } //--- return lot size if(lot<0.1) lot=0.1; return(lot);

- 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 have broken down the code to the very basics so it can be publicized. It returns the error shown with automatic validation. What could be the problem?
The code follows.