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
You must be logged in to post a comment.
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!
Hi Sever, how can I visualize the coloured areas?