Precision Confluence Trading Strategy [JOAT] by officialjackofalltrades
By officialjackofalltrades
Performance Metrics
- Author: officialjackofalltrades
- Symbol: BINANCE:BTCUSDT
- Timeframe: 4 hours
- Net P&L: +2,428.10 USDT (+24.31%)
- Win Rate: 60.3%
- Profit Factor: 1.309
- Max Drawdown: 999.21 USDT (7.59%)
- Total Trades: 272
Description
Precision Confluence Trading StrategyIntroductionThe Precision Confluence Trading Strategy is an open-source algorithmic trading system that combines Central Pivot Range (CPR) analysis, Hull Moving Average (HMA) ribbon alignment, WaveTrend oscillator signals, multi-oscillator divergence detection, ADX trend strength, volume confirmation, Smart Money Concepts (FVG, Order Blocks, Liquidity Sweeps), and multi-timeframe analysis into a comprehensive confluence-based strategy. This mashup creates an institutional-grade trading system designed to identify high-probability setups where multiple independent analytical frameworks simultaneously signal the same direction.The strategy addresses a fundamental challenge in algorithmic trading: single-factor systems produce too many false signals and lack robustness across different market conditions. By requiring confluence across 9 different analytical components before entering trades, this system significantly reduces false signals and focuses capital on only the highest-quality setups where technical, momentum, volume, and institutional factors all align.Chart showing strategy entries with confluence dashboard on 4H timeframeWhy This Mashup ExistsThis strategy combines nine analytical frameworks that address different aspects of market analysis:CPR Analysis: Identifies key pivot levels where institutional algorithms make decisionsHMA Ribbon: Measures trend quality through 5-layer moving average alignmentWaveTrend Oscillator: Detects momentum cycles and overbought/oversold conditionsMulti-Oscillator Divergence: Identifies momentum exhaustion across RSI, MACD, Stochastic RSIADX Trend Strength: Quantifies trend strength to avoid weak, choppy marketsVolume Confirmation: Validates moves with volume analysis and delta calculationsSmart Money Concepts: Tracks institutional footprints (FVG, Order Blocks, Liquidity Sweeps)Multi-Timeframe Analysis: Ensures directional alignment across 15M, 1H, and 4H timeframesKey Moving Averages: Confirms position relative to SMA 50/200 institutional levelsEach component addresses a different market dimension: CPR provides static structure, HMA shows trend quality, WaveTrend captures momentum cycles, Divergences warn of exhaustion, ADX measures trend strength, Volume confirms genuine moves, SMC reveals institutional behavior, MTF ensures alignment, and Key MAs provide institutional context. Together, they create a multi-dimensional analysis system that no single indicator can provide.The mashup is justified because these components use fundamentally different data and methodologies (pivot calculations, weighted moving averages, wave oscillators, directional movement, volume analysis, price inefficiencies, multi-timeframe data, simple moving averages) that respond to different market conditions. When they align, it indicates genuine high-probability setup rather than noise from a single analytical method.Core Strategy Logic1. CPR Analysis Component (0-15 points)Central Pivot Range provides structural reference levels:Pine Script®// Daily and Weekly CPR calculation[dPivot, dBC, dTC] = calcCPR(dHigh, dLow, dClose)[wPivot, wBC, wTC] = calcCPR(wHigh, wLow, wClose)// CPR scoringcprBullScore = 0cprBullScore += close > dPivot and close > wPivot ? 10 : 0cprBullScore += close > dTC ? 3 : 0cprBullScore += cprNarrow ? 2 : 0 // Narrow CPR = breakout potentialcprBearScore = 0cprBearScore += close hma13 and hma13 > hma21 and hma21 > hma34 and hma34 > hma55hmaFullBearish = hma8 emaSlow// HMA scoringhmaRibbonBullScore = 0hmaRibbonBullScore += hmaBullish ? 5 : 0hmaRibbonBullScore += hmaFullBullish ? 7 : 0 // Full alignment = strong trendhmaRibbonBullScore += emaCloudBullish ? 3 : 0Expand 14 linesHMA contribution: Up to 15 points for full ribbon alignment with EMA cloud confirmation.3. WaveTrend Oscillator Component (0-15 points)WaveTrend detects momentum cycles and extreme conditions:Pine Script®[wt1, wt2] = calcWaveTrend(hlc3, wtChannelLen, wtAverageLen)// WaveTrend signalswtCrossUp = ta.crossover(wt1, wt2)wtCrossDown = ta.crossunder(wt1, wt2)wtOversold = wt1 60// WaveTrend scoringwtBullScore = 0wtBullScore += wtCrossUp and wtOversold ? 8 : wtCrossUp ? 5 : 0wtBullScore += wtBullDiv ? 5 : 0 // Divergence adds weightwtBullScore += wtMomentumBullish ? 2 : 0Expand 8 linesWaveTrend contribution: Up to 15 points for crossover in extreme zone with divergence and momentum confirmation.4. Multi-Oscillator Divergence Component (0-10 points)Tracks divergences across RSI, MACD, and Stochastic RSI:Pine Script®// Divergence detectionrsiBullDiv = price LL and rsi HLwtBullDiv = price LL and wt1 HLstrongBullDiv = rsiBullDiv and wtBullDiv// Divergence scoringdivBullScore = 0divBullScore += rsiBullDiv ? 5 : 0divBullScore += strongBullDiv ? 5 : 0 // Multiple oscillators = stronger signalExpand 4 linesDivergence contribution: Up to 10 points for multi-oscillator divergence indicating momentum exhaustion.5. ADX Trend Strength Component (0-10 points)ADX quantifies trend strength to avoid choppy markets:Pine Script®[plus, minus, adx] = ta.dmi(adxLength, adxLength)strongTrend = adx > adxThreshold // Default: 20trendBullish = plus > minus// ADX scoringadxBullScore = strongTrend and trendBullish ? 10 : trendBullish ? 5 : 0Expand 2 linesADX contribution: Up to 10 points for strong trend (ADX > 20) in correct direction.6. Volume Confirmation Component (0-10 points)Volume analysis validates genuine institutional participation:Pine Script®volMA = ta.sma(volume, volMaLength)highVolume = volume > volMA * 1.5climaxVolume = volume > volMA * 3.0// Volume deltavolumeDelta = ta.cum(buyVolume) - ta.cum(sellVolume)deltaRising = volumeDelta > volumeDeltaMA// Volume scoringvolBullScore = 0volBullScore += volConfirmedBull ? 7 : bullishVolume ? 5 : 0volBullScore += climaxVolume and close > open ? 3 : 0Expand 7 linesVolume contribution: Up to 10 points for high volume with rising delta confirming institutional buying.7. Smart Money Concepts Component (0-10 points)SMC tracks institutional order flow patterns:Pine Script®// Fair Value GapssignificantBullFVG = bullishFVG and fvgSize > 0.3%// Order BlocksbullishOB = bearish candles + strong bullish candle + high volume// Liquidity SweepsvolConfirmedSweepLow = sweep below recent low + high volume// DisplacementbullishDisplacement = large candle (> 2x ATR) + climax volume// SMC scoringsmcBullScore = 0smcBullScore += significantBullFVG ? 2 : 0smcBullScore += bullishOB ? 2 : 0smcBullScore += volConfirmedSweepLow ? 2 : 0smcBullScore += bullishDisplacement ? 3 : 0Expand 13 linesSMC contribution: Up to 10 points for multiple institutional footprints (FVG + OB + Sweep + Displacement).8. Multi-Timeframe Analysis Component (0-15 points)Ensures directional alignment across higher timeframes:Pine Script®// Request higher timeframe data[htf15mDir, htf15mStrong] = request.security(syminfo.tickerid, "15", htfTrend())[htf1hDir, htf1hStrong] = request.security(syminfo.tickerid, "60", htfTrend())[htf4hDir, htf4hStrong] = request.security(syminfo.tickerid, "240", htfTrend())// Alignment checkmtfBullish = htf15mDir == 1 and htf1hDir == 1 and htf4hDir == 1mtfStrongBullish = mtfBullish and htf15mStrong and htf1hStrong and htf4hStrong// MTF scoringmtfBullScore = 0mtfBullScore += mtfStrongBullish ? 15 : mtfBullish ? 10 : htf1hDir == 1 ? 5 : 0Expand 7 linesMTF contribution: Up to 15 points for all three higher timeframes aligned with strong trends.9. Key Moving Average Component (0-10 points)Position relative to institutional moving averages:Pine Script®sma50 = ta.sma(close, 50)sma200 = ta.sma(close, 200)goldenCross = sma50 > sma200// MA scoringmaBullScore = 0maBullScore += close > sma50 ? 3 : 0maBullScore += close > sma200 ? 4 : 0maBullScore += goldenCross ? 3 : 0Expand 4 linesMA contribution: Up to 10 points for price above key MAs with Golden Cross.Dashboard showing confluence score breakdown by componentTotal Confluence Scoring SystemThe strategy calculates total confluence score (0-100) by summing all components:Pine Script®bullConfluenceScore = cprBullScore + // 0-15 hmaRibbonBullScore + // 0-15 wtBullScore + // 0-15 divBullScore + // 0-10 adxBullScore + // 0-10 volBullScore + // 0-10 smcBullScore + // 0-10 mtfBullScore + // 0-15 maBullScore // 0-10 // Total: 0-100Expand 5 linesEntry signals require:Bullish confluence score >= minConfluenceScore (default: 70)Bearish confluence score = 70STRONG LONG: Confluence score >= 80ULTRA LONG: Confluence score >= 90 (rare, highest probability)Risk Management SystemThe strategy implements comprehensive risk controls:1. ATR-Based Position SizingPine Script®atr = ta.atr(14)stopLossDistance = atr * 2// Calculate position size based on riskaccountSize = strategy.equityriskAmount = accountSize * (riskPercent / 100) // Default: 2%positionSize = riskAmount / stopLossDistanceExpand 2 lines2. Dynamic Stop Loss and Take ProfitPine Script®// Dynamic stop based on market structuredynamicStopBull = math.min(close - stopLossDistance, ta.lowest(low, 10))// Take profit based on risk:reward ratiotakeProfit = close + (stopLossDistance * rewardRatio) // Default: 2:13. Breakeven ManagementPine Script®// Move stop to breakeven when profit reaches thresholdif close >= entryPrice + (stopLossDistance * breakevenTrigger) // Default: 1.0 R:R strategy.exit("Long Exit", "Long", stop=entryPrice, limit=takeProfit)4. Trailing Stop (Optional)Pine Script®if useTrailingStop trailDistance = close * (trailOffset / 100) // Default: 1.5% strategy.exit("Long Exit", "Long", trail_offset=trailDistance)Strategy Execution LogicPine Script®// Long Entryif longSignal and strategy.position_size == 0 stopLoss = dynamicStopBull takeProfit = close + (stopLossDistance * rewardRatio) strategy.entry("Long", strategy.long) strategy.exit("Long Exit", "Long", stop=stopLoss, limit=takeProfit) // Label with confluence score label.new(bar_index, low, "LONG\nScore: " + str.tostring(bullConfluenceScore), style=label.style_label_up, color=entryColor)// Short Entry (mirror logic)if shortSignal and strategy.position_size == 0 // Similar logic for short tradesExpand 12 linesPerformance DashboardThe strategy displays a comprehensive 12-row dashboard:Row 1: Component headerRow 2: Current position (LONG/SHORT/FLAT)Row 3: Total confluence score (bull/bear)Row 4: CPR component scoreRow 5: HMA Ribbon component scoreRow 6: WaveTrend component scoreRow 7: Divergence component scoreRow 8: ADX component scoreRow 9: Volume component scoreRow 10: SMC component scoreRow 11: MTF component scoreRow 12: Equity and P&L percentageStrategy ParametersStrategy Settings:Use Multi-Timeframe Confirmation: Enable MTF analysis (default: enabled)Use Divergence Signals: Enable divergence component (default: enabled)Use Smart Money Concepts: Enable SMC component (default: enabled)Use Volume Confirmation: Enable volume component (default: enabled)Use CPR Levels: Enable CPR component (default: enabled)Use WaveTrend Signals: Enable WaveTrend component (default: enabled)Use HMA Alignment: Enable HMA component (default: enabled)Use Session Filter: Trade only during London/NY sessions (default: enabled)Minimum Confluence Score: Threshold for entry (default: 70, range: 50-100)Risk Management:Risk Per Trade %: Percentage of equity to risk (default: 2.0%, range: 0.1-10%)Reward:Risk Ratio: Take profit multiplier (default: 2.0, range: 1.0-5.0)Use Trailing Stop: Enable trailing stop (default: enabled)Trailing Stop %: Trail distance (default: 1.5%, range: 0.1-5.0%)Use Breakeven: Move stop to breakeven (default: enabled)Breakeven Trigger: R:R threshold to move stop (default: 1.0, range: 0.5-3.0)Indicator Parameters:RSI Length: Period for RSI (default: 14)ADX Length: Period for ADX (default: 14)ADX Threshold: Minimum ADX for strong trend (default: 20)Volume MA Length: Period for volume average (default: 20)HMA Length: Period for HMA (default: 21)WaveTrend Channel Length: (default: 10)WaveTrend Average Length: (default: 21)Backtesting ConfigurationDefault strategy properties:Initial Capital: $10,000Default Qty Type: Percent of EquityDefault Qty Value: 10%Commission Type: PercentCommission Value: 0.1% (10 basis points)Slippage: 2 ticksMax Bars Back: 5000These settings represent realistic trading conditions for the average trader. Commission and slippage account for typical broker fees and execution costs.How to Use This StrategyStep 1: Configure ComponentsEnable/disable components based on your trading style. All components enabled provides maximum filtering but fewer trades.Step 2: Set Confluence ThresholdAdjust minimum confluence score. Higher threshold (80-90) = fewer, higher-quality trades. Lower threshold (60-70) = more frequent trades.Step 3: Configure Risk ParametersSet risk per trade (1-2% recommended) and reward:risk ratio (2:1 minimum recommended). Enable breakeven and trailing stop for protection.Step 4: Backtest ThoroughlyRun backtests on multiple timeframes and market conditions. Aim for 100+ trades for statistical significance. Review win rate, profit factor, and drawdown.Step 5: Analyze Component ContributionUse dashboard to see which components contribute most to winning trades. Consider adjusting weights or disabling low-value components.Step 6: Forward TestPaper trade the strategy before risking real capital. Verify that live results align with backtest expectations.Best PracticesUse on 15-minute to 4-hour timeframes for optimal signal qualityConfluence score above 80 produces highest win rate but fewer tradesEnable all components for maximum filtering in volatile marketsDisable some components for more frequent trades in trending marketsSession filter (London/NY only) significantly improves resultsRisk 1-2% per trade maximum for sustainable tradingAim for minimum 2:1 reward:risk ratioReview dashboard component scores to understand trade qualityBacktest on minimum 6-12 months of dataVerify 100+ trades in backtest for statistical validityStrategy LimitationsConfluence-based systems produce fewer trades - may not suit active tradersRequires all components to align - perfect setups are rareBacktesting results may not reflect live trading with slippage and latencyMulti-timeframe analysis can cause repainting on lower timeframesHigh confluence threshold (90+) may produce too few trades for some marketsCommission and slippage significantly impact profitabilityStrategy optimized for trending markets - may underperform in rangesPast performance does not guarantee future resultsRequires understanding of all components for effective parameter tuningComplex system with many parameters - over-optimization riskBacktesting ConsiderationsWhen evaluating backtest results:Sample Size: Minimum 100 trades for statistical significanceWin Rate: 40-60% is realistic for 2:1 R:R strategyProfit Factor: Above 1.5 is good, above 2.0 is excellentMax Drawdown: Should be less than 20% of initial capitalSharpe Ratio: Above 1.0 indicates good risk-adjusted returnsTrade Frequency: Should match your trading availabilityEquity Curve: Should show steady growth, not erratic spikesConsecutive Losses: Prepare for 5-10 consecutive lossesAdjust parameters if:Win rate 25% (reduce risk per trade or increase confluence threshold)Profit factor < 1.2 (strategy may not be viable)Technical ImplementationBuilt with Pine Script v6 using:9-component confluence scoring systemCPR calculations with width analysis5-layer HMA ribbon with full alignment detectionWaveTrend oscillator with divergence trackingMulti-oscillator divergence detection (RSI, MACD, Stoch RSI)ADX trend strength measurementVolume analysis with delta calculationsSmart Money Concepts (FVG, OB, Liquidity Sweeps, Displacement)Multi-timeframe analysis (15M, 1H, 4H)ATR-based dynamic position sizingBreakeven and trailing stop managementComprehensive 12-row dashboardSession filtering (London/NY)The code is fully open-source and can be modified to adjust component weights, confluence thresholds, and risk parameters.Originality StatementThis strategy is original in its comprehensive multi-component confluence approach. While individual components (CPR, HMA, WaveTrend, Divergences, ADX, Volume, SMC, MTF, Key MAs) are established analytical tools, this mashup is justified because:It integrates 9 independent analytical frameworks using fundamentally different data and methodologiesThe confluence scoring system quantifies setup quality across all components (0-100 scale)Each component addresses a different market dimension (structure, trend, momentum, strength, volume, institutional flow, timeframe alignment)Tiered signal system (LONG/STRONG/ULTRA) provides graduated confidence levelsComprehensive risk management with ATR-based sizing, breakeven, and trailing stopsComponent-level dashboard allows traders to understand what drives each tradeSession filtering aligns with institutional trading hoursIntegration reveals complete market picture that no single indicator providesEach component contributes unique information: CPR provides structure, HMA shows trend quality, WaveTrend captures momentum cycles, Divergences warn of exhaustion, ADX measures strength, Volume confirms moves, SMC reveals institutional behavior, MTF ensures alignment, and Key MAs provide institutional context. The strategy's value lies in requiring confluence across these independent frameworks, significantly reducing false signals and focusing capital on only the highest-probability setups where all factors align.DisclaimerThis strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.Backtesting results do not guarantee future performance. Past results, whether real or indicated by historical tests, are not indicative of future results. There are frequently sharp differences between backtested results and actual results subsequently achieved by any trading strategy.The confluence score is a mathematical calculation based on current market data, not a prediction of future price movement. High confluence scores do not ensure profitable trades. Market conditions change, and strategies that worked historically may not work in the future.Commission and slippage settings in backtests may not accurately reflect live trading conditions. Real trading results will vary based on execution quality, market liquidity, broker fees, and other factors not captured in backtesting.No representation is being made that any account will or is likely to achieve profits or losses similar to those shown in backtests. Users should thoroughly test any strategy in a paper trading environment before risking real capital.Always use proper risk management. Never risk more than you can afford to lose. The default 2% risk per trade is a guideline - adjust based on your personal risk tolerance and account size. Consider consulting with a qualified financial advisor before making investment decisions.The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this tool.-Made with passion by officialjackofalltrades