Error code is invalid stops.
hmmm...
I ran the Moving Averages Ea that comes with the Platform download on the ECN Server and it opens orders OK. I ran my Contest EA in the Strategy Tester and it also opens orders without errors. This is still a Mystery to me as to; Why this Contest EA will run OK on Contest Server and other Brokers' Servers (Demo & Live) OK, but has these Error 130 on this ECN Broker. Tomorrow, I will contact ECN Broker to discuss problem.
Other reason - market execution, in this case StopLoss and TakeProfit levels must be 0 for market opening.
Check Stoplevel - MarketInfo(Symbol(),MODE_STOPLEVEL)
Other reason - market execution, in this case StopLoss and TakeProfit levels must be 0 for market opening.
Rosh, thanks. sl & tp =0 and EA opens orders with no errors.
1. Any ideas for the reason an ECN Broker would set StopLevel to 0 and require sl & tp=0 for market opening ??
2. Is there a known minimum delay (Sleep()) value required by MT4 platform to execute OrderModify() immediately after OrderSend() ??
- 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 use this OrderSend() code in ATC2007 Contest EA, MetaQuotes Demo, FXDD Live & IBFX Demo without problems (no errors). I started a Demo with a Swiss ECN Broker and I get "Error opening Sell order: 130".
Does anyone have idea as to why ??