I am running a strategy in the builder and when I backtest it I noticed that some of the profit targets where not triggering properly.
Specifically, it seems that when the profit target is met in the entry bar, the trade is captured as a breakeven trade. However, if the profit target is met in subsequent bars, then the profit target is captured as a profitable trade. The screenshots show this.
My profit target and trail stop targets are both about 10 points. I have attached a screenshot of the relevant code as well. I would like the trade to be captured as a profitable trade even if the profit target is met in the same bar.
I have searched the forum but could not find a similar query so apologies if this has been asked and answered elsewhere.
Thank you!

Comment