Zigo

A Kind of non-repainting COG

Category: Indicators By: Zigo Created: June 25, 2020, 9:44 AM
June 25, 2020, 9:44 AM
Indicators
0 Comments
A Kind of non-repainting COG

I have written this kind of indicator for the first time in july 2015, first as an oscillator, later as an indicator on the graph. Its the basic of my avatar.

It uses a triangular moving average of periods 2 applied on the average of the last “n” median price. If the slope is ascending, it plots blue arrows and yellow arrows when the slope of the TMA is descending.

// settings 
n = 20
// ---

HL=(high+low)/2
Sum=(summation[n](HL))/n
cog=TriangularAverage[2](sum)

if cog > cog[1] then
DRAWARROWUP(barindex, cog-0.25*AverageTrueRange[14](close))coloured(0,125,175,255)
elsif cog < cog[1] then
DRAWARROWDOWN(barindex, cog+0.25*AverageTrueRange[14](close))coloured(255,205,0,255)
endif
return cog
Download
Filename: kind-of-non-repainting-COG.itf
Downloads: 388
Zigo
Zigo Master
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

ProRealCode ProRealCode
Loading...