Sever

Trend Indicator based on the range of the price

Category: Indicators By: Sever Created: January 4, 2022, 9:06 AM
January 4, 2022, 9:06 AM
Indicators
2 Comments
Trend Indicator based on the range of the price

This indicator is based on the range of the price movements and the colored areas might help you to easy identify the trend of the price.

// This indicator is based on the range of price movements and the colored areas might help you
// to easy identify thr trend of the price

ONCE AFR = Close
ONCE i = 0
ONCE j = 0

IF High < AFR  THEN
AFR = high
ENDIF

IF Low > AFR THEN
AFR = low
ENDIF

IF Close > AFR THEN
DRAWPOINT(barindex, close, 1)coloured(0,51,255)
DRAWSEGMENT(barindex, high, barindex, low)coloured(0,0,255)
ELSE
DRAWPOINT(barindex, Close, 1)coloured(251,0,255)
DRAWSEGMENT(barindex, high, barindex, low)coloured(255,0,255)
ENDIF

IF AFR < AFR[1] THEN
i = i + 1
AFR2 = AFR[i]
ELSE
i = 0
AFR2 = AFR
ENDIF

IF AFR > AFR[1] THEN
j = j + 1
AFR3 = AFR3[i]
ELSE
j = 0
AFR3 = AFR
ENDIF

RETURN AFR, AFR2, AFR3

Download
Filename: Trend-Indicator-based-on-range.itf
Downloads: 206
Sever
Sever Average
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Stenozar
5 years ago
#

Hi Sever, how can I visualize the coloured areas?

Sever
5 years ago
#

Hi Stenozar, You need to add the color zones yourself , just go to Add Color Zone To set use for ,,,line 1 : range and for ,,,line 2 : range2 . Add the second color zone: Use for ,,,line 1 : range and for ,,, line 2 : range3. In the first lines block you choose: Line 1 Line 2 Hope you get it!

ProRealCode ProRealCode
Loading...