QUAD ROTATION STRATEGY
TradingView Pine Script Strategy Manual
Version 6.0
The Quad Rotation Strategy is an advanced momentum-based trading system that utilizes four synchronized stochastic oscillators to identify high-probability entry points. The strategy operates on a two-phase mechanism: an "arming" phase when all oscillators reach extreme levels, followed by a "trigger" phase when all oscillators begin moving in unison in the opposite direction.
This manual provides comprehensive documentation of all strategy parameters, logic flows, and optimization recommendations to help you maximize performance while managing risk effectively.
HOW TO GET THE STRATEGY
Here's how you can get the TradingView RockBot strategies from DayTradingRadio:
If you want to start with a free trial and explore the Playbook and templates, you can sign up here:
www.dtr.tv/free
Overview & Core Concept
Strategy Logic Flow
Parameter Reference
Performance Optimization Tips
Risk Management Best Practices
Common Trading Scenarios
Quad Rotation is a multi-timeframe momentum strategy that combines four stochastic oscillators with different periods to create a comprehensive view of market momentum across multiple timeframes simultaneously:
9-3 Stochastic: Fast oscillator for short-term momentum
14-3 Stochastic: Standard oscillator for medium-term momentum
40-4 Stochastic: Slower oscillator for intermediate trends
60-10 Stochastic: Slowest oscillator for long-term trend context
The strategy becomes "armed" when all four stochastic oscillators simultaneously reach extreme levels:
Long Setup: All oscillators ≤ oversold level (default: 20)
Short Setup: All oscillators ≥ overbought level (default: 80)
This simultaneous extreme reading across all timeframes indicates that the market has become stretched and is likely due for a reversal or rotation.
Once armed, the strategy waits for confirmation that all oscillators are moving together in the same direction:
Long Trigger: All oscillators rising for N consecutive bars (default: 2)
Short Trigger: All oscillators falling for N consecutive bars (default: 2)
This synchronized movement confirms that momentum is shifting across all timeframes, creating a high-probability entry signal.
Multi-Timeframe Confirmation: Reduces false signals by requiring alignment across four different momentum periods
Adaptive Filters: Additional filters prevent trades in extreme conditions using the 9-3 and 60-10 oscillators
Latch Mechanism: Prevents multiple entries during the same rotation cycle
Safety Net Exits: Automatic profit protection when positions reach opposite extreme levels
Comprehensive Risk Management: Multiple stop loss options including swing-based, ATR-based, trailing, and breakeven stops
Visual Feedback: Clear chart markings show entry signals, stop levels, and position status
The strategy processes each bar in the following sequence:
1. Safety Net Exits (Priority)
Checked first to protect profits. If in a long position and 9-3 oscillator reaches overbought, exit immediately. If in a short position and 9-3 oscillator reaches oversold, exit immediately.
2. Breakeven Stop Management
If enabled and position has reached the profit threshold, move stop to breakeven plus offset. This locks in gains and reduces risk.
3. Trailing Stop Management
If enabled, activate when position reaches profit threshold. Trail the stop to capture additional gains while protecting profits.
4. Arming Logic
Check if all four oscillators are in extreme zones (oversold for long, overbought for short). If so and not already latched, arm the strategy.
Start countdown timer - if no trigger within max wait bars, disarm.
5. Trigger Logic
If armed, check if all oscillators are moving in unison for required number of bars.
Apply trigger filters (9-3 must be within threshold, 60-10 extreme filter).
If all conditions met, enter position with appropriate stop loss.
Set latch to prevent re-entry until oscillators return to neutral.
NEUTRAL → All oscillators enter extreme zone → ARMED → All oscillators move in unison + filters pass → TRIGGERED (Enter Position) → LATCHED → Oscillators return to neutral → NEUTRAL
If armed and max wait bars exceeded without trigger: ARMED → DISARMED → NEUTRAL
Oversold Level
Default: 20
Range: 1-100
Description: The threshold below which all four stochastic oscillators must fall to arm a long setup. Lower values (e.g., 15) require more extreme oversold conditions and may produce fewer but higher-quality signals. Higher values (e.g., 25-30) will arm more frequently but may catch premature reversals.
Optimization Tip: For volatile markets, consider lowering to 15. For ranging markets, try 25-30.
Overbought Level
Default: 80
Range: 1-100
Description: The threshold above which all four stochastic oscillators must rise to arm a short setup. Higher values (e.g., 85) require more extreme overbought conditions. Lower values (e.g., 70-75) will arm more frequently but may enter too early in strong uptrends.
Optimization Tip: Should mirror oversold level (if oversold is 20, overbought should be 80). In trending markets, consider 85 to avoid counter-trend trades.
Bars Up/Down Required
Default: 2
Range: 1-10
Description: The number of consecutive bars that all four oscillators must move in the same direction to trigger an entry. Higher values (3-4) provide stronger confirmation but may miss quick reversals. Lower values (1) are more responsive but increase false signals.
Optimization Tip: Value of 2 works well for most markets. Use 3 for choppy markets, 1 for fast-moving momentum markets.
Max Wait Bars After Armed
Default: 8
Range: 1-50
Description: After the strategy becomes armed, this is the maximum number of bars to wait for a trigger signal before disarming. This prevents the strategy from staying armed indefinitely if oscillators remain in extreme zones but don't rotate. Too short (3-5 bars) may miss delayed rotations. Too long (15+ bars) may trigger on weak setups.
Optimization Tip: 8-10 bars works for most timeframes. Lower timeframes (5min, 15min) may benefit from shorter waits (5-6). Daily charts may use longer (12-15).
Allow Flat In Direction
Default: True
Options: True / False
Description: When checking if oscillators are rising/falling, this determines if flat (equal) values count. If True, uses >= for rising and <= for falling (flat bars count). If False, requires strict > for rising and < for falling (flat bars disqualify the pattern).
Optimization Tip: True (default) is recommended. False may be too strict and miss valid setups, especially in consolidating markets.
Long Trigger Filter: 9-3 D must be <= this
Default: 50
Range: 1-100
Description: Additional filter applied at trigger time. The 9-3 stochastic (fastest oscillator) must still be at or below this level when the trigger occurs. This prevents entries when the fast oscillator has already run too high, indicating the move may be exhausted. Lower values (30-40) are more conservative. Higher values (60-70) allow more entries but risk buying into fading momentum.
Optimization Tip: Default 50 balances opportunity and quality. In trending markets, 60-70 captures more of the move. In choppy markets, 35-40 improves quality.
Short Trigger Filter: 9-3 D must be >= this
Default: 50
Range: 1-100
Description: Mirror of the long trigger filter. The 9-3 stochastic must still be at or above this level when the short trigger occurs. Higher values (60-70) are more conservative. Lower values (30-40) allow more entries but risk shorting into fading downward momentum.
Optimization Tip: Should mirror long filter. If long filter is 40, short filter should be 60.
Use 60-10 Extreme Filter
Default: True
Options: True / False
Description: When enabled, uses the 60-10 stochastic (slowest oscillator) to block trades in extremely trending conditions. This prevents counter-trend entries when the long-term trend is very strong.
Optimization Tip: Highly recommended to keep enabled. Prevents fighting strong trends. Only disable if trading with the trend or in range-bound markets.
Block SHORT if 60-10 D > this
Default: 90
Range: 1-100
Description: If the 60-10 oscillator is above this level, short trades are blocked even if all other conditions are met. This prevents shorting when the long-term trend is extremely bullish. Higher values (95+) rarely block trades. Lower values (80-85) block more aggressively.
Optimization Tip: 90 is conservative. In strongly trending bull markets, consider 85. In sideways markets, can raise to 95.
Block LONG if 60-10 D < this
Default: 10
Range: 0-99
Description: If the 60-10 oscillator is below this level, long trades are blocked even if all other conditions are met. This prevents buying when the long-term trend is extremely bearish. Lower values (5 or less) rarely block trades. Higher values (15-20) block more aggressively.
Optimization Tip: 10 is conservative. In strongly trending bear markets, consider 15. In sideways markets, can lower to 5.
The Safety Net is an automatic profit-taking mechanism that uses the fast 9-3 oscillator to exit positions when they reach opposite extreme levels. This captures profits before full reversals occur.
Enable Safety Net Rotation Exit
Default: True
Options: True / False
Description: Master switch for the Safety Net exit mechanism. When enabled, positions are automatically closed when the 9-3 oscillator reaches the opposite extreme zone. This is checked before any other logic on each bar, giving it highest priority.
Optimization Tip: Strongly recommended to keep enabled. It significantly improves win rate by capturing profits at optimal levels.
Safety Net Oversold Exit Level
Default: 20
Range: 1-100
Description: If holding a short position and the 9-3 oscillator drops to this level, the position is immediately closed. This captures profits as the market becomes oversold and due for a bounce.
Optimization Tip: Should typically match the arming oversold level (20). Can set lower (15) to ride profits further but risks giving back more.
Safety Net Overbought Exit Level
Default: 80
Range: 1-100
Description: If holding a long position and the 9-3 oscillator rises to this level, the position is immediately closed. This captures profits as the market becomes overbought and due for a pullback.
Optimization Tip: Should typically match the arming overbought level (80). Can set higher (85) to ride profits further but risks giving back more.
The strategy offers three stop loss methods: Swing-based (uses recent highs/lows), ATR-based (volatility-adjusted), and Fixed (simple offset). Choose one method based on market characteristics.
Enable Stop Loss
Default: True
Options: True / False
Description: Master switch for initial stop loss placement. When enabled, a stop loss order is placed immediately upon entry using the selected method (Swing, ATR, or Fixed). When disabled, positions have no initial stop protection (not recommended except for experienced traders with manual monitoring).
Optimization Tip: Always keep enabled unless you have a specific risk management plan. Unprotected positions can lead to catastrophic losses.
Stop Offset Ticks/Cents
Default: 1
Range: 0-500
Description: Additional buffer added to swing-based or fixed stops. For swing stops, this is added beyond the swing high/low. For fixed stops, this is the entire offset from entry. For futures, 1 tick = minimum price movement. For stocks, 1 cent = $0.01.
Optimization Tip: 1-2 ticks for swing stops provides buffer against stop running. For fixed stops in stocks, 10-25 cents depending on price and volatility. ES futures: 2-4 ticks.
Use Swing-Based Stop (5-bar lookback)
Default: True
Options: True / False
Description: When enabled, stop is placed at the 5-bar swing point plus offset. For longs: lowest low of previous 5 bars minus offset. For shorts: highest high of previous 5 bars plus offset. This respects market structure by placing stops beyond recent support/resistance.
Optimization Tip: Recommended for most markets. Provides adaptive stops that account for recent volatility. Works well with trending and ranging markets.
Enable Trailing Stop
Default: False
Options: True / False
Description: Activates a trailing stop mechanism that moves with favorable price movement. Once the position reaches the activation profit threshold, the stop begins trailing at a fixed distance. The stop only moves in the favorable direction, locking in gains as the position moves in your favor.
Optimization Tip: Can conflict with Safety Net exits. Consider using one or the other, not both. Trailing works well in strongly trending markets but can exit too early in choppy conditions.
Trailing Stop Distance (Ticks/Cents)
Default: 8
Range: 1-1000
Description: The distance the trailing stop maintains from the current price. Tighter trailing (4-6 ticks) locks in profits quickly but may exit prematurely. Wider trailing (12-20 ticks) gives trades more room but risks giving back more profit on reversals.
Optimization Tip: Should be based on average bar range. For ES: 8-12 ticks. For stocks: 0.15-0.30% of price. Test different values on your specific instrument.
Trailing Stop Activation (Ticks/Cents Profit)
Default: 4
Range: 0-1000
Description: The minimum profit (in ticks/cents) required before the trailing stop activates. Setting to 0 means the trailing stop is active immediately from entry. Higher values (6-10) ensure the trade has established some profit before trailing begins.
Optimization Tip: Should be roughly 2x the trailing distance. If trailing distance is 8 ticks, activation at 4 ticks means the stop is at breakeven when activated.
Use ATR-Based Stop
Default: False
Options: True / False
Description: When enabled (and Swing Stop disabled), uses Average True Range (ATR) to set stops. Stop is placed at entry price +/- (ATR × Multiplier). This creates volatility-adjusted stops that automatically widen in volatile markets and tighten in quiet markets.
Optimization Tip: Excellent for multi-instrument strategies. Automatically adapts to each instrument's volatility. Less effective in very quiet markets where ATR may be too small.
ATR Period
Default: 14
Range: 1-200
Description: Number of bars used to calculate Average True Range. Shorter periods (7-10) respond quickly to volatility changes but may be choppy. Longer periods (20-30) smooth out volatility but lag recent changes.
Optimization Tip: Standard 14 works well for most timeframes. Lower timeframes (5min, 15min) can use 10-12. Daily charts can use 14-20.
ATR Multiplier
Default: 2.0
Range: 0.5-10.0
Description: How many ATRs away to place the stop. Lower multipliers (1.0-1.5) create tight stops that may get hit by normal volatility. Higher multipliers (2.5-3.5) give trades more breathing room but risk larger losses.
Optimization Tip: 2.0 is balanced. For mean-reversion strategies, 1.5 works well. For trend-following, 2.5-3.0 prevents premature exits.
The Breakeven Stop automatically moves your stop loss to your entry price (plus a small offset) once the position reaches a specified profit threshold. This eliminates risk once trades are profitable.
Enable Breakeven Stop
Default: False
Options: True / False
Description: Master switch for breakeven stop functionality. When enabled and position profit reaches the trigger threshold, the stop is moved to entry price plus the offset. This locks in at least breakeven on winning trades.
Optimization Tip: Very useful for preserving capital. Can reduce profits if trigger is too aggressive. Works well with Safety Net disabled. Conflicts with trailing stop.
Breakeven Trigger (Ticks/Cents in Profit)
Default: 6
Range: 1-1000
Description: The amount of profit (in ticks/cents) required before the stop is moved to breakeven. Too small (2-3 ticks) may lock in breakeven too early, causing stops to trigger on minor pullbacks. Too large (15+ ticks) defeats the purpose of risk reduction.
Optimization Tip: Should be at least 1.5-2x your initial stop distance. For ES futures: 6-10 ticks. For stocks: 0.10-0.20% of price. Backtest to find optimal balance.
Breakeven Offset (Ticks/Cents)
Default: 1
Range: 0-100
Description: Additional buffer beyond entry price where the breakeven stop is placed. Setting to 0 means stop at exact entry. Setting to 1-2 ticks ensures a small profit if stopped out, covering commissions.
Optimization Tip: 1-2 ticks recommended to cover commissions and slippage. For futures: 1 tick. For stocks: 1-5 cents depending on commission structure.
Position Size Mode
Default: Contracts/Shares
Options: Contracts/Shares, USD/Dollars
Description: Determines how position size is calculated. Contracts/Shares mode uses a fixed quantity. USD/Dollars mode calculates position size by dividing dollar amount by current price, allowing consistent dollar risk across different price levels.
Optimization Tip: Use Contracts/Shares for futures and small accounts. Use USD/Dollars for stocks and larger accounts to maintain consistent position sizing.
Quantity (Contracts/Shares)
Default: 1
Range: 1-10000
Description: When using Contracts/Shares mode, this is the fixed quantity traded on each signal. For futures contracts, typically 1-5. For stocks, can be hundreds or thousands depending on account size and stock price.
Optimization Tip: Start with 1 contract/share for testing. Scale based on account size and risk tolerance. Never risk more than 1-2% of account per trade.
Dollar Amount (for USD mode)
Default: 10000
Range: 100+
Description: When using USD/Dollars mode, this is the dollar amount to allocate to each trade. Position size is calculated as: Dollar Amount ÷ Current Price. This keeps position value consistent regardless of price changes.
Optimization Tip: Set based on total account size and number of positions. If trading multiple instruments with $50k account, consider $10k-$15k per position.
Best Timeframes: 15-minute, 30-minute, 1-hour, 4-hour, and daily charts tend to produce the most reliable signals
Lower Timeframes (5min): Reduce "Bars Up/Down Required" to 1, tighten stops, reduce "Max Wait Bars" to 5-6
Higher Timeframes (Daily): Can increase "Bars Up/Down Required" to 3, widen stops, increase "Max Wait Bars" to 12-15
Multi-Timeframe Approach: Use daily chart for trend direction, then trade on 1-hour chart in that direction
Trending Markets
Lower oversold/overbought levels to 15/85 to catch stronger extremes
Increase 9-3 trigger filters: Long max to 60-70, Short min to 30-40
Keep 60-10 extreme filter enabled and strict (90/10)
Use wider stops (ATR with 2.5-3.0 multiplier or swing-based)
Range-Bound Markets
Raise oversold/overbought levels to 25/75 for more frequent signals
Keep 9-3 trigger filters moderate (45/55)
Relax 60-10 extreme filter (95/5) or disable
Use tighter stops to preserve capital during whipsaws
Volatile Markets
Lower oversold/overbought to 15/85 to avoid false signals
Increase "Bars Up/Down Required" to 3 for confirmation
Use ATR-based stops with 2.5-3.0 multiplier
Enable breakeven stop to protect against sudden reversals
Conservative Setup (Higher Win Rate, Lower Frequency)
Oversold/Overbought: 15/85
Bars Up/Down: 3
Max Wait Bars: 10
9-3 Triggers: 40/60
60-10 Filter: Enabled, 90/10
Aggressive Setup (Lower Win Rate, Higher Frequency)
Oversold/Overbought: 25/75
Bars Up/Down: 1-2
Max Wait Bars: 12
9-3 Triggers: 60/40
60-10 Filter: Disabled or 95/5
Balanced Setup (Recommended Starting Point)
Oversold/Overbought: 20/80
Bars Up/Down: 2
Max Wait Bars: 8
9-3 Triggers: 50/50
60-10 Filter: Enabled, 90/10
Safety Net Priority: The Safety Net exit often provides the best risk-reward. Keep it enabled and set to match entry levels (20/80)
Choose One Exit Method: Don't combine Safety Net, Trailing Stop, and Breakeven Stop - they can conflict. Pick the one that fits your style
Safety Net Alone: Best for swing trading, captures full rotation
Breakeven + Safety Net: Good middle ground, protects capital while allowing profits
Trailing Stop: Best for strongly trending markets, disable Safety Net
ES Futures (E-mini S&P)
Timeframes: 15min, 30min, 1hour
Stop: Swing-based, 2-4 tick offset
Settings: 20/80 levels, 2 bars, Safety Net enabled
Breakeven: 8-10 ticks profit, 1 tick offset
Stocks (SPY, QQQ, Tech Stocks)
Timeframes: 30min, 1hour, 4hour, Daily
Stop: Swing-based or ATR (2.0 multiplier)
Settings: 20/80 or 15/85 for large caps, Safety Net enabled
Position sizing: USD mode with appropriate dollar allocation
Forex Pairs (EUR/USD, GBP/USD)
Timeframes: 1hour, 4hour, Daily
Stop: ATR-based (2.0-2.5 multiplier) due to 24hr trading
Settings: 20/80, 2-3 bars confirmation
Watch for high volatility during major news events
1% Rule: Never risk more than 1-2% of total account value on a single trade
Calculate Risk: Risk per trade = (Entry Price - Stop Price) × Position Size
Example: $50,000 account, 1% risk = $500 max loss per trade. If stop is 10 ticks ($125 per contract), maximum 4 contracts
Scale In: Consider splitting position into 2-3 entries if signal is very strong
Never Disable Stops: Always have a stop loss in place, even if using Safety Net exits
Don't Move Stops Against You: Never widen a stop to avoid being stopped out - accept the loss
Give Stops Room: Stops should be beyond normal market noise. Too-tight stops lead to death by 1000 cuts
Stop Placement Logic: Use swing points or ATR - these respect market structure
Let Winners Run: Safety Net exit allows full rotation - don't exit early on small profits
Cut Losers Fast: If stop is hit, accept it and move on. Don't revenge trade
Maximum Daily Drawdown: Set a daily loss limit (e.g., -2% of account). Stop trading if hit
Consecutive Losers: After 3 consecutive losses, step away and review your parameters
Sufficient Data: Test on at least 6-12 months of data, preferably 2+ years
Include Different Market Conditions: Ensure your test period includes trending, ranging, and volatile markets
Walk-Forward Testing: Optimize on 70% of data, verify on remaining 30%
Avoid Over-Optimization: If changing a parameter by 1 drastically changes results, it's over-fitted
Key Metrics: Focus on win rate, profit factor (>1.5), max drawdown (<20%), and Sharpe ratio (>1.0)
Trading Against Strong Trends: Keep 60-10 extreme filter enabled to avoid this
Using Too-Tight Stops: Results in high win rate but poor profit factor
Chasing Every Signal: Quality over quantity - wait for proper setups
Ignoring Market Context: Be aware of major news events, earnings, Fed announcements
Changing Parameters Mid-Stream: Give your settings at least 30-50 trades before adjusting
Position Size Too Large: Start small, scale up as you prove profitability
Setup: Market sells off, all four stochastics drop below 20 → Strategy becomes armed
Trigger: Within 8 bars, all oscillators begin rising together for 2 consecutive bars → Long entry
Protection: Stop placed at 5-bar swing low minus offset
Exit: Position runs higher, 9-3 stochastic reaches 80 → Safety Net exit
Result: Captures the full rotation from oversold to overbought
Setup: All stochastics reach oversold (< 20) → Strategy armed
Wait: Market consolidates, oscillators remain near 20 but don't all rise together
Timeout: After 8 bars (max wait), strategy disarms without entry
Result: No trade taken - avoided potentially weak setup
Setup: All stochastics reach oversold → Armed
Rapid Move: Market bounces quickly, 9-3 stochastic shoots up to 65
Trigger Attempt: All oscillators rising together, but 9-3 now at 65 (exceeds longMax93OnTrigger of 50)
Result: Trade blocked - avoided chasing momentum that already ran too far
Market Context: Strong downtrend, 60-10 stochastic at 8 (extreme bearish)
Setup: Short-term bounce causes all oscillators to reach oversold → Armed for long
Trigger Attempt: All oscillators begin rising, all other conditions met
Blocked: 60-10 at 8 is below blockLongIf6010Below threshold of 10
Result: No trade - avoided counter-trend trade in strong downtrend
Entry: Perfect quad rotation long entry at 4500, swing stop at 4490
Initial Move: Market rallies to 4510 (+10 points profit)
Reversal: Sudden sell-off pushes price down through stop at 4490
Result: -10 point loss, but risk was managed. Move on to next setup
Entry: Long at 4500, breakeven enabled with 6-tick trigger
Rally: Price reaches 4506 (+6 ticks) → Breakeven stop activated at 4501
Pullback: Market retraces and hits 4501
Result: +1 tick profit (covers commissions), capital preserved for next trade
First Signal: Quad rotation long triggered and executed → Position entered, latched set
Second Attempt: Market pulls back, all oscillators again reach oversold
Blocked: Latch mechanism prevents re-arming while still in first position
Safety Net Exit: 9-3 reaches 80, position closed → Latch reset
Result: Strategy can now arm again for next cycle
The Quad Rotation Strategy provides a sophisticated, multi-timeframe approach to momentum trading with built-in risk management and filters to avoid common pitfalls. Success with this strategy requires:
Proper parameter tuning for your specific instrument and timeframe
Disciplined risk management with appropriate position sizing
Thorough backtesting across different market conditions
Patience to wait for quality setups rather than forcing trades
Continuous monitoring and adjustment as market conditions evolve
1. Initial Setup (Week 1)
Start with default parameters on 1-hour chart
Backtest on 12 months of data for your chosen instrument
Review key metrics: win rate, profit factor, max drawdown
2. Optimization (Week 2-3)
Adjust oversold/overbought levels based on market type
Fine-tune stop loss method and parameters
Test different exit strategies (Safety Net vs Trailing vs Breakeven)
3. Paper Trading (Week 4-8)
Trade in real-time with paper/sim account
Track emotional responses and discipline
Verify backtest results hold in live market conditions
4. Live Trading (Month 3+)
Start with minimum position size (1 contract/100 shares)
Scale up only after 30+ profitable trades
Keep detailed trade journal for continuous improvement
For questions, optimization assistance, or to share your results with the trading community, consider:
Maintaining a detailed trading journal to track performance
Recording chart screenshots of all entries and exits for review
Regularly reviewing weekly and monthly performance metrics
Adjusting parameters seasonally as market behavior changes
Remember: Trading involves significant risk. Never trade with money you cannot afford to lose. Past performance does not guarantee future results. This strategy should be one tool in a comprehensive trading plan that includes proper risk management, diversification, and emotional discipline.
Good luck with your trading!