YFX Wing Patterns


<data image>
<data image>

The Wing Patterns indicator scans for many different kinds of Patterns using an XABCD structure. The term Wing Pattern is used to refer to all types of patterns based on a general XABCD structure, which is plotted in an alternate high-low extreme form.

In other words, assume that point X is started at a low point on the chart. The point A is plotted at the next highest point within a certain number of bars. This certain number of bars is called the depth level. In this example, point B would be plotted at the next lowest point for a particular depth. Following the flow, point C is at next high and point D is at the next low. If you connect these points on a chart, it usually looks like the wings of a butterfly, thus the name Wing Pattern.

These patterns fit very well with the Harmonic patterns. There are many patterns that can be displayed in this indicator. Pre-defined patterns include the following:

  • Gartley
  • Pattern 5-0
  • AB=CD
  • Bat
  • Butterfly
  • Crab
  • Cypher
  • Deep Crab
  • Shark
  • Three Drives
  • Wolfe Wave

Other patterns that can be searched are stored in an external file. Users can also define their own patterns by adding lines of data to the external file. Note that patterns can be changed or removed from the external file.



PARAMETERS


The Wing Patterns indicator has many configurable parameters. This allows for all aspects of the indicator to be changed for the user’s preferences. By default, the indicator is designed to work without any changes by the user. The parameters are divided into the following categories:

  • Yancy Indicator Parameters
  • Wing Pattern Basic Parameters
  • Factor Parameters
  • Search Pattern Parameters
  • Custom Pattern Parameters
  • Wolfe Wave Parameters
  • Fibonacci Parameters
  • Size Parameters
  • Font Parameters
  • Color Parameters
  • Button Parameters
  • Display Parameters
  • Signals Parameters
  • Message Parameters
  • Quite Time Parameters
  • Message Info Parameters
  • Debug Parameters
It should be noted that the user does not have to change any parameters for the indicator to work. All parameters have default values that have the lowest impact on the indicator and user. The Wing Patterns indicator is designed to work perfectly by just placing it on a chart.



Yancy Indicator Parameters


These parameters control the overall functionality of the indicator. More specifically, it controls how the Wing Patterns indicator is used within the trading terminal. The parameters in this section are:

IndicatorName – Default: Wing Patterns
This is the indicator name that is displayed in the chart data window. Changing this value does not impact the indicator’s calculations.
IndicatorOffset – Default: 0
The indicator calculations are made on the current data bar by default. This value can change the default and force calculations to be made based on previous bars. It is recommend to leave this parameter set to the default value.
CalculationIntervalSeconds – Default: 300
o Seconds between calculations. All Wing Pattern calculations are performed on a certain interval, as opposed to every tick. Care should be taken when changing this parameter. Small values may cause the trading terminal to slow down as calculations may cause a constant load. Generally, it is not necessary to perform calculations more than once per period.



Wing Pattern Basic Parameters


The wing pattern basic parameters control how the indicator is calculated and used. Parameters in this section are:

UseWingPatterns – Default: false
Other YFX indicators can use data in the Wing Patterns indicator. This functionality can be enabled by setting this parameter to ‘true’. By default, the integration is disabled.



Factor Parameters


The factor parameters set global constant values used throughout the Wing Patterns indicator. Parameters in this section are:

MaxPatternAnalysisPeriods - Default: 1000
Maximum number of periods over which to perform pattern analysis. Care should be taken with this parameter as overly large values may cause lag in the trading terminal.
PatternMinDepth - Default: 10
Minimum number of bars between wing pattern points. This parameter sets the smallest length of any segment along the XABCD plot.
PatternMaxDepth - Default: 50
Maximum number of bars between wing pattern points. This parameter sets the largest length of any segment along the XABCD plot.
RetracePriceMargin - Default: 0.05
Price parameters of the pattern will differ from each other not more than by this value.
RetraceTimeMargin - Default: 0.20
Time parameters of the pattern will differ from each other not more than by this value.



Search Pattern Parameters


The search pattern parameters control which patterns are analyzed and search during pattern analysis. Parameters in this section are:

SearchOnlyCurrentPatterns - Default: true
Search for patterns with current formation as opposed to patterns with future end points.
SearchGartley - Default: true
Search for classic Gartley patterns if true.
SearchPattern50 - Default: true
Search for 5-0 patterns if true.
SearchABCD - Default: true
Search for AB=CD patterns if true.
SearchBat - Default: true
Search for Bat patterns if true.
SearchButterfly - Default: 50.0
Search for Butterfly patterns if true.
SearchCrab - Default: 50.0
Search for Crab patterns if true.
SearchCypher - Default: 50.0
Search for Cypher patterns if true.



Custom Pattern Parameters


The custom pattern parameters control how user-defined patterns are treated. Parameters in this section are:

SearchCustomPatterns - Default: false
Search for user-defined patterns read from external file, which is located in the MetaTrader pre-determined file location. If the file does not exist, then it will be created with some well-known user-defined patterns. Note: There is a maximum number of user-defined patterns that can be defined. Currently, the maximum is 100.
CustomPatternBaseFileName - Default: "CustomWingPatterns"
Base name of file containing custom patterns. The exact file name will look similar to file name "YFX_CustomWingPatterns.csv", where the base name is stored in this parameter.
FieldDelimiter - Default: “,”
The field delimiter used in the custom pattern file. There should be no need to change this parameter as it works by default for the file generated by indicator.
DoPatternFileCreation - Default: false
If true, then the external custom pattern data file is created if it does not exists. The file is created in the MetaTrader location for files. Else no file is create.



Wolfe Wave Parameters


The Wolfe Wave (WW) parameters are used to configure how the WW patterns are managed in the indicator. Parameters in this section are:

SearchWolfeWave - Default: false
Search for Wolfe Wave patterns if enabled.
DisplaySweetZoneStart - Default: false
If enabled, then the starting point of the WW sweet zone is displayed.
DisplaySweetZoneEnd - Default: false
If enabled, then the end point of the WW sweet zone is displayed.
ColorSweetZoneStart - Default: clrBlue
Color in which to draw sweet zone start.
ColorSweetZoneEnd - Default: clrDarkGreen
Color in which to draw sweet zone end.
WolfeWaveWidthXC - Default: 3
Width of lines used to draw WW point trace.
ColorWolfeWaveXC - Default: clrLime
Color for the WW XC (1-4) trend line.
ColorWolfeWaveProjection– - Default: clrYellow
Color for line projection from point 5 (D).



Fibonacci Parameters


The Fibonacci parameters are used to configure how Fibonacci retracements are managed in the indicator. Parameters in this section are:

DisplayFiboTool - Default: true
Display the Fibonacci tool.
DisplayFiboMajorLevels - Default: true
Display the most important Fibonacci levels.
DisplayFiboMinorLevels - Default: false
Display the minor Fibonacci levels.
DisplayFiboExtensionLevels - Default: true
Display the Fibonacci levels greater than 100%.
ColorFibo - Default: clsSilver
Color of the Fibo lines.
WidthFibo - Default: 1
Width of Fibonacci tool lines.



Size Parameters


The size parameters are used to configure the size of lines used to draw patterns on the chart. Parameters in this section are:

WidthDefault - Default: 2
Default width of line used to draw objects.
WidthRetraceLine - Default: 1
Width of line used to draw retrace lines.



Font Parameters


The font parameters are used to manage the fonts used in the indicator.

DefaultFontName – Default: "Verdana"
Font used to display text for indicator. Can be any font available on your system.
DefaultFontSize – Default: 8
Size of font used to display the control panel information.
HeaderFontSize – Default: 12
Size of header font drawn on screen.



Color Parameters


Colors can be strongly preferred by users. The Wing Patterns indicator allows all colors to be changed according to each user’s preference. The specific colors do not change the underlying calculations of the indicator. Parameters in this section are:

ColorDefaultFont - Default: clrSilver
Color of font drawn on screen.
ColorHeaderFont - Default: clrSteelBlue
Color of header font drawn on screen.
ColorWing - Default: clrMidnightBlue
Color for the wing portions of patterns.
ColorRetracement - Default: clrLime
Color of the retracements line.
ColorLine - Default: clrSkyBlue
Color in which to draw patterns lines.
ColorDisabledObject - Default: clrDimGray
Color in which disabled objects will be drawn.



Button Parameters


The button parameters are used to configure how control panel GUI objects are managed in the indicator. Parameters in this section are:

ButtonWidth - Default: 25
Width of button drawn on screen.
ButtonHeight - Default: 16
Height of button drawn on screen.
TextLabelWidth - Default: 75
Size of label text drawn on screen.
TextObjectWidth - Default: 100
Display the Fibonacci tool.



Display Parameters


The display parameters control how wing patterns are displayed on the chart. Parameters in this section are:

DisplayPatternTrace - Default: false
Display the outline of a pattern. This parameter may be used to view the underlying structure of points used to evaluate Wing Patterns. This is the lines connecting all the XABCD points. Normally, this view is not necessary for the indicator.
DisplaySignals - Default: false
Display BUY/SELL signals if true. These are markers placed on the chart at points where signals are triggered.
DisplayPanelHeader - Default: true
Display panel selector header if true.
DisplayPanelSymbol - Default: true
Display panel symbol information if true.
DisplayPanelPeriod - Default: true
Display panel timeframes if true.
DisplayPanelInformationLines - Default: true
Display the candle pattern information lines if true.
PanelDisplayCorner - Default: WP_CORNER_TOP_LEFT
Display the candle pattern information lines if true.
StartCoordinateX - Default: 5
Starting X-coordinate for the Wing Pattern control panel. The value of this parameter is specified in pixels.
StartCoordinateY - Default: 75
Starting Y-coordinate for the Wing Pattern control panel. The value of this parameter is specified in pixels.
RowBufferHeight - Default: 2
Amount of space to place between rows of text on the Wing Pattern control panel. The value of this parameter is specified in pixels.



Signals Parameters


The signals parameters are used to manage how trade signals are treated by the indicator. Parameters in this section are:

ColorBuy - Default: clrAqua
Color for drawing BUY signals.
ColorSell – Default: clrMagenta
Color for drawing SELL signals.
WidthTradeSignal – Default: 1
Size of signal markers.
WidthPatternLine – Default: 2
Width of line used to draw patterns.



Message Parameters


The message parameters determine how the indicator notifications are conveyed to the user. There are several options and the user can select which ones to use at any time. Multiple options can be enabled simultaneously.

DoShowComments - Default: false
Messages can be displayed in the comment section on the chart. By default, this option is disabled. Users can enable the option by setting parameter to ‘true’.
DoShowAlerts - Default: false
Messages can be displayed in the alert pop-up window on the terminal. By default, this option is disabled. Users can enable the option by setting parameter to ‘true’.
DoMailMessages - Default: false
Messages can be emailed to users if this option is enabled. By default, the option is disabled but can be enabled by setting the parameter to ‘true’. It is important that the user ensures that the mail options are configured and working in the trading terminal.
DoPushNotifications - Default: false
Messages can be pushed to a user’s mobile phone application. This option is disabled by default but can be enabled by setting the parameter to ‘true’. It is important that push notifications be configured correctly in the user’s trading terminal and mobile application.
DoPrintJournal - Default: false
Messages can also be written in the terminal’s journal. These messages are disabled by default but can be enabled by setting the parameter to ‘true’.
DoPrintFile - Default: false
Messages can be written to an external file on disk in the ‘Files’ folder. By default, this option is disabled by default but can be enabled by setting the parameter to ‘true’.
DefaultMessageFileName - Default: YFX_Messages.log
If the print to file option is enabled, then message notifications are written to a file with this name in the ‘Files’ folder.
DoSoundMessage - Default: false
Sounds can be played when a notification occurs. By default, this option is disabled but can be enabled by setting the parameter to ‘true’.
DefaultSoundFileName - Default: expert.wav
If the sound message option is enabled, then this sound file is played when notifications are generated.



Quiet Time Parameters


The quiet time parameters control when notification messages are conveyed to the user. Parameters in this section specify a time period when all notifications are disable. Settings in this section override the message parameters and alert parameters. No notification will be sent during quiet time.

DoQuietTime - Default: false
The quiet time process can itself be enabled or disable. It is disabled by default and that means that all alert message notifications will be sent when they are generated. Quiet time can be enabled by setting this parameter to ‘true’.
QuietTimeStart - Default: 01:00
If quiet time is enabled, then this parameter sets the start time of the period. No alert message notifications will be sent after this time. This parameter is only used if quiet time is enabled. It is ignored if quiet time is disabled.
QuietTimeEnd - Default: 07:00
If quiet time is disabled, then this parameter sets the end time of the period. No alert message notifications will be sent before this time. The parameter is only used if quiet time is enabled. It is ignored if quiet time is disabled.



Message Info Parameters


The message info parameters are used to configure if internal statistics are maintained by the indicator. The information is generally not needed by the user. Thus, it is recommended to leave the options disabled.

EnableInfo - Default: false
This parameter allow the statistics to be maintained by the indicator. It is disable by default but can be enabled by setting its value to ‘true’. If enabled, then statistical information will be maintained internally. That information would then be conveyed to user when the indicator starts and stops.



Debug Parameters


Sometimes it may be necessary to debug the indicator. Debugging can be configured with the parameters in this section. Debugging would cause a great number of messages to be generated if enabled. It is highly recommended to leave debug disabled.

EnableDebug - Default: false
Debugging can be enabled or disabled. By default, it is disabled and no debugging information is generated. Debugging can be enabled by setting this parameter to ‘true’. It is highly recommended to leave this option disabled as the amount of debug logging can be huge and slow down the trading terminal.
DebugLevel - Default: DEBUG_LEVEL_NONE
The amount of debugging information can be configure. By default, no information is generated. This is a drop down list and the user can select any one of the values in the list.
UseDatedLogs - false
If debugging is enabled, the information is written to an external file. The name of the file can be coded to contain the date of the log file.

Retracements
Pre-defined retracements used by indicator.
Retrace Calculation Category Notes
0.000 0 Major -
0.090 0.236 – 0.146 Minor -
0.146 0.236 / 1.618 Minor -
0.236 0.382 / 1.618 Major -
0.382 0.618 / 1.618 Major -
0.414 SQRT(2.00) / 2 Major Sacred square
0.486 0.618 * 1.50 Minor -
0.500 1 / SQRT(4) Major -
0.557 Reciprocal of 1.732 Minor -
0.618 1.00 / 1.618 Major One of the most important Fibonacci levels
0.685 0.618 ^ 0.786 Minor -
0.707 SQRT(2.00) / 2 Minor Sacred cut
0.764 - Minor -
0.786 1 / 1.272 Minor -
0.854 - Minor -
0.886 SQRT(0.786) Minor -
1.000 1.618 / 1.618 Major -
1.128 - Extension -
1.130 SQRT(1.27) Extension -
1.236 - Extension -
1.272 SQRT(1.618) Extension -
1.414 SQRT(2.00) Extension Diagonal of a square
1.460 1.618 ^ 0.786 Extension -
1.618 - Major Phi - Golden Ratio
1.732 SQRT(3.00) Extension Diagonal of a cube
1.886 SQRT(0.786) Extension -
1.902 - Extension Diagonal of a Golden Rectangle
2.000 SQRT(4.00) Extension -
2.236 SQRT(5.00) Extension diagonal of two squares
2.618 1.618 * 1.618 Extension -
3.140 Pi Minor -
3.330 2.618 * 1.272 Minor -
3.618 - Extension -
4.236 2.618 * 1.618 Minor -
6.854 4.236 * 1.618 Minor -
Screen Image 1
Overview
<data image>
Screen Image 2
Control Panel
<data image>
Screen Image 3
Parameters
<data image>
Screen Image 4
Example Pattern: Gartley (Bullish)
<data image>
Screen Image 5
Example Pattern: Wolfe Wave (Bullish)
<data image>
Screen Image 6
Example Pattern: Butterfly (Bullish)
<data image>
Screen Image 7
Example Pattern: Black Swan (Bearish)
<data image>
Screen Image 8
Example Pattern: Retracement Ratios
<data image>
Buy from MQL Market
<data image>