MTF SMA Crossover Strategy by sandeep1223rana
By sandeep1223rana
Performance Metrics
- Author: sandeep1223rana
- Symbol: NASDAQ:POET
- Timeframe: 1 day
- Win Rate: 33.3%
- Profit Factor: 1.01
Description
MTF SMA Crossover Strategy DocumentationMulti-Timeframe Trend-Following Framework for TradingView (Pine Script v5)1. Strategy OverviewThe Multi-Timeframe (MTF) SMA Crossover Strategy is designed for long-term investors seeking to eliminate market noise and maximize trend capture. The strategy relies on a strict dual-timeframe hierarchy: The Weekly Macro Filter (Bottom Chart): Establishes the primary structural trend. Trades are only permitted in the direction of the macro bull market. The Daily Execution Trigger (Top Chart): Fine-tunes precise market entries using momentum crossovers.By combining these two distinct horizons, the strategy systematically filters out low-probability "fake-outs" common during broader multi-month market corrections.[Weekly Chart Filter] ---> Is Weekly Fast SMA > Weekly Slow SMA? | +---> YES ---> [Check Daily Chart] ---> Has Daily Crossover Occurred? ---> [BUY SIGNAL] | | +---> NO ---> [STAY IN CASH] +---> NO ---> [WAIT]2. Core Operational LogicEntry Architecture (The Dual-Key Verification)An entry order is programmatically executed only when the following two rules align on the same candle close: Rule 1 (Weekly Filter): The Weekly Fast Moving Average must be trading structurally above the Weekly Slow Moving Average (Weekly Fast > Weekly Slow). Rule 2 (Daily Trigger): The Daily Fast Moving Average must explicitly cross above the Daily Slow Moving Average.Note: If the daily chart experiences a bullish crossover while the weekly chart is still locked in a macro downtrend, the signal is discarded as a bull trap.Exit ArchitectureTo preserve large cyclical gains while preventing premature shake-outs, the strategy maintains a single-timeframe exit: The Velocity Clause: The strategy liquidates the entire long position immediately when the Daily Fast Moving Average crosses under the Daily Slow Moving Average.3. Parameter Technical Specifications Parameter Input Default Value Recommended Variations Purpose Fast SMA Length 50 20 (Aggressive) / 50 (Standard) Controls the Daily Trigger line and maps directly to the 10-Week SMA on the macro layer. Slow SMA Length 200 100 (Aggressive) / 200 (Standard) Controls the Daily Baseline line and maps directly to the 40-Week SMA on the macro layer. Initial Capital $10,000 User-defined Baseline cash simulation equity for the backtesting engine. Order Sizing 100% 1% to 100% Allocates the total percentage of current portfolio equity deployed into each qualified trade. 4. TradingView Implementation StepsChart Layout ConfigurationTo mimic a clean visual synchronization, set up your workspace environment as follows: Click the Select Layout button on the top toolbar of TradingView and choose the 2-Screen Split (Vertical or Horizontal). Set the Top Screen to the 1D (Daily) interval. Set the Bottom Screen to the 1W (Weekly) interval. Click the price scale gear icon on both charts and activate Logarithmic Scale. This scales exponential compounding visually over multi-year asset lifecycles.Script Installation Open up the Pine Editor tab located at the bottom section of your TradingView interface. Delete any default template code present in the editor workspace. Paste the generated MTF strategy Pine Script code into the module. Click Save, rename the file, and then click Add to Chart. Ensure the script is explicitly running over the Daily (Top) panel. It will automatically fetch data from the background weekly structure using TradingView's native context security pipeline.5. Risk Considerations & Edge Blindspots Whipsaw Windows: During extended multi-month horizontal consolidations or choppy trading ranges, the daily SMAs may cross frequently, resulting in small capital drawdowns. Lag Penetration: Because moving averages are inherently lagging mathematical calculations, the execution trigger will sit slightly above the exact absolute market bottom, and exit triggers will drop slightly below the absolute cyclical top. Asset Class Volatility: When applying this model to hyper-volatile assets (e.g., small-cap equities or crypto tokens), a temporary fast-moving crash can create short-term divergence before the weekly candles print a finalized macro print.