Based on request.
viewtopic.php?f=27&t=62043
- Code: Select all
local Dist_Crt_High = math.abs(source.high[period] - ma.DATA[period-1]);
local Dist_Crt_Low = math.abs(source.low[period] - ma.DATA[period-1]);
if (Dist_Crt_High >= Dist_Crt_Low) then
Distance[period] = (source.high[period] - ma.DATA[period-1])/source:pipSize();
end
if (Dist_Crt_High < Dist_Crt_Low) then
Distance[period] = (source.low[period] - ma.DATA[period-1])/source:pipSize()
end
The indicator was revised and updated