This moving average is a adaptable linear regression of the price controlled by a proportion of the price itself
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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 |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials