Heiken_Ashi_Smoothed_HTF_Signal - MetaTrader 5 script

Heiken_Ashi_Smoothed_HTF_Signal displays the trend direction starting from the last bar Heiken_Ashi_Smoothed as a series of graphical objects colored according to the trend direction. The number of bars to use is set in the input parameter. Red shows a downward trend, while lime indicates an upward trend.
Indicator input parameters:
The time frame and name of the financial assets used for indicator calculations can be changed through the appropriate input parameters of the indicator. If the Symbol_(financial asset) input parameter is empty, the current chart symbol will be used as the financial asset.
All input parameters can be divided into two major groups:
//+------------------------------------------------+ //| Indicator input parameters | //+------------------------------------------------+ Enter string symbol_= ”” ; // Financial assets Input ENUM_TIMEFRAMES time range = PERIOD_H6 ; // time range for indicator calculation Input Smooth_Method hMA_Method=MODE_JJMA; // Smoothing method Input integer h length = 30 ; // smoothing depth Input integer h phase = 100 ; // smoothing parameter
//----Indicator display settings Enter StringSymbols_Mr . Name = "Heiken_Ashi_Label_" ; // Indicator label name Enter unit Column total = 4 ; // Number of bars to display Input color UpSymbol_Color=lime; // Growth symbol color Input color DnSymbol_Color=red; //Color of downfall symbol Input color IndName_Color=Dark Orchid; // Indicator name color Input unit symbol_size = 34 ; // signal symbol size Input unit font size = 15 ; // Indicator name font size Input integer Xn= 5 ; // horizontal movement of name Input integer Yn= -20 ; //The name moves vertically Input boolean display name = true ; // indicator name display Input ENUM_BASE_CORNER what corner = CORNER_RIGHT_UPPER ; // position angle Input unit X_= 0 ; // horizontal movement Input unit Y_= 30 ; // vertical translation
If you want to use multiple Heiken_Ashi_Smoothed_HTF_Signal indicators on one chart, each indicator should have its own Symbols_Sirname (indicator label name) string variable value.
Place the Heiken_Ashi_Smoothed indicator compiled file into terminal_data_folder\MQL5\Indicators.
The indicator uses the SmoothAlgorithms.mqh library class (must be copied to terminal_data_folder\MQL5\Include). The use of these classes is described in detail in the article " Averaging price series for intermediate calculations without using additional buffers ".

Attachment download
📎 heiken_ashi_smoothed.mq5 (7.02 KB)
📎 heiken_ashi_smoothed_htf_signal.mq5 (12.24 KB)
📎 smoothalgorithms.mqh (133.8 KB)
Source: MQL5 #701
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •