IntradayFlagFormation

Description

The Intraday Flag Formation study helps identify occurrences of the well-known Flag pattern of certain shape on intraday charts. The criteria of the flag shape that are said to improve the performance of the pattern were described by Markos Katsanos in his article "Detecting Flags in Intraday Charts." Those criteria form the base for the Intraday Flag Formation strategy.

By default, the study searches for flags whose parameters conform to the following (all numbers are customizable, see the Input Parameters section):

  • The flag pole height is at least 5.5 times the average true range (ATR) and its formation takes no longer than 23 bars;

  • The flag itself is not wider than 2.5 times the ATR and its formation takes no longer than 15 bars;

  • There is an uptrend before the flag formation and it persists for at least 70 bars;

  • The ATR has changed by at least 5% during the flag formation.

Input Parameters

max flag length The maximum number of bars since the pole top.
max flag height The maximum flag width, expressed in ATRs.
max pole length The maximum duration of the pole formation, in bars.
min pole height The minimum pole length (bottom-to-top), expressed in ATRs.
up trend length The minimum duration of the preceding uptrend, in bars.
min atr percent change The minimum ATR percent change during the formation.

Plots

Flag

Indicates flag occurrences on chart.

Further Reading

1. "Detecting Flags In Intraday Charts" by Markos Katsanos. Technical Analysis of Stocks & Commodities, December 2014.

Example*

*For illustrative purposes only. Not a recommendation of a specific security or investment strategy.

You may also like
GoldenCrossBreakouts
The Golden Cross Breakouts strategy is a moving average-based technical indicator proposed by ...
SwingThree
The Swing Three strategy is a basic momentum/breakout trading system developed by Donald ...