SlopeDirectionLine - MetaTrader 5 Script - MT4/MT5 Resource

Real author:
The SlopeDirectionLine trend indicator has the ability to change the averaging algorithm and trigger alerts, push notifications and send email messages.
Indicator input parameters:
//+------------------------------------------------+ //|Indicator input parameters | //+------------------------------------------------+ Input Smooth_Method MA_Method1= Mode_LWMA ; // The first smoothing method Input unit length 1= 12 ; // first smoothing depth Input integer stage 1 = 15 ; // first smoothing parameter //--- Phase1: For JJMA, it can vary within the range of -100 ... +100. Affects the quality of the smoothing intermediate process; //--- Phase1: For VIDIA, it is the CMO period, for AMA, it is the slow moving average period Input Smooth_Method MA_Method2= Mode_SMA ; //The second smoothing average method Input integer stage 2 = 15 ; // second smoothing parameter //---Phase2: For JJMA, it can vary within the range of -100 ... +100. Affects the quality of the smoothing intermediate process; //---Phase2: For VIDIA, it is the CMO period, for AMA, it is the slow moving average period Input Application_Price_IPC= PRICE_CLOSE ; // Price constant Enter integer shift = 0 ; // horizontal movement of the indicator in bars Input integer price movement = 0 ; // vertical movement of the indicator in points Input boolean On_Push = false ; // Allow sending push messages Input boolean On_Email = false ; // Allow sending emails Input boolean alert on = true ; // Allow placing alerts input boolean playsound = false ; // Allow placement of sound signals input string name file sound = "expert.wav" ; // file name with sound Enter String Comment Sir Name = "Slope Direction Line:" ; // First part of the alert comment Input unit signal column = 1 ; // Bar index for obtaining entry signals
The indicator uses the SmoothAlgorithms.mqh library class (must be copied to terminal_data_folder\MQL5\Include). The use of the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.

Figure 1 SlopeDirectionLine indicator
Attachment download
📎 smoothalgorithms.mqh (134.03 KB)
📎 slopedirectionline.mq5 (10.2 KB)
Source: MQL5 #1489
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •