OPEN-SOURCE SCRIPT

Moving Average Crossover

168
Fast Moving Average (default: 9-period) — reacts quickly to price changes.

Slow Moving Average (default: 21-period) — smooths out long-term trends.

How It Works:
A Buy Signal is generated when the fast MA crosses above the slow MA, indicating potential upward momentum.

A Sell Signal is triggered when the fast MA crosses below the slow MA, signaling possible bearish momentum.

Features:
  1. Customizable fast and slow MA periods.
  2. Clear BUY/SELL labels directly on the chart.
  3. Works on any timeframe or asset (stocks, crypto, forex, etc.).
  4. Great for trend-following and swing trading strategies.

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.