Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | Percentage of Trend

The indicator values are calculated by this formula :

  • For first period (red color) = (Close - LowValue) / (HighValue - LowValue)
The value is between 0 - 1.
The higher value means uptrend, the lowest value means downtrend, value in the middle means sideway.
  • For second period (blue color) = (Close - LowValue)*-1 / (HighValue - LowValue)
The value is between -1 - 0.
The higher value means downtrend, the lowest value means uptrend, value in the middle means sideway.

where :

  • HighValue - the highest high for n period;
  • LowValue - the lowest low for n period;

Input parameters:

  • InpPeriod1 - First period for calculating trend;
  • InpPeriod2 - Second period for calculating trend;

MetaTrader Experts, Indicators, Scripts and Libraries

868

Best MetaTrader Indicators + Profitable Expert Advisors