- e.g. - trading lot in settings = 0, EA cannot open a trade because lot = 0 .
- Limitation on the spread in the Expert Advisor, does not open positions.
- There really are no signals to open positions in the testing period.
And the checks only you see, your code is not attached.
Examples by the thousands....
- e.g. - trading lot in settings = 0, EA cannot open a trade because lot = 0 .
- Limitation on the spread in the Expert Advisor, does not open positions.
- There really are no signals to open positions in the testing period.
And the checks only you see, your code is not attached.
Examples by the thousands....
- e.g. - trading lot in settings = 0, EA cannot open a trade because lot = 0 .
- Limitation on the spread in the Expert Advisor, does not open positions.
- There really are no signals to open positions in the testing period.
And the checks only you see, your code is not attached.
Examples by the thousands....
Lot validation is there, signals are definitely there - it's a netminder, no spread limitations...
well then there are 100500 more options.
the nettler is quietly passing the market test.
well then there are 100500 more options.
the nettler is quietly passing the market test.
I agree, but for some reason not this one:)
It is forbidden to discuss bots from the marketplace here. And you won't be posting it in the public domain. And there are already 100500 topics with that name, as well as the reasons for such a topic.
Can anyone explain why the market returns this error? All the checks in the EA are in place...
I understand the gist of course - no trades, but for what reason?
Is it so hard to use site search and create 100500 branch copy!
https://www.mql5.com/ru/search#!keyword=no%20trading%20operations&method=2&module=mql5_module_forum
- www.mql5.com
Just want to discuss the code:
double CheckVolumeValue(double volume) { double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN); if(volume<min_volume) { Print("Volume is less than the minimum"); return(min_volume); } double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX); if(volume>max_volume) { Print("Volume is greater than the maximum"); return(max_volume); } double volume_step=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_STEP); int ratio=(int)MathRound(volume/volume_step); if(MathAbs(ratio*volume_step-volume)>0.0000001) { Print("Wrong lot size"); return(min_volume); } if(volume<MarketInfo(Symbol(),MODE_MINLOT)) { Print("Trade stop invalid lot size"); Comment("Trade stop invalid lot size"); return(MarketInfo(Symbol(),MODE_MINLOT)); } return(volume); }
I've tweaked the standard check to return the correct lot instead of an error...
Here we call this function:
if(!OrderSend(Symbol(),cmd,CheckVolumeValue(Lot),NormalizeDouble(priceStep,Digits()),Slippage,0,0,"",magic,0))
In my tester and on my real account this robot works fine! Even when an incorrect lot is entered, it still returns the correct one and works further...
And you know where the 4051 error comes back! This is in general...!
Just want to discuss the code:
I've tweaked the standard check to return the correct lot instead of an error...
Here we call this function:
In my tester and on my real account this robot works fine! Even when an incorrect lot is entered, it still returns the correct one and works further...
And you know where the 4051 error comes back! This is in general...!
Just want to discuss the code:
I've tweaked the standard check to return the correct lot instead of an error...
Here we call this function:
In my tester and on my real account this robot works fine! Even when an incorrect lot is entered, it still returns the correct one and works further...
And you know where the 4051 error comes back! This is in general...!
double CheckVolumeValue(double volume) { double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN); if(volume<min_volume) { Print("Volume is less than the minimum"); return(min_volume); } double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX); if(volume>max_volume) { Print("Volume is greater than the maximum"); return(max_volume); } double volume_step=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_STEP); int ratio=(int)MathRound(volume/volume_step); if(MathAbs(ratio*volume_step-volume)>0.0000001) { Print("Wrong lot size"); return(min_volume); } if(volume<MarketInfo(Symbol(),MODE_MINLOT)) { Print("Trade stop invalid lot size"); Comment("Trade stop invalid lot size"); return(MarketInfo(Symbol(),MODE_MINLOT)); } return(volume); }And it will never get to this point
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can anyone explain why the market returns this error? All the checks in the EA are in place...
I understand the gist of course - there are no trades, but what is the reason?