Trigger the alert in Pine Script from my indicator a few minutes before the candle closes.

Job ID: 33779784

Budget: €8 – €30 EUR

I would need to trigger the alert from my indicator that sends the Buy or Sell order a few minutes before the candle closes. Currently my indicator is only configured for "once_per_bar_close" . Is there a solution to do this ?
Related categories: Pine Script Trading