Hello,
I have EA which opens order during London session (I am working on 1Hr time frame). If order is open then EA should not open new order in same session if already open order survives the London session. Issue with EA is it keeps on opening new order even open order exist. Can someone help me to fix this issue?
Thanks
Check if there is an open order and then make the opening only when no open order exist
Check if there is an open order and then make the opening only when no open order exist
Hello Amando,
Thanks for response... I did it and it stops opening all further orders. As per my strategy if order is open then EA should not open new order in same London session however, EA should open new (subject to signal candle) order on next London session.
Hello Amando,
Thanks for response... I did it and it stops opening all further orders. As per my strategy if order is open then EA should not open new order in same London session however, EA should open new (subject to signal candle) order on next London session.
you should check both in the history and open orders if has or had opened orders in todays london time .
if you think you did, check your checking criteria. It must be something wrong in it.
you should check both in the history and open orders if has or had opened orders in todays london time .
if you think you did, check your checking criteria. It must be something wrong in it.
Hello Ahmet,
How can I check order opens in current London session and should ignore the order open before (i.e. past London session)
you said 'I did check...' before in your post?
MT4 or MT5
as I mentioned i checked the open order and deny further opening of orders and then on wards EA stop opening orders in subsequent London session...I just want my EA to avoid opening order in current London session if an order is open in current london session but EA should open order in next London session (subject to signal)...
hope it clarifies...
as I mentioned i checked the open order and deny further opening of orders and then on wards EA stop opening orders in subsequent London session...I just want my EA to avoid opening order in current London session if an order is open in current london session but EA should open order in next London session (subject to signal)...
hope it clarifies...
MT4 or MT5?
which one you are using
MT4 or MT5?
which one you are using
MT4
The function selects an order for further processing.
https://docs.mql4.com/trading/orderselect
Returns the number of closed orders in the account history loaded into the terminal.
https://docs.mql4.com/trading/ordershistorytotal
Returns the number of market and pending orders.
https://docs.mql4.com/trading/orderstotal
![OrderSelect - Trade Functions - MQL4 Reference OrderSelect - Trade Functions - MQL4 Reference](https://c.mql5.com/36/21/orderselect-trade-functions-mql4__2.png)
- docs.mql4.com
The function selects an order for further processing.
https://docs.mql4.com/trading/orderselect
Returns the number of closed orders in the account history loaded into the terminal.
https://docs.mql4.com/trading/ordershistorytotal
Returns the number of market and pending orders.
https://docs.mql4.com/trading/orderstotal
Hello Ahmet,
orderstotal will return all pending and open order and orderselect will help me to filter out pending or open order. Issue is how do I check order open in current London session? Orderselect selects the open order which is open yesterday or before... I just want to check if EA opens order in current London session then EA should not open any new order in current London session, also EA should not impact order open before current London session i.e. Yesterday or before London session. EA should allow opening on new order in next London session
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have EA which opens order during London session (I am working on 1Hr time frame). If order is open then EA should not open new order in same session if already open order survives the London session. Issue with EA is it keeps on opening new order even open order exist. Can someone help me to fix this issue?
Thanks