YFX Advanced EMA


<data image>
<data image>

The Advanced EMA indicator implements an exponential moving average with many additional features. First, the EMA is color-coded to indicate how far away the price is from the EMA, i.e. the significance of the indicator. This color-coding is fully configurable with different colors and distance ranges. This Advanced EMA has many features and configurations that set it far above standard EMA indicators usually provided by most trading platforms.

There are three types of indications provided by the Advanced EMA. First, the EMA is shown and is color-coded. Secondly, the cross point where the price crosses the EMA is marked. Thirdly, BUY/SELL indications are shown. Any of these indications can be turned on or off.

Color-coding the EMA allows you to easily determine how far away the price is from the EMA. This marks the significance of the current price action. Levels of significance are measured in three levels:

  • Weak
  • Medium
  • Strong
Each level can be measured on the up side or on the down side. These levels and colors can be totally configured in the indicator parameters as described in a below parameters section.

The second indication provided by the Advanced EMA is the marking of points where the price crosses the EMA. Often, the price crossing the EMA is used as a signal that a change in trend has occurred. These crossings are shown on the indicator and can be configured as described in the below parameters section.

The third Advanced EMA indication is about marking a change in direction in prices. Traditionally, people refer to them as BUY or SELL signals. It should be noted that these are not recommendations to actually trade on the indications. They are more of an indication that price directional trend is likely to change. These BUY/SELL indications can be configured as described in the below parameters section.

Advanced messaging is also included in the indicator. Messages can be sent for trade signals, crosses, and range reaches, i.e. the EMA enters once to significance zones. These messages can be sent through several methods:

  • Show in comments section on chart
  • Display in alert box
  • Send message through email
  • Send push notification
  • Write an entry in the terminal journal
  • Write an entry in an external file
Any of these methods can be used in any combination as well as turned on or off. To assist with managing notifications, a quiet period can be implemented. For example, you can set the night hours as a quiet period so you can get some sleep.



PARAMETERS


The Advanced EMA has many configurable parameters. This allows for all aspects of the indicator to be changed for the user’s preferences. The parameters are divided into the following categories:

  • Yancy Indicator Parameters
  • EMA Parameters
  • EMA Range Parameters
  • EMA Display Parameters
  • Color Parameters
  • Size Parameters
  • Alert Parameters
  • Message Parameters
  • Quiet 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 Advanced EMA 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 Advanced EMA is used within the trading terminal. The parameters in this section are:

IndicatorName – Default: EMA
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.



EMA Parameters


The EMA parameters control how the underlying EMA is calculated. Parameters in this section are:

UseEMA – Default: false
Other YFX indicators can use data in the Advanced EMA indicator. This functionality can be enabled by setting this parameter to ‘true’. By default, the integration is disabled.
EMA_Periods – Default: 20
The default number of periods to use when calculating the EMA is stored in this parameter. This can be changed by the user according to the user’s preferences.
EMA_AppliedPrice – Default: EMA_CLOSE
By default, the EMA is calculated on the closing price. This can be changed to use any of the other prices. The user can select any value from the drop down list.



EMA Range Parameters


The EMA Range parameters allow users to define the ranges of how significance is measured within the indicator. The default values should work perfectly. More advanced users may want to change the interval definitions. Parameters in this section are:

EMA_PipsRangeWeak – Default: 100.0
The smallest measurable distance between the price and EMA is called a Weak Range. This distance is specified in number of points. By default, it is set to 100.0 points (or 10 pips). The value can be changed but should be lower than the medium and strong ranges.
EMA_PipsRangeMedium – Default: 200.0
The next measurable distance level above Weak Range is the Medium Range. This range is also specified in number of pips and the value should be greater than the Weak Range value but lower than the Strong Range value.
EMA_PipsRangeStrong – Default: 300.0
The largest measurable distance between the price and EMA is called a Strong Range. This range is also specified in number of pips and should be greater than both the Weak and Medium Range values.



EMA Display Parameters


The display of Advanced EMA components can be controlled by the user, who can choose to display the EMA, Signals, or Crosses. Parameters in this section are:

DisplayEMA – Default: true
The actual display of the EMA can be configured. By default, the indicator is displayed. Changing the value to ‘false’ will disable the EMA display.
DisplaySignals – Default: false
Display of the “BUY/SELL” indicators can be configured. By default, the indicators are not displayed. Setting the value to ‘true’ will cause the indicators to be displayed.
DisplayCrosses – Default: false
The display of crosses can be configured to display markers where the price crosses the EMA. By default, these markers are not displayed. Setting the parameter to ‘true’ will cause the markers to be shown.



Color Parameters


Colors can be strongly preferred by users. The Advanced EMA 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:

ColorNeutral – Default: Yellow
The main EMA is displayed in this color. This is the default color when the price is less than a Weak Range away from the EMA.
ColorRangeUpWeak – Default: GreenYellow
The Weak Range is displayed in this color when the EMA is trending up.
ColorRangeUpMedium – Default: LawnGreen
The Medium Range is displayed in this color when the EMA is trending up.
ColorRangeUpStrong – Default: LimeGreen
The Strong Range is displayed in the color when the EMA is trending up.
ColorRangeDownWeak – Default: Gold
The Weak Range is displayed in this color when the EMA is trending down.
ColorRangeDownMedium – Default: Orange
The Medium Range is displayed in this color when the EMA is trending down.
ColorRangeDownStrong – Default: DarkOrange
The Strong Range is displayed in this color when the EMA is trending down.
ColorBuy – Default: Aqua
The BUY signals are displayed in this color.
ColorSell – Default: Magenta
The SELL signals are displayed in this color.
ColorCross – Default: Blue
The price crossings of EMA are displayed in this color.



Size Parameters


The size parameters are used to configure the size of objects displayed on the chart. Parameters in this section are:

LineWidthEMA – Default: 3
Primary EMA line uses this value as the width of the line used to display it.
LineWidthSignal – Default: 2
Signals uses lines of this width to display objects.
LineWidthCross – Default: 3
The cross marks uses lines of this size to display.



Alert Parameters


The alert parameters are used to configurable which types of notifications to provide to the user. YFX Advanced EMA has several notification types. Each type of notification can be enabled or disabled. Parameters in this section are:

DoAlertTradeSignals – Default: false
Alert trade signals are generated when a new BUY/SELL signal is created. This usually happens when the price is likely to change direction. This signal is turned off by default and no alerts are generated. Alerts can be enabled by setting this value to true.
DoAlertCrosses – Default: false
Alerts can be generated when the price crosses the EMA. These can alerts can be enable or disabled. By default, the alerts are disable. They can be enabled by setting the parameter to ‘true.
DoAlertRangeWeak – Default: false
Alerts can generated when the indicator enters the Weak Range. These alerts are disabled by default and can be enabled by setting the parameter to ‘true’.
DoAlertRangeMedium – Default: false
Alerts can generated when the indicator enters the Medium Range. These alerts are disabled by default and can be enabled by setting the parameter to ‘true’.
DoAlertRangeStrong – Default: false
Alerts can generated when the indicator enters the Strong Range. These alerts are disabled by default and can be enabled by setting the parameter to ‘true’.



Message Parameters


The message parameters determine how the indicator alert notifications are conveyed to the user. There are several option and the user can select which ones to use at any time. Multiple options can be enabled simultaneously. Parameters included in this section are:

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
Alerts can be displayed on the chart. 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.



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. Parameters in this section are:

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. Parameters in this section are:

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. Parameters in this section are:

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.

Screen Image 1
Basic EMA
<data image>
Screen Image 2
EMA Crosses
<data image>
Screen Image 3
Trade Signals
<data image>
Screen Image 4
Crosses and Trade Signals
<data image>
Screen Image 5
Indicator Settings
<data image>
Buy from MQL Market
<data image>