You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
On some ECN type brokers the value might be zero (broker doesn't know.) Use a minimum of two (2) PIPs.
You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
On some ECN type brokers the value might be zero (broker doesn't know.) Use a minimum of two (2) PIPs.
Thanks for the answer.
I 've checked SYMBOL_TRADE_STOPS_LEVELS and SYMBOL_TRADE_FREEZE_LEVEL but something doesn't work.
i'am managing at same time take profit and stop loss, so maybe i did a mistake, but i cannot to find. I'am reviewing
"Doesn't work" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. 2004
When asking about code
There are no mind readers here and our crystal balls are cracked.
Thanks for your English corrections.
Fortunetely, my great experience as programmer is better than my English, and finaly i fixed it.
Thanks for your English corrections.
Fortunetely, my great experience as programmer is better than my English, and finaly i fixed it.
Hi!
May you please share where the error was?
Regards,
Alex
Search the forum on how to handle Freeze Level and Stops Level, just as William pointed in his post #3:
Forum on trading, automated trading systems and testing trading strategies
ERROR: Modification failed due to order or position being close to market
William Roeder, 2020.09.23 13:57
You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
Requirements and Limitations in Making Trades - Appendixes - MQL4 TutorialOn some ECN type brokers the value might be zero (broker doesn't know.) Use a minimum of two (2) PIPs.
Forum on trading, automated trading systems and testing trading strategies
HELP, failed cancel order [Invalid stops] problem!
Fernando Carreiro, 2022.02.08 14:35
Also read the following in detail ... The checks a trading robot must pass before publication in the Market
Especially these points:
Setting the TakeProfit and StopLoss levels within the SYMBOL_TRADE_STOPS_LEVEL minimum level Attempt to modify order or position within the SYMBOL_TRADE_FREEZE_LEVEL freeze level
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Morning
I'm traying to publish my EA, and after local testing, i don't find any error.
But when i update to market, verification process say:
test on EURUSD,H1 (netting) 2020.05.05 10:06:00 failed modify #6 sell 0.3 EURUSD sl: 1.09088, tp: 1.08857 -> sl: 1.09075, tp: 1.08857 [Modification failed due to order or position being close to market] strategy tester report 6 total trades
My EA checks all market recommendations as pending orders, incorrect volumes, minimus stops a Takeprofits.... So I have no idea because it doesn't work. Somebody can help me? some Ideas?
Thanks