Code: Select all
*///-PROPERTIES-////Properties help the software look better when you load it in MT4//Provide more information and details//This is what you see in the About tab when you load an Indicator or an Expert Advisor#property link "https://www.earnforex.com/metatrader-indicators/alert-indicator-template/"#property version "1.0"#property strict#property copyright "EarnForex.com - 2019-2021"#property description "Alert Indicator Template"#property description "So You Can Create Your Own Indicator And Alerts"#property description " "#property description "WARNING : You use this software at your own risk."#property description "The creator of these plugins cannot be held responsible for any damage or loss."#property description " "#property description "Find More on EarnForex.com"//You can set an icon for the indicator to show when loading it on chart//Icon must have an ico extension and be located in the MQL4/Files folder, the following commented line is an example of icon#property icon "\\Files\\EF-Icon-64x64px.ico"//-INPUT PARAMETERS-////The input parameters are the ones that can be set by the user when launching the Indicator//If you place a comment following the input variable this will be shown as description of the fieldinput string Comment1="========================"; //MQLTA Alert Indicator Templateinput string IndicatorName="MQLTA-AIT"; //Indicator Short Nameinput string Comment2="========================"; //Indicator Parameters//This is likely the only section you need to edit to adapt the indicator to your goal//For example if you are using RSI in you indicator you can add here the input for the period and the relevant levelsinput ENUM_CANDLE_TO_CHECK CandleToCheck=CURRENT_CANDLE; //Candle To Use For Analysisinput int BarsToScan=500; //Number Of Candles To Analyseinput string Comment_3="===================="; //Notification Optionsinput bool EnableNotify=false; //Enable Notifications Featureinput bool SendAlert=true; //Send Alert Notificationinput bool SendApp=true; //Send Notification to Mobileinput bool SendEmail=true; //Send Notification via Emailinput int WaitTimeNotify=5; //Wait time between notifications (Minutes)//Arrow Style can be chosen between Wingdings and preset arrows, see following URLs for all the codes//https://docs.mql4.com/constants/objectconstants/wingdings//https://docs.mql4.com/constants/objectconstants/arrowsinput string Comment_4="===================="; //Buffers Optionsinput int ArrowTypeBuy=241; //Code For Buy Arrowinput int ArrowTypeSell=242; //Code For Sell Arrowinput bool ArrowShowNeutral=false; //Show Stop Arrowinput int ArrowTypeStop=251; //Code For Stop Arrowinput color ArrowColorBuy=clrGreen; //Color For Buy Arrowinput color ArrowColorSell=clrRed; //Color For Sell Arrowinput color ArrowColorStop=clrGray; //Color For Stop Arrowinput ENUM_CANDLE_SIZE ArrowSize=CANDLE_SIZE_MEDIUM; //Size Of The Arrowsinput ENUM_CANDLE_DISTANCE CandleDistance=CANDLE_DISTANCE_NEAR; //Arrow Distance From Candle