Hi all, I am experiencing issues with stop loss signals for long positions (no problem with the short side).
In particular:
- stop loss is not applied in the backtest
- in the alerts page long stop losses signals have price = 0
This is my code (it worked properly few week ago):
CODE:
Please log in to see this code.
The strangeness is that I didn't modify my code.
Any suggestion?
Thank you
Size:
Color:
Hi,
This code should not have worked neither a few weeks ago nor now:
CODE:
Please log in to see this code.
Position.AllPositions is not meant for returning EntryPrice and the code does not make sense. Could you clarify what exactly are you trying to do?
Size:
Color:
My apologies, I probably changed the code without realizing it:
the original code was:
CODE:
Please log in to see this code.
It works properly.
Thank you
Size:
Color:
Glad you got it sorted out.
Size:
Color:
Tip:
Call PlotStops() just once anywhere in the script to visualize the limit and stop order prices on the chart. You have to look closely though, the dots are pretty small!
Size:
Color: