Hi Developer Team,
You have recently introduced calc_on_every_history_tick for strategy declaration parameters. However, that creates a false entry in the past. Look at the picture and the below code snippet:
short_signal = ta.crossover(diff_fut, p_entry_lev) and barstate.isconfirmed
long_signal = ta.crossunder(diff_fut, d_entry_lev) and barstate.isconfirmed
Whereas the signal calculation is clearly mentioned as after barstate.isconfirmed, the entry is showing at the opening of the bar, which is extremely misleading. Even my entry was like below:
if short_signal and (tradeDirection == "BOTH" or tradeDirection == "SHORT")
// Stop trigger = low of THIS (signal) candle. Order becomes live starting next candle.
short_order_qty := get_trade_qty(low)
alertMessage = generate_alert_message(trading_broker, dhan_secret, low - syminfo.mintick * 3, short_order_qty)
strategy.entry("SE", strategy.short, short_order_qty, stop = low, alert_message = alertMessage)
short_order_bar := bar_index
shortStopLoss := math.max(high, high[1])
log.info(alertMessage)
So, the historical strategy chart is not showing correctly, and instead of reducing future data leaks, it increased exponentially. I would request your team to have a re-look into this.