OPEN-SOURCE SCRIPT

Dr. Barbara Star: Dual Strategies Combined [Merged] - gemini

136
Dr. Barbara Star: Dual Strategy Suite (Merged) [mostly constructed by gemini]

Overview
This script integrates two distinct but complementary trading methodologies developed by Dr. Barbara Star: "Capture Direction & Momentum" and "Profit with Dual Oscillators & Bands." While both strategies utilize price channels to filter noise, they approach entry and exit timing from different angles—one focusing on momentum shifts (Stochastic/EMA) and the other on cyclical price deviations (DPO/Bollinger Bands).

This tool allows the user to run either strategy independently or combine them to find high-confluence setups where momentum and cyclical structure align.

Strategy A: Capture Direction & Momentum

Source: Capture Direction And Momentum

1. Purpose & Theory
The goal of this method is to filter out the "noise" of choppy markets and identify the specific point where price direction aligns with momentum strength. It moves away from trying to catch exact tops or bottoms and instead focuses on catching the "meat" of the trend (continuation).


2. Implementation

Structure (The Channel): A 13-period SMA of the Highs and Lows creates a "No Trade Zone". When price is inside this channel, the market is considered directionless.



Direction (5 EMA): A fast 5-period EMA acts as a directional trigger. When it breaks outside the SMA channel, it signals acceleration.



Momentum (Modified Stochastic): A Slow Stochastic (14,2) is used, but with a crucial modification: the overbought/oversold levels are shifted to 40 and 60 (instead of 20/80).


3. How to Use It
The "Trend Zones" (Background Colors):


Green Background (Bullish): The 5 EMA is above the channel AND the Stochastic is > 60. This is the "Go" zone.


Red Background (Bearish): The 5 EMA is below the channel AND the Stochastic is < 40.

Yellow Background: The "No Trade Zone." The price is consolidating, or the indicators disagree.


The Continuation Signal (Marked by "U" or "D"):

Why it matters: This is the most powerful setup in the system. It detects when price pulls back (retracement) but momentum remains strong.

The Signal: If the 5 EMA dips back into the SMA channel (weakness) but the Stochastic stays above 60 (strength), a blue "U" (Up) marker appears. This indicates the pullback is likely a buying opportunity, not a reversal. Conversely, a yellow "D" appears in downtrends if Stoch stays below 40.


Exits (Marked by "X"):

Signals to take profit when the 5 EMA closes back inside the channel and the Stochastic crosses back into the neutral 40–60 zone.

Strategy B: Dual Oscillators & Bands

Source: Profit With Dual Oscillators & Bands

1. Purpose & Theory
This strategy uses "Dual Bollinger Bands" to define the volatility structure of the trend and "Dual Detrended Price Oscillators" (DPO) to time the entries based on cycle shifts.

2. Implementation
Structure (Dual Bands):

Inner Bands (1 SD): These define the "Trend Channel." Strong trends tend to ride between the 1 SD and 3 SD bands.


Outer Bands (3 SD): These represent extremes (containing 99.5% of price action). Hits here often signal exhaustion.


Timing (Dual DPOs):


Long Oscillator (DPO 20): Identifies the broader trend direction (Positive = Bullish).


Short Oscillator (DPO 9): Identifies shorter-term timing and potential divergences.


3. How to Use It
Identifying the Trend State:


Strong Uptrend: Price holds above the Upper Inner Band (1 SD).


Strong Downtrend: Price holds below the Lower Inner Band (1 SD).


Transition/Neutral: Price is stuck between the Upper and Lower Inner bands.

Entry Signals (Triangles on Chart & Circles in Pane):

Aggressive Entry: When the fast DPO 9 crosses zero. This signals early momentum shifts.


Conservative Entry: Wait for the slow DPO 20 to cross zero, confirming the broader trend has shifted.

Visuals: The script plots triangles on the main chart when these cross. In the lower pane, a Blue Circle indicates a bullish cross and a Yellow Circle indicates a bearish cross.

Continuation Setup:

Similar to Strategy A, look for moments where the DPO 9 dips below zero (pullback) while the DPO 20 remains above zero (trend intact). This is often a reload opportunity.


Combined Mode: The "Power Couple"
When selecting "Both" in the settings, the indicator merges these tools for maximum confirmation:

Visual filtering: The lower pane automatically scales the DPO lines to fit inside the 0–100 Stochastic range (centering the DPO zero line at 50). This allows you to read both momentum and cycles in a single glance.

Confluence Trading:

Look for the Background to turn Green (Strategy A Trend) coincident with a Blue Triangle/Circle (Strategy B Momentum Cross).

Use the Inner Bollinger Bands (Strategy B) as your trailing stop-loss while riding the SMA Channel (Strategy A) trend.

Reference Settings
Strategy A: SMA Channel (13), EMA (5), Stochastic (14, 2, 40/60 levels).

Strategy B: Bollinger Bands (20 SMA, 1.0 & 3.0 deviations), DPO (9 & 20).

Sources: of the methodologies
1-Stocks & Commodities V. 32:7 (10-16): Profit With Dual Oscillators & Bands by Barbara Star, PhD
2-Stocks & Commodities V. 43:12 (8–12): Capture Direction And Momentum by Barbara Star, PhD

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.