AFAIK, once the pending order has been sent to the server, it will work independently of your EA so you won't be able to control whether it's opened or not. Either send / don't send as a market order, or have some code that deletes pending orders once your spread limit is breached.
V
Thanks a lot, that's what I'd imagined...
I'll look for other ways.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Sorry if it's difficult to understand at first,
I will try to explain.
In my expert I don't open orders OP_BUY or OP_SELL. I open orders 2-5 (OP_BUYLIMIT, OP_SELLLIMIT, OP_BUYSTOP, OP_SELLSTOP).
I was wondering if the spread of the moment the order is opened could be handled, just as I used to do with the others...
Something like
if ((MarketInfo(Symbol(),MODE_SPREAD) <= 7)){
//Open Order
}
Thanks a lot!