tonyjms2005: trigger the closure of positions sometimes as soon as the trades are opened.
You know how to select by position for(int i = OrdersTotal()-1; i>=0;i--){ if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)){
What integer position are you selecting here? if(OrderSelect(SELECT_BY_POS, SELECT_BY_POS)==true)
- What filtering of all orders are you doing in your for loop? order accounting - MQL4 forum

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
Hello
I have a function on my EA that controls the exiting of trades:
It seems even though my function looks for the correct Symbol() and Period() it seem that ticks from other chart times seem to trigger the closure of positions sometimes as soon as the trades are opened.
Can anyone see anything that I have missed?
My EA sets globalvariables as a trade is opened, and the close() function looks for the correct Symbol() and Period(), I run multiple timeframes and symbols so my EA must check that it is getting exit info from the same timeframe and chart that it made the entry on.
Thanks
Antony