QQQ SOP Backtest w/ Gemini — Strategy by gofelixitous

By gofelixitous

Performance Metrics

Description

QQQ Signal-Linked TQQQ / QQQ / SQQQ Trading Rules SOP 1. System Overview & Core Principles This system uses QQQ Daily Close (DayClose) and Simple Moving Averages (DMA: 20DMA, 50DMA, 100DMA, 200DMA, and 300DMA) as signal inputs to dynamically switch across TQQQ, QQQ, SQQQ, and Cash. Signal & Execution Timing: Aside from the first tranche of STAGE TWO (buying 25% TQQQ at the next trading day's open), all entries, scale-ins, scale-outs, and state transitions are evaluated and executed on QQQ's daily close (DayClose). Position Tagging & Symmetric Exits (Tagging Principle): During bull accumulation, each position tranche is tagged to the specific moving average that triggered its entry. When QQQ closes below a tagged moving average, only the position allocation tied to that moving average is sold into Cash rather than liquidating the entire position at once. Primary Bear Dynamic Channel (STAGE IV PHASE TWO Steps 3–5): Evaluates QQQ's close strictly relative to \max(\text{20DMA}, \text{50DMA}) and \min(\text{20DMA}, \text{50DMA}), without depending on whether 20DMA or 50DMA is numerically higher. Backtest Exclusion Note (Subjective Anti-FOMO Reference): Any PSQ allocation mentioned under STAGE IV PHASE ONE is a subjective reference only and is excluded from formal backtesting. 2. Bull Accumulation & Staged Exits (STAGE ONE – STAGE THREE) Bullish scaling begins when the market is in a bull regime and QQQ closes above 200DMA. 2.1 STAGE ONE: Establish Initial 50% TQQQ Position Scenario Entry Condition (Based on QQQ Daily Close) Action (TQQQ Allocation) DMA Tagging & Next-Step Transition Scenario A Close > 200DMA and 200DMA > 100DMA and 200DMA > 300DMA Buy 50% TQQQ in one step Tag this 50% to 200DMA; STAGE ONE is complete on the same day, advancing to STAGE TWO on the next trading day. Scenario B (Step 1) Close > 200DMA, while 100DMA or 300DMA (or both) is > 200DMA Buy 25% TQQQ initially Tag this 25% to 200DMA; wait for a breakout above the higher DMA to complete the initial 50%. Scenario B (Step 2) Following Step 1, Close > max(100DMA, 300DMA) Buy an additional 25% TQQQ (cumulative 50%) Tag this 25% to \max(\text{100DMA}, \text{300DMA}); once complete, advance to STAGE TWO on the next trading day. Invalidation / Reset Before Reaching 50%: While in Scenario B holding only 25% (before reaching 50%), if QQQ closes below 200DMA, exit all positions to Cash and terminate the current accumulation cycle. 2.2 STAGE TWO: Scale Up to 100% TQQQ Position Trigger Timing: Begins on the next trading day after STAGE ONE is completed (when holding 50% TQQQ). Execution Steps: At Market Open: Buy 25% TQQQ (cumulative 75%). At Market Close: Buy another 25% TQQQ (cumulative 100% TQQQ). DMA Tagging: If entered via Scenario A, the additional 50% added in STAGE TWO is tagged to 200DMA (total 100% tied to 200DMA). If entered via Scenario B, the additional 50% from STAGE TWO plus the 25% from Scenario B Step 2 (total 75% TQQQ) are tagged to the higher moving average \max(\text{100DMA}, \text{300DMA}); the initial 25% TQQQ from Scenario B Step 1 remains tagged to 200DMA. 2.3 STAGE THREE & Staged Bull Exit Rules Holding & Scaling Out: While holding positions, check daily closes against each tagged moving average: If QQQ closes below \max(\text{100DMA}, \text{300DMA}) (under Scenario B): Sell the 75% TQQQ tagged to that higher moving average into Cash, keeping the 25% TQQQ tagged to 200DMA. If QQQ closes below 200DMA: Sell all remaining TQQQ tied to 200DMA into Cash; once TQQQ exposure reaches 0%, exit bull holdings and transition into STAGE IV. 3. Bear & Transition State Machine Below 200DMA (STAGE IV) As soon as QQQ closes below 200DMA, exit bull accumulation/holding and enter STAGE IV. On any subsequent day that QQQ closes back above 200DMA, close all STAGE IV positions and return to STAGE ONE to evaluate bull entry. 3.1 PHASE ONE: Early Breakdown Below 200DMA / Pre-Primary Bear Phase Phase Identification: QQQ closes below 200DMA before PHASE TWO has been activated (initially occurring when 50DMA > 200DMA upon breaking below 200DMA; if 200DMA > 50DMA develops during PHASE ONE without triggering PHASE TWO activation, remain in PHASE ONE while monitoring). Execution Steps: Step 1 (Initial Defense): Hold 100% CASH (Do Nothing); the subjective anti-FOMO note of 25% PSQ is excluded from backtesting. Step 2 (200DMA Above 50DMA & Reclaim of 20DMA): When 200DMA > 50DMA and QQQ closes > 20DMA, buy 100% QQQ. Step 3a / 3b (Drop Below 20DMA Exit): When 200DMA > 50DMA and QQQ closes max(20DMA, 50DMA)): Hold 100% QQQ. Inside Band (min(20DMA, 50DMA) 200DMA: Apply STAGE ONE / STAGE TWO / STAGE THREE bull rules. If Close <= 200DMA: Apply STAGE IV rules (determine PHASE ONE vs. PHASE TWO and the applicable Step based on 200DMA vs. 50DMA alignment and whether 100% SQQQ has been reached). Execute Special Timing Orders: If STAGE ONE (reaching 50% TQQQ) finished on the previous trading day, buy 25% TQQQ at today's open and another 25% TQQQ at today's close. Log Position State: Record active holdings (TQQQ / QQQ / SQQQ / Cash), percentage weights per tranche, and the exit moving average attached to each bull tranche.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView