How to access next candles data in trading view by using pine script.
For example access historical close price in pine we use close[1],close[2],close[3],close[4],close[5]
what I am looking for is opposite of this.
For me to test efficiency of strategy need to find candles close price which hit target without hitting stop lose. For example how to find a entry candle whose close price will rise up 5% without hit 2% stop loss for long position and down 5% without hit 2% stop loss for short position.