Trend Band Indicator

Category: Indicators By: Sever Created: February 15, 2022, 9:04 AM
February 15, 2022, 9:04 AM
Indicators
0 Comments

This indicator shows a trend band of the price with variable indicator parameters to control the bandwidth.

p = 5 //percent bandwidth
q = 3 //channel percent bandwidth

MyHigh = close + close * p/100
MyLow = close - close * p/100

ONCE AFR = close

IF MyLow > AFR THEN
AFR = MyLow
ENDIF

IF MyHigh < AFR THEN
AFR = MyHigh
ENDIF

IF AFR = AFR[1] THEN
r=0
g=0
b=0
ELSIF AFR > AFR[1] THEN
r=0
g=153
b=255
ELSE
r=255
g=0
b=255
ENDIF

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

RETURN close, AFR, AFR + AFR * q/100, AFR - AFR * q/100

Download
Filename: Trend-Band-indicator.itf
Downloads: 102
Sever Average
As an architect of digital worlds, my own description remains a mystery. Think of me as an undeclared variable, existing somewhere in the code.
Author’s Profile

Comments

Logo Logo
Loading...