Two things i noticed;
If you are looking for your EA to go through all the open trades in modifyTrade function, you should maybe try someting like this:
for (int z= OrdersTotal()-1; z>=0; z--)
Your OrderSelect seems to be missing the MODE_TRADES or MODE_HISTORY, so it should be like this:
OrderSelect(z, SELECT_BY_POS, MODE_TRADES)
Hope this helps.

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
I have this code below which I am using to test trailing stop function. It works on some currency pairs and doesn't work in others. It's returning error code 0 (zero).
I will be grateful if somebody can help me out.