I wonder if someone has encountered the same issue I'm currently battling (see topic).
Should not this code suffice as to delete orders pending? Have not tried it LIVE, I'm talking back test. Still, I believe this code should do it;
Ticket = OrderSend(Symbol(), OP_BUYLIMIT, 1, Ask - (Point * 50), 3, 0, Ask - (50 * Point), "Sell(#" + MagicNumber + ")", MagicNumber, TimeCurrent()+7200, DeepPink);
Can someone please feedback this? Going mad trying to solve it :)
Expirations are denied by broker
Thank you for responding.
I edited the code to:
Ticket = OrderSend(Symbol(), OP_SELLLIMIT, 1, Bid + (Point * 50), 3, 0, 0, "Sell(#" + MagicNumber + ")", MagicNumber, TimeCurrent()+3600, DeepPink);
I also asked broker, no limits for such order apply. When placed "live" on paper trading account it auto-sets the expiry to 1 week. This is very odd considering OANDA claims no limit is in effect.
Any other thoughts given the above?
Attached whole EA also
Thank you very much for taking the time :)
//| This MQL is generated by Expert Advisor Builder |
double bid = MarketInfo("EURUSD", MODE_BID);
double ask = MarketInfo("EURUSD", MODE_ASK);
I'm pretty sure you are misreading my intentions. I wan't to learn how to code and there for I am in the process of doing just that. Both the spreadfilter and the "noorderinlasthour" functions are written by me, as is a lot of the EA even if the total structure is EA builder, as a foundation. Sorry if I offended you in any way.
To add comments, please log in or register