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

SlopeDirectionLine_HTF_Signal - MetaTrader 5 script

author EAcpu | 5 reads | 0 comments |

SlopeDirectionLine_HTF_Signal - indicator for MetaTrader 5

The SlopeDirectionLine_HTF_Signal indicator displays the trend direction from three bars. The SlopeDirectionLine_HTF_Signal indicator as three graphical objects, the color of which determines the trend direction.

SlopeDirectionLine_HTF_Signal - indicator for MetaTrader 5

Indicator input parameters:

The time frame and name of the financial assets used for indicator calculations can be changed via appropriate indicator input parameters. If the Symbol_(financial asset) input parameter is empty, the current chart symbol will be used as the financial asset.

 //+------------------------------------------------+
//|Indicator input parameters |
//+------------------------------------------------+
Enter string symbol_= ”” ; // Financial assets
Input ENUM_TIMEFRAMES time range = PERIOD_H6 ; // Calculate indicator time range

All input parameters can be divided into two major groups:

 //--- Indicator display settings
Enter StringSymbols_Mr.Name = "Slope Direction Line_Label_" ; // Indicator Label Name
Enter color upper symbol_color= clear blue ; // Uptrend symbol color
Input color DnSymbol_Color= red blood cells ; // Downtrend symbol color
Input color IndName_color = clr dark orchid ; // indicator name color
Input unit symbol_size = 34 ; // signal symbol size
Input unit font size = 15 ; // Indicator name font size
Input integer X_3= 120 ; // Horizontal name offset
Input integer Y_3= 10 ; // vertical name offset
Input boolean display name = true ; // indicator name display
Input ENUM_BASE_CORNER what corner = CORNER_RIGHT_UPPER ; // Display corner points
Input unit X_= 0 ; // Horizontal offset
Input unit Y_= 0 ; // vertical offset

If you want to use multiple SlopeDirectionLine_HTF_Signal indicators on one chart, each indicator should have its own Symbols_Sirname (indicator label name) string variable value.

This indicator requires the compiled indicator file SlopeDirectionLine. Place it in <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 the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.


Attachment download

📎 smoothalgorithms.mqh (130.19 KB)

📎 slopedirectionline.mq5 (10.52 KB)

📎 slopedirectionline_htf_signal.mq5 (13.5 KB)

Source: MQL5 #13955

Verification code Refresh