User Guide – Pennant/Flag Indicator for Metatrader
The following user guide is for the Metatrader Pennant/Flag Indicator.
Start Metatrader and place the indicator onto the required chart. Enter the activation code into the panel. The settings can be refined depending on your chart period and the market you are trading.
Pattern detection is CPU intensive so to reduce processing time the detector will only examine the number of bars set in the “Max. history bars” setting. You can change this to a higher or lower value.
|Maximum shape size (bars)||The minimum width in bars of the pennant/flag shapes|
|Minimum shape size (bars)||The maximum width in bars of the pennant/flag shapes|
|Smoothing factor||The moving average filter. Setting to 1 will use mid prices only|
|Tolerance (0=strictest)||Shape uniformity setting - increase for more shapes|
|Min size for flag/pennant pole (% of depth)||The flagpole should be at least this size|
|Pole max distance (% of shape width)||The flagpole should be no greater than this distance from the shape|
|Pattern type||Choose either flags, pennants or both|
|Maximum slope (0=flat)||Angle constraint on the detected shapes|
|Outlier percent (0=strictest)||Percentage of price bars that can fall outside of the shape|
|Pennant color||Color setting|
|Flag color||Color setting|
|Mid line color||Color setting|
|Text color||Color setting|
|Max. history bars (zero for all)||How many bars to process (to limit processing time)|
Use the “pattern type” option to select between either flags, pennants or both. By default the indicator will detect both pattern types.
The settings are application and chart dependent. To produce “higher quality” but few shapes, reduce the tolerance setting and the outlier setting. To produce higher numbers of shapes, these settings can be dialed up, although this may result in some false detections.
The indicator generates numerical outputs on each detection and these will help analyze the shape better. The pattern type, the flagpole size, the depth and orientation of the shape are all output on each detection. The flagpole size is the distance (in chart points) from the shape’s mid line to the low/high price trailing the shape. The trail distance is controlled by the “Pole max distance” setting. The height of the flagpole can also be used as a filter. This is set as a percentage of the pennant/flag depth – which is the height from highest to lowest corner
Open Metatrader’s data window (CTRL+D) to show the signal values. You can hover with the mouse cursor over any point to display the value in the data window.
The table below lists the output signals.
|Signal/Mode||Name||Description||Free version||License Version|
|0||Pattern Type||1 for pennants, 2 for flags||1||Flagpole||Size of the flagpole in chart points (-ve for above, +ve for below)|
|2||Depth||The pennant/flag depth (high corner to low corner) in chart points|
|3||Orientation||The mid line angle of the pennant/flag in radians|
Return to the pennant/flag indicator product page.