Linear AFR

Category: Indicators By: Sever Created: July 28, 2022, 8:56 AM
July 28, 2022, 8:56 AM
Indicators
0 Comments

This moving average is a adaptable linear regression of the price controlled by a proportion of the price itself

ONCE AFR = MedianPrice

p = ROUND(y*CustomClose)/100
IF CustomClose > AFR THEN
AFR = AFR + p
ELSE
AFR = AFR - p
ENDIF

AvgAFR = AVERAGE[period](AFR)

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

RETURN CustomCLose, AFR, AVGAFR

Download
Filename: Linear-AFR.itf
Downloads: 155
Sever Average
Code artist, my biography is a blank page waiting to be scripted. Imagine a bio so awesome it hasn't been coded yet.
Author’s Profile

Comments

Logo Logo
Loading...