Sovereign Trend Strategy [JOAT] by officialjackofalltrades
By officialjackofalltrades
Performance Metrics
- Author: officialjackofalltrades
- Symbol: TVC:GOLD
- Timeframe: 4 hours
- Net P&L: −7,241.25 USD (−72.41%)
- Win Rate: 37.5%
- Profit Factor: 0.752
- Max Drawdown: 7,584.30 USD (75.84%)
- Total Trades: 2,117
Description
Sovereign Trend Strategy [JOAT]IntroductionThe Sovereign Trend Strategy is a systematic, rules-based trend-following strategy built on the SMEMA (SMA of EMA) crossover engine — a double-smoothed moving average system that removes the erratic noise of raw EMA crossovers while remaining faster to respond than pure SMA systems. It enters long and short trades on SMEMA fast/slow crossovers, applies four optional confirmation filters (ADX, RSI, volatility ratio, and baseline), and manages each trade through a full exit framework: stop loss, two take-profit levels with partial close at TP1, a dynamic trailing stop, a trend-reversal exit, and a maximum bars cap that forces turnover.This is a strategy designed to trade constantly — the default configuration is tuned for maximum trade frequency across all assets and timeframes, with all optional filters disabled so that every valid SMEMA crossover generates a signal. Traders seeking higher-quality entries can enable the ADX, RSI, baseline, or volatility filters individually to raise the bar.Core ConceptsSMEMA — Double-Smoothed Moving Average EngineThe SMEMA construction applies a simple moving average on top of an exponential moving average, producing a line that is more responsive than a plain SMA but smoother than a raw EMA:Pine Script®smema(float src, int len) => ta.sma(ta.ema(src, len), len)float fast = smema(close, smFast)float slow = smema(close, smSlow)float baseline = smema(close, smBase)Expand 1 lineThree SMEMA lines are computed: a fast line (default length 2), a slow line (default length 5), and a longer baseline (default length 15). Crossovers between fast and slow generate the entry signals. The baseline provides an optional directional filter when enabled.Entry ConditionsLong entries fire when the fast SMEMA crosses above the slow SMEMA with all active filters passing:Pine Script®bool xUp = ta.crossover(fast, slow)bool longOk = xUp and adxOk and rsiLongOk and volOk and baseOk and warmed and inDateRange and barstate.isconfirmed and doLongShort entries mirror this on downward crossovers. Entries only fire when there are no open trades (pyramiding disabled), ensuring clean one-trade-at-a-time management.Trade Management FrameworkEach trade uses ATR-based levels calculated at entry:| Level | Default Multiplier | Purpose ||-------|-------------------|---------|| Stop Loss | 1.8× ATR | Full position stop || TP1 | 2.5× ATR | 50% partial close, breakeven stop move || TP2 | 4.5× ATR | Full position close || Trailing Stop | 1.5× ATR | Activated after TP1 hit |After TP1 triggers, the stop-loss is moved to the entry price (breakeven). The trailing stop then follows price by 1.5× ATR, locking in profit while letting the remaining position run toward TP2. This staged approach captures quick-reaction profits at TP1 and rides momentum toward TP2.Six Exit PathsPine Script®// Priority order for long exits:// 1. Stop Loss — low = entryTP1 (50% partial, breakeven stop set)// 3. TP2 — high >= entryTP2 (full close after TP1 hit)// 4. Trailing — low = maxBarsExpand 2 linesThe max bars exit (default 10) is particularly important for trade frequency — it guarantees no position is held longer than 10 bars regardless of whether any other exit triggers, creating rapid capital recycling and enabling 100+ trade sample sizes even on daily timeframes.Optional Confirmation FiltersAll four filters are disabled by default and can be enabled individually:ADX Filter — requires ADX above a minimum threshold before entry. Prevents entries in ranging, low-momentum markets.RSI Filter — requires RSI above the bull minimum for longs (default 52) or below the bear maximum for shorts (default 48). Confirms momentum alignment with direction.Volatility Ratio Filter — requires current ATR to be at least a configurable fraction of its own SMA. Filters out squeeze conditions where ATR is compressed.Baseline Filter — requires close to be above the baseline SMEMA for longs and below for shorts. Adds a medium-term trend confirmation layer.Strategy Parameters (Backtesting Standards) Initial capital: $10,000 (realistic for the average retail trader) Position size: 100% of equity (maximizes trade count visibility in backtest) Commission: 0.05% per side (appropriate for most spot and futures markets) Slippage: 2 ticks (conservative estimate for liquid instruments) Pyramiding: 0 (no compounding positions)Features SMEMA fast/slow crossover entry engine with three configurable period lengths Full trade management: ATR-based SL, TP1 (50% partial), TP2 (full), trailing stop, reversal exit, max bars exit Breakeven stop migration to entry price after TP1 hit Four optional confirmation filters: ADX, RSI, volatility ratio, and SMEMA baseline Long-only, short-only, or both directions configurable Date range filter for restricted backtesting windows Live SL, TP1, and TP2 dashed lines drawn on the chart while a trade is open SMEMA ribbon fill between fast and slow lines, colored by crossover direction ▲ LONG / ▼ SHORT signal labels at every entry signal Dashboard: position, SMEMA cross direction, ADX, RSI, vol ratio, trade count, win rate, net P&L, bars in trade, settings summary Alerts for long entry and short entry signals Webhook JSON alert format WatermarkInput ParametersSMEMA Engine Fast SMEMA Length — period for the fast crossover line (default 2) Slow SMEMA Length — period for the slow crossover line (default 5) Baseline SMEMA — period for the optional trend baseline (default 15)Trend Filter ADX Length — period for ADX / DMI calculation (default 14) Min ADX — minimum ADX value required before entry (default 18) Enable ADX Filter — master toggle (default off)RSI Filter RSI Length — period for RSI calculation (default 14) RSI Bull Min — minimum RSI for long entries (default 52) RSI Bear Max — maximum RSI for short entries (default 48) Enable RSI Filter — master toggle (default off)Volatility Filter ATR Length — lookback for ATR (default 14) ATR Smooth — lookback for the ATR average used in ratio (default 20) Min Vol Ratio — ATR/AvgATR minimum threshold (default 0.8) Enable Vol Ratio Filter — master toggle (default off)Baseline Filter Enable Baseline Filter — when on, requires close above baseline for longs and below for shorts (default off)Trade Management Stop-Loss ATR Mult — distance of initial stop from entry in ATR units (default 1.8) TP1 ATR Mult — distance of first take-profit from entry (default 2.5) TP2 ATR Mult — distance of second take-profit from entry (default 4.5) Use Trailing Stop — enables dynamic trailing after TP1 (default on) Trailing Stop ATR Mult — trail distance in ATR units (default 1.5) Max Bars in Trade — maximum bars before forced exit (default 10)Trade Direction Allow Long Trades — toggles long entry signals (default on) Allow Short Trades — toggles short entry signals (default on)Date Range Enable Date Filter — restricts backtesting to a specific window From Date / To Date — start and end of the active periodVisuals Bull Color — cyan default for upside elements Bear Color — red default for downside elements Neutral Color — gray for baseline and neutral dashboard text Show Dashboard — live performance and settings panel Show Watermark Show Signal Labels — ▲ LONG / ▼ SHORT markers on entry bars Show SMEMA Bands — toggles the ribbon and three SMEMA line plotsHow to Use Add the strategy to any chart. The default settings are tuned for high trade frequency — no filters enabled, fast periods of 2/5, max bars 10. Run the Strategy Tester to review backtest performance. Check that the trade count is above 100 on your chosen timeframe and symbol before drawing any performance conclusions. To increase signal quality at the cost of trade frequency, enable filters one at a time: start with the ADX filter to eliminate ranging entries, then add RSI if you want additional momentum confirmation. Use the SL/TP dashed lines drawn on-chart during live trades to monitor your risk levels visually in real time. Set the Long Entry and Short Entry alerts to receive notifications. Use Webhook JSON format to route signals to automation platforms. Adjust the ATR multipliers to fit the volatility profile of your market. Higher-volatility assets like altcoins benefit from wider stops (2.0–2.5×) and wider TP levels. Lower-volatility assets like indices may work better with tighter parameters. The Max Bars in Trade parameter is the most powerful lever for trade frequency. Reducing it to 5–7 generates very high trade counts. Increasing it to 20–40 gives trades more room to develop but reduces total trade count.Indicator Limitations SMEMA crossovers are inherently lagging — by definition, the crossover confirms a direction change after it has already begun. In fast-moving markets this means entries will not be at the exact turning point. The default configuration (all filters off, max bars 10) optimizes for trade count and sample size rather than highest possible win rate. Enabling filters will reduce trade count but may improve per-trade quality — test thoroughly on your symbol and timeframe before live use. The 100% equity position sizing in the backtest is chosen to keep commission effects proportional and performance metrics visible at small capital sizes. This does not represent a recommendation to risk your entire account on any trade. Backtested results are not a guarantee of future performance. Past performance under any parameters does not imply future results. The strategy uses `calc_on_every_tick=false` — all orders execute at bar close, which is more realistic than tick-by-tick simulation but means intrabar SL/TP wicks may not be captured accurately in the backtest.Originality StatementThe Sovereign Trend Strategy is an original Pine Script v6 strategy publication. The SMEMA (SMA of EMA) double-smoothing construction is an original baseline engineering choice that produces a distinct crossover behavior not replicated by standard EMA or SMA crossover systems. The six-path exit framework, the staged TP1/breakeven/trailing/TP2 management sequence, and the modular optional filter architecture are original design decisions. The strategy.position_size derivation of position state (avoiding the Pine Script v6 timing bug with strategy.opentrades and manual boolean flags) is an original technical solution developed for this publication.DisclaimerThis is a backtested strategy provided for educational purposes only. It does not constitute financial advice or a recommendation to trade any specific instrument. All trading involves risk of capital loss. Backtested performance does not guarantee future results. Commission, slippage, and real-world execution conditions will differ from backtest simulations. Always perform your own analysis and consult a licensed financial professional before trading with real capital.-Made with passion by jackofalltrades