OPEN-SOURCE SCRIPT

Supertrend + 2 EMAs Indicator with input by Natee L.

220
What This Script Does:
Supertrend Calculation:

Uses an ATR-based Supertrend with a customizable multiplier and ATR length.
The trend is determined by the direction variable.
Exponential Moving Averages (EMA):

Computes two EMAs: EMA 20 (shorter-term) and EMA 50 (longer-term).
Uses these EMAs to determine trend direction.
Buy and Sell Conditions:

Buy Condition:
Price is above the Supertrend.
EMA 20 is above EMA 50.
Price is above both EMAs.
Sell Condition:
Price is below the Supertrend.
EMA 20 is below EMA 50.
Price is below both EMAs.
Buy/Sell Signal Plots:

Green BUY arrows appear below bars when buy conditions are met.
Red SELL arrows appear above bars when sell conditions are met.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.