RobotFX curates the best open-source MetaTrader code to inspire your trading automation.
Real author:
asystem2000
The SlopeDirectionLine indicator with the timeframe selection option available in input parameters:
Smooth out market noise with the Heiken Ashi Expert Advisor for MT4 and MT5. Reliable trend-following automation. Details here.
input ENUM_TIMEFRAMES TimeFrame=PERIOD_H4; // Indicator chart period (timeframe)
Originally this indicator has been written in MQL4 and was first published in the Code Base on 15.01.2008.

Figure 1. The SlopeDirectionLine_HTF indicator
Thanks for reading. Discover premium MetaTrader solutions at RobotFX.
1996