MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Source code library - Expert Advisors, Indicators and Scripts

TorqueTorque Try product
Torque
Author: achidayat
Limit Stop Order Script Script
Limit Stop Order Script
Author: Rone
Subscribe to signal
AndreyS 2
184.33%, 25 850.23 USD
Screenshot
EURUSD., H1
Real
OpenCL: The Bridge to Parallel Worlds OpenCL: The Bridge to Parallel Worlds
To post a new code, please log in or register

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2012.04.13 08:59
Percentage of Trend

Percentage of Trend [ru]

biantoro

Published by:
biantoro
Downloads:
955
Views:
2372
Rating:
votes: 8
Files:
\MQL5\Indicators\

Description:

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;

Image:

Percentage of Trend