The range indicator compares daily range (High - Low) to the range between days (Close - PrevClose).
The indicator has seven configurable parameters:
Calculation:
where:
MA - moving average on the Range data with the Smoothing period and the Method calculation method
If Max - Min > 0:
otherwise:
If Close > PrevClose:
otherwise:
Max, Min - the highest and the lowest Value within Period
Maximum, Minimum - the highest and the lowest values of the two

Translated from Russian by MetaQuotes Ltd.
Original code: /ru/code/21110
SRange_Contraction
A signal indicator of daily ranges.
PAIN
Oscillator PAIN (Price Action Indicator).