Many a times, we have seen that the price closing in towards supertrend reverses.
This indicator gives signal that identifies high / low of any candle if near the down / up supertrend line by a defined margin using arrow signals. I've simply re-used readily available supertrend indicator source code and just modified it to these signals. So, almost all of the source code is not mine.
Enter the short / long position when arrow signal appears. SL / trend reversal will be mandatorily at close of a candle above or below the supertrend line, and the supertrend changes direction.