
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 everyone!
So I have a stop loss check in the Ontick function like this:
Some part of the code is hide away for simplicity.
The trailing is as follow, I want the trail to trigger when a threshold is reached. And it should be checked every single tick. If the threshold is reached, we move the stop loss to the current price.
The stop loss is kind of working, except that it is doing its work only after a bar is closed and move onto the next bar. A proof is in the attached diagram
If you look at the red circle, you can see that the position is closed one bar late, hence, the stop loss is working one bar late.
Thank you for your precious time. Any help would be appreciated.