P
PipsGrowth

Key Takeaways

Difficulty:Beginner
Reliability:High
Category:trend
Timeframes:15M, 1H, 4H

Supertrend

trendšŸ“Š 15M, 1H, 4H, Daily

Trend-following indicator based on ATR that plots above or below price to show trend direction.

Formula

Code
Upper Band = (High + Low) / 2 + (Multiplier Ɨ ATR)
Lower Band = (High + Low) / 2 - (Multiplier Ɨ ATR)

Detailed Explanation

Supertrend is a popular trend-following indicator that uses ATR for volatility-based trailing stops.

**How It Works:** - Calculates bands based on ATR - Flips direction when price crosses the band - Provides clear visual trend indication

Parameters

Period
Default: 10
ATR period
Multiplier
Default: 3
ATR multiplier

šŸ“ˆ Bullish Signals

Supertrend flips from above to below price (red to green)

šŸ“‰ Bearish Signals

Supertrend flips from below to above price (green to red)

Python Implementation

Supertrend calculation

Python
import pandas_ta as ta
st = ta.supertrend(df['high'], df['low'], df['close'], length=10, multiplier=3)
df['Supertrend'] = st['SUPERT_10_3.0']
df['Supertrend_Direction'] = st['SUPERTd_10_3.0']

TradingView Pine Script

JavaScript
//@version=5
indicator("Supertrend", overlay=true)
[supertrend, direction] = ta.supertrend(3, 10)
plot(supertrend, "Supertrend", color=direction < 0 ? color.green : color.red)
šŸ“Š Use TradingView for Advanced Charting
Professional analysis tools with 100+ technical indicators
Get TradingView Pro

MT5 MQL5 Code

C++
// Custom Supertrend implementation needed
// Or use iCustom with Supertrend indicator

Common Mistakes

āœ—Using in ranging markets
āœ—Not adjusting parameters for different timeframes

Confirmation Signals

Volume
RSI
ADX

Best For

Trend identificationEntry signalsTrailing stops

šŸ’” Pro Tips

  • •Works well in trending markets
  • •Combine with other indicators to filter false signals
  • •Default settings (10, 3) work well for most instruments
Last updated: December 29, 2024

Educational Disclaimer

This content is for educational purposes only and does not constitute financial or investment advice. Trading involves significant risk and you may lose your capital. Always consult a licensed financial advisor before making investment decisions.

Frequently Asked Questions