Trend Signal trend-following indicator specifies the change of a trend when Close price breaks through the specified range of bars upwards or downwards.
The Risk parameter allows defining the distance from the extreme price for this period.
We define it as a percentage of the range for this period.
It has two configurable parameters:
Calculation:
where:
Max = max-(max-min) * Risk / 100.0
Min = min+(max-min) * Risk / 100.0
Max, min are the highest and lowest prices within the Period interval

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/22437