Original code is here:
To clarify, if an alert is set on Long or Short and the condition is met anytime during a candle timeframe an alert is sent even if the condition is reversed before the candle closes. Ideally foe me alerts would only be sent when the trend is confirmed and not if it the wick or candle crosses the supertrend line (which can happen multiple times and not confirm). Thanks!!