Donchian Flag Pole Setup

Donchian Flag Pole Setup

Description

The Donchian Flag Pole Setup indicator builds upon the output of the Flag Pole Detector, identifying actionable trading setups for both pullback entries and breakout entries. It uses the detected flag pole as a starting point to define key zones for potential trades and incorporates additional filters to refine the setups. These include validation of pullback levels, constraints using a comparison Donchian Channel, and ensuring setups remain within specific percentage ranges of the secondary channel. This indicator is versatile, supporting a wide range of trading strategies, and is adaptable to various market conditions and timeframes.

Key Features

  1. Integration with Flag Pole Detector: Uses the detected flag pole as the foundation for identifying setups.
  2. Pullback and Breakout Readiness: Highlights pullback levels and breakout zones for flexible entry strategies.
  3. Comparison with Secondary Donchian Channel: Validates setups by ensuring the flag pole and price action fall within a specific percentage range of a comparison Donchian Channel.
  4. Setup Filtering: Filters setups based on minimum and maximum pullback percentages, pullback bar counts, and dynamic flag pole ranges.
  5. Multiple Setup Types: Supports pullback, breakout, and breakout close strategies, with customizable logic for each.
  6. Customizable Parameters: Fine-tune the indicator's behavior, including Donchian Channel periods, pullback thresholds, and plot offsets, to adapt to specific instruments and trading styles.
  7. Visual Signals: Plots key levels, pullback ranges, and breakout points on the chart for enhanced clarity and decision-making.

Tips for Implementation

  • Parameter Optimization: Adjust the Donchian Channel period and pullback percentages to align with your trading timeframe and instrument volatility.
  • Setup Confirmation: Pair this indicator with momentum or volume-based indicators to confirm setup validity.
  • Backtesting: Test the indicator across various market conditions to find optimal settings for pullback and breakout strategies.
  • Timeframe Flexibility: Suitable for both intraday and swing trading, depending on the Donchian Channel periods used.

Parameters

001 Detector Parameters

Donchian Channel Period:

  • Type: int
  • Description: Number of periods used to calculate the Donchian Channel.
  • Default Value: 5
  • Valid Range: Any positive integer greater than or equal to 1.

Load Period:

  • Type: int
  • Description: Number of bars considered for the load phase.
  • Default Value: 2
  • Valid Range: Any positive integer greater than or equal to 1.

Body Average Period:

  • Type: int
  • Description: Number of bars used to calculate the average body size.
  • Default Value: 3
  • Valid Range: Any positive integer greater than or equal to 1.

Pole Min Bars:

  • Type: int
  • Description: Minimum number of bars required in the flag pole.
  • Default Value: 1
  • Valid Range: Any positive integer greater than or equal to 1.

Pole Max Bars:

  • Type: int
  • Description: Maximum number of bars allowed in the flag pole.
  • Default Value: 4
  • Valid Range: Any positive integer greater than or equal to 1.

002 Setup Parameters

Setup Type:

  • Type: Enum (Pullback, Formation Breakout, Breakout Close)
  • Description: The type of setup the indicator will focus on (pullback or breakout logic).
  • Default Value: Formation Breakout

Min Pullback Bars:

  • Type: int
  • Description: Minimum number of bars for a valid pullback.
  • Default Value: 1

Max Pullback Bars:

  • Type: int
  • Description: Maximum number of bars allowed in the pullback.
  • Default Value: 5

Comparison DC Period:

  • Type: int
  • Description: Period of the comparison Donchian Channel.
  • Default Value: 100

Pole DC Range Min Percentage:

  • Type: int
  • Description: Minimum percentage of the flag pole relative to the comparison Donchian Channel range.
  • Default Value: 10

Pole DC Range Max Percentage:

  • Type: int
  • Description: Maximum percentage of the flag pole relative to the comparison Donchian Channel range.
  • Default Value: 50

Min Pullback Percentage:

  • Type: int
  • Description: Minimum percentage pullback level relative to the flag pole.
  • Default Value: 30

Max Pullback Percentage:

  • Type: int
  • Description: Maximum percentage pullback level relative to the flag pole.
  • Default Value: 100

Plot Offset (Ticks):

  • Type: int
  • Description: Distance between plotted signals and the high or low point of the bar, measured in ticks.
  • Default Value: 5

Plots

IndicatorSignalUp:

  • Type: Plot
  • Style: Green Triangle Up
  • Description: Marks a confirmed bullish setup, either as a pullback or breakout.

IndicatorSignalDown:

  • Type: Plot
  • Style: Red Triangle Down
  • Description: Marks a confirmed bearish setup, either as a pullback or breakout.

SignalUpUpperLevel:

  • Type: Plot
  • Style: Green Hash Line
  • Description: Denotes the upper level of the bullish setup's flag pole.

SignalUpLowerLevel:

  • Type: Plot
  • Style: Green Hash Line
  • Description: Denotes the lower level of the bullish setup's flag pole.

SignalDownUpperLevel:

  • Type: Plot
  • Style: Red Hash Line
  • Description: Denotes the upper level of the bearish setup's flag pole.

SignalDownLowerLevel:

  • Type: Plot
  • Style: Red Hash Line
  • Description: Denotes the lower level of the bearish setup's flag pole.