Tectonic Regime Protocol [JOAT] — Strategy by officialjackofalltrades
By officialjackofalltrades
Performance Metrics
- Author: officialjackofalltrades
- Symbol: INDEX:BTCUSD
- Timeframe: 2 hours
- Win Rate: 41.0%
- Profit Factor: 1.046
Description
Tectonic Regime Protocol [JOAT]IntroductionTectonic Regime Protocol is an open-source Pine Script v6 strategy that combines four analytical modules into a single rule-based trading system: a four-state regime classifier, a three-layer trend filter, a six-pillar confluence entry engine, and an adaptive exit module using ATR-based partial take-profit and a regime-adaptive trailing stop.The strategy is designed for traders who want a fully automated systematic framework to study how regime-gating affects signal quality. Its primary hypothesis is that directional entries made when (1) the market is classified as a trending regime, (2) trend filters across multiple timeframes align, and (3) multiple structural, volume, and momentum inputs agree, produce statistically better outcomes than entries based on any single condition alone.Strategy Default PropertiesInitial capital: $100,000Order size: 2% of equity per tradeCommission: 0.04% per sideSlippage: 2 ticksMaximum open positions: 1These settings represent realistic conditions for a funded discretionary trader using a liquid futures or equity instrument. The 2% equity sizing limits maximum theoretical drawdown from any single trade while providing meaningful position exposure. Commission and slippage values reflect typical institutional-grade execution costs for electronically traded instruments.Core Concepts1. Four-State Regime ClassifierThe regime module classifies each bar into one of four states using ADX relative to a threshold and the ATR-to-SMA(ATR) ratio: Trend Bull, Trend Bear, Range High-Vol, Range Low-Vol. Only Trend states are eligible for entry. Range classifications suppress all entries regardless of how strong the confluence score is. This is the primary market context filter.2. Three-Layer Trend FilterThree independently computed trend conditions must all agree before a long or short entry is considered: close versus VWMA(200) determines whether price is above or below long-term value; the relationship between fast and slow HMA lines determines medium-term momentum direction; and the close versus a 50-period EMA on a higher timeframe provides multi-timeframe context.3. Six-Pillar Confluence ScoreThe entry engine scores six market dimensions and requires the composite bull or bear score to exceed 50 of 100 (default, configurable) with a directional lead of at least 8 points above the opposing score. The six pillars are: market structure, OBV slope direction, KAMA position + RSI + WPR composite, swing-low liquidity sweep detection, ATR ratio in productive range, and Fractal Efficiency Ratio above 0.30.Pine Script®bool longSetup = validRegime and regime == 1 and trendBull and bull >= confThreshold and (bull - bear) >= confGap and barstate.isconfirmed4. Adaptive Exit ModuleThe exit logic uses partial exits at two take-profit levels. TP1 closes 50% of the position at 1.0× risk distance. TP2 closes the remaining position at 2.0× risk distance. After TP1 is reached, the stop is moved to the entry price (breakeven). The stop before TP1 uses a regime-adaptive ATR trail — the stop multiplier is lower in low-volatility regimes (tighter) and higher in high-volatility regimes (looser). A 30-bar time-based exit closes any remaining position if neither TP nor stop is reached.5. Non-Repainting ArchitectureAll entry conditions are evaluated only when barstate.isconfirmed is true. The HTF EMA is requested with lookahead=barmerge.lookahead_off. Pivot-based conditions use confirmed pivot detection with symmetric lookback. No future bar references are used.Default Settings and Performance NotesThe strategy is published with the default Properties values listed above. Results shown on the publication chart are generated using these exact settings. Commission of 0.04% per side is representative of typical electronic execution on liquid instruments.Win rate alone does not characterize strategy performance. The strategy is designed around a two-tier partial exit structure targeting positive expectancy (wins × average win greater than losses × average loss) rather than high win rate. The profit factor and average R-multiple are the more relevant metrics for this type of system.Input ParametersRegime Module:ADX Trend Threshold (default: 20)ATR Ratio High-Vol Threshold (default: 1.2)Trend Filter:VWMA Length (default: 200)Ribbon Fast HMA and Slow HMA lengthsHTF Timeframe for EMA(50) filter (default: 240)Enable HTF Filter toggleConfluence Engine:Min Score (default: 50, range 50–95)Min Direction Lead (default: 8)Min FER (default: 0.30)FER Lookback (default: 14)Individual pillar weights (Structure, Volume, Momentum, Liquidity, Volatility, FER)Exit Module:TP1 RR Multiple (default: 1.0)TP2 RR Multiple (default: 2.0)Stop Multiplier for Low / Med / High Volatility RegimesMax Bars Hold (default: 30)How to Evaluate This StrategyApply it to a liquid instrument with sufficient historical data to generate more than 100 trades. Compare profit factor, Sharpe ratio, average R-multiple, and maximum drawdown — not win rate in isolation. Test it across at least two different instruments or timeframes to assess whether the results reflect genuine structural edge or data-fitting to one specific market.The strategy is not optimized for any single market. Default parameters are deliberately conservative to avoid overfitting. Users who adjust parameters to improve backtested results should recognize that improvement on historical data does not guarantee improvement on future data.Strategy LimitationsOn lower-timeframe charts with short histories, fewer than 100 trades may result, reducing the statistical reliability of the backtestThe HTF filter uses request.security() with a higher timeframe EMA. In live trading, the HTF value updates when the higher timeframe bar closes, which may differ slightly from live server-side executionATR-based stops and targets mean position sizes and outcomes scale with volatility. In abnormally low-volatility environments, commission costs represent a larger proportion of expected gainThe time-based exit at 30 bars may close profitable positions before TP2 is reached in slow-moving marketsBacktested performance on any instrument does not predict future performance. Markets change, and parameters that produced edge historically may not do so in future regimesOriginality StatementCombining a four-state regime classifier, a three-layer multi-timeframe trend filter, a six-pillar confluence score including Fractal Efficiency Ratio, and a partial-exit adaptive trailing stop system in a single non-repainting open-source strategy is an original integration of methodsThe Fractal Efficiency Ratio as a pillar in a multi-factor entry score, and as a required gate condition for entry, is not present in existing open-source Pine Script v6 strategy publications as of this writingThe regime-adaptive stop multiplier — loosening in high-volatility regimes and tightening in low-volatility regimes — is an original stop calibration approach within this strategic frameworkThe dual entry mode (edge transition OR re-entry when flat with elevated score) increases signal frequency without compromising the fundamental regime and trend filter requirementsDisclaimerThis strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Backtested results are simulated and do not represent real trading. Simulated results have inherent limitations and may not reflect actual trading outcomes due to market impact, execution differences, and changing market conditions. Past backtested performance does not guarantee future results. Trading involves substantial risk of loss. Always conduct independent due diligence and apply proper risk management before using any strategy with real capital. The author accepts no responsibility for trading losses resulting from use of this strategy.Made with passion by jackofalltrades