So my understanding is that OnStart() is where you put trading algorithm for opening and closing positions
but any changes in the currency pairs price during the execution of OnStart() are ignored.
If, then, how would I set it such that once the positions are opened, my closing algorithm would monitor current price changes
until optimal exit condition is met, and exits?
use
1) OnTick()
or
2) RefreshRates()
So my understanding is that OnStart() is where you put trading algorithm for opening and closing positions but any changes in the currency pairs price during the execution of OnStart() are ignored.
If, then, how would I set it such that once the positions are opened, my closing algorithm would monitor current price changes until optimal exit condition is met, and exits?
- OnStart is only for scripts, OnTick is for EAs
- Correct.
- Scripts: Sleep, RefreshRates, and retest. EAs, return and retest on next tick.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
So my understanding is that OnStart() is where you put trading algorithm for opening and closing positions
but any changes in the currency pairs price during the execution of OnStart() are ignored.
If, then, how would I set it such that once the positions are opened, my closing algorithm would monitor current price changes
until optimal exit condition is met, and exits?