OPEN-SOURCE SCRIPT

Moving Average Shift WaveTrend Strategy

780
Moving Average Shift WaveTrend Strategy

🧭 Overview
The Moving Average Shift WaveTrend Strategy is a trend-following and momentum-based trading system designed to be overlayed on TradingView charts. It executes trades based on the confluence of multiple technical conditions—volatility, session timing, trend direction, and oscillator momentum—to deliver logical and systematic trade entries and exits.

🎯 Strategy Objectives
  • []Enter trades aligned with the prevailing long-term trend
    []Exit trades on confirmed momentum reversals
    []Avoid false signals using session timing and volatility filters
    []Apply structured risk management with automatic TP, SL, and trailing stops


⚙️ Key Features
  • []Selectable MA types: SMA, EMA, SMMA (RMA), WMA, VWMA
    []Dual-filter logic using a custom oscillator and moving averages
    []Session and volatility filters to eliminate low-quality setups
    []Trailing stop, configurable Take Profit / Stop Loss logic
    []“In-wave flag” prevents overtrading within the same trend wave
    []Visual clarity with color-shifting candles and entry/exit markers


📈 Trading Rules

✅ Long Entry Conditions:
  • []Price is above the selected MA
    []Oscillator is positive and rising
    []200-period EMA indicates an uptrend
    []ATR exceeds its median value (sufficient volatility)
    []Entry occurs between 09:00–17:00 (exchange time)
    []Not currently in an active wave


🔻 Short Entry Conditions:
  • []Price is below the selected MA
    []Oscillator is negative and falling
    []200-period EMA indicates a downtrend
    []All other long-entry conditions are inverted


❌ Exit Conditions:
  • []Take Profit or Stop Loss is hit
    []Opposing signals from oscillator and MA
  • Trailing stop is triggered


🛡️ Risk Management Parameters
  • []Pair: ETH/USD
    []Timeframe: 4H
    []Starting Capital: $3,000
    []Commission: 0.02%
    []Slippage: 2 pips
    []Risk per Trade: 2% of account equity (adjustable)
    []Total Trades: 224
    []Backtest Period: May 24, 2016 — April 7, 2025

Note: Risk parameters are fully customizable to suit your trading style and broker conditions.

🔧 Trading Parameters & Filters
  • []Time Filter: Trades allowed only between 09:00–17:00 (exchange time)
    []Volatility Filter: ATR must be above its median value
  • Trend Filter: Long-term 200-period EMA


📊 Technical Settings

Moving Average
  • []Type: SMA
    []Length: 40
  • Source: hl2


Oscillator
  • []Length: 15
    []Threshold: 0.5


Risk Management
  • []Take Profit: 1.5%
    []Stop Loss: 1.0%
  • Trailing Stop: 1.0%


👁️ Visual Support
  • []MA and oscillator color changes indicate directional bias
    []Clear chart markers show entry and exit points
  • Trailing stops and risk controls are transparently managed


🚀 Strategy Improvements & Uniqueness
  • []In-wave flag avoids repeated entries within the same trend phase
    []Filtering based on time, volatility, and trend ensures higher-quality trades
    []Dynamic high/low tracking allows precise trailing stop placement
    []Fully rule-based execution reduces emotional decision-making


💡 Inspirations & Attribution
This strategy is inspired by the excellent concept from:
ChartPrime – “Moving Average Shift”
It expands on the original idea with advanced trade filters and trailing logic.
Source reference: [Insert TradingView script link]

📌 Summary
The Moving Average Shift WaveTrend Strategy offers a rule-based, reliable approach to trend trading. By combining trend and momentum filters with robust risk controls, it provides a consistent framework suitable for various market conditions and trading styles.

⚠️ Disclaimer
This script is for educational purposes only. Trading involves risk. Always use proper backtesting and risk evaluation before applying in live markets.

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.