Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

X2MA_HTF_Signal_BG - MetaTrader 5 Script - MT4/MT5 Resources

author EAcpu | 6 reads | 0 comments |

X2MA_HTF_Signal_BG - indicator for MetaTrader 5

X2MA_HTF_Signal_BG - indicator for MetaTrader 5

X2MA_HTF_Signal_BG displays information about trend direction (based on X2MA indicator data) as a graphical object, indicates trend or trading direction in color, and emits alerts or audio signals and sends push notifications to smartphones when trading signals occur.

Graphic objects are represented as colored backgrounds. The background comes in four colors. Light colors indicate trend continuation, bright colors indicate trading signals.

The indicator sends alerts and push notifications only if the value of the input parameter meets the following conditions:

 Enter the unit signal column = 0 ; // Get the number of bars for the signal (0 - current bar)

greater than one. For zero bars, sound signals and push notifications are of no use, since the indicator signal on the zero bar may change and disappear!

All input parameters can be divided into three major groups:

 //+------------------------------------------------+
//|Session drawing input parameters |
//+------------------------------------------------+
input boolean session_extraction= false ; // Display sessions during non-session periods
Enter String Conversation Mr. Name = "Asian" ; // Conversation Name
Enter hour StartHour=H00; // Session start time
Enter the minute. Start minute = M00; // Session start minute.
Input units session time = chapter 480 ; // Session duration (minutes)
input color up color = clr light turquoise ; // grow color
Enter color purchase_color = clelem ; // purchase color
input color sales color = clr dark pink ; // autumn color
Input color DN_color = clr light pink ; // sell color
  • Input parameters of the X2MA indicator:
     //+------------------------------------------------+
    //| Indicator input parameters |
    //+------------------------------------------------+
    Enter string symbol_= ”” ; // Financial instrument
    Input ENUM_TIMEFRAMES time range = PERIOD_H6 ; // Indicator time range for indicator calculation
    Input Smooth_Method MA_Method1= Mode_SMA ; // Average method for the first smoothing
    Input integer length 1= 12 ; // Fist smoothing depth
    Input integer stage 1= 15 ; // Parameters for the first smoothing
    //--- For JJMA, it changes in the range of -100 ... +100 and affects the quality of the transient process;
    //--- For VIDIA it is the CMO period, for AMA it is the slow moving average period
    Input Smooth_Method MA_Method2=MODE_JJMA; // Average method for the second smoothing
    Input integer length 2= 5 ; // Depth of the second smoothing
    Input integer stage 2= 15 ; // Parameters for the second smoothing
    //--- For JJMA, it changes in the range of -100 ... +100 and affects the quality of the transient process;
    //--- For VIDIA it is the CMO period, for AMA it is the slow moving average period
    Input Application_Price_IPC= PRICE_CLOSE ; // Price constant
  • Input parameters of the X2MA_HTF_Signal_BG indicator required for indicator visualization:
     //----Indicator visualization settings
    Input unit signal field = 0 ; // Number of bars to receive the signal (0 - current bar)
    Input stringSymbols_Sirname =INDICATOR_NAME "_label_" ; // Name of the indicator label
    Input color IndName_Color=Dark Orchid; // Color of indicator name
    Input unit font size = 10 ; // Font size of indicator name
    Input integer X_1= 5 ; // horizontal movement of name
    Input integer Y_1=- 15 ; // Name moves vertically
    input boolean displayname = true ; // display indicator name
    Input ENUM_BASE_CORNER what corner = CORNER_RIGHT_UPPER ; // position angle
  • Input parameters for X2MA_HTF_Signal_BG, indicators required to generate alerts and audio signals:

     //---- Alarm settings
    Enter ENUM_ALERT_MODEalert_mode=OnlySound; // Options to trigger indication
    Input boolean push = true ; // Allow push notifications
    Input unit alarm count = 0 ; //Number of alarms generated
  • If you use multiple X2MA_HTF_Signal_BG indicators on one chart, each indicator should have its own Symbols_Sirname (indicator label name) string variable value.

    Place the indicator compiled file X2MA.mq5 into terminal_data_folder\MQL5\Indicators\ of the client.

    X2MA_HTF_Signal_BG - indicator for MetaTrader 5

    Figure 1. Trend continuation signal based on X2MA_HTF_Signal_BG indicator data

    X2MA_HTF_Signal_BG - indicator for MetaTrader 5

    Figure 2. Position opening signal based on X2MA_HTF_Signal_BG data


    Attachment download

    📎 smoothalgorithms.mqh (134.03 KB)

    📎 x2ma.mq5 (8.25 KB)

    📎 x2ma_htf_signal_bg.mq5 (21.94 KB)

    Source: MQL5 #1975

    Verification code Refresh