iberhack:
Hi, i am trying to code a simple EA but i am learning and i would like some help. The problem is that i want the stop loss to be updated to "stop" value each new bar. I have tried this, but i dont understand well how orderselect and ordermodify works very well yet.
The idea is when price == entry it will open 3 orders. 1- with tp1 and stop value sl, 2- with tp2 and stop value sl, 3- with no tp and stop value sl. Now each bar i want those 3 orders Stop loss to be updated to "stop" parameter value.
With OrderMagicNumber, it is possible to see whether orders exist or not, and in a separate function, new bar formation and stop updates can be made.

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
Hi, i am trying to code a simple EA but i am learning and i would like some help. The problem is that i want the stop loss to be updated to "stop" value each new bar. I have tried this, but i dont understand well how orderselect and ordermodify works very well yet.
The idea is when price == entry it will open 3 orders. 1- with tp1 and stop value sl, 2- with tp2 and stop value sl, 3- with no tp and stop value sl. Now each bar i want those 3 orders Stop loss to be updated to "stop" parameter value.