Center Of Gravity Timing

Category: Indicators By: Nicolas Created: September 29, 2022, 10:29 AM
September 29, 2022, 10:29 AM
Indicators
2 Comments

Here is another version of the Center of Gravity Timing indicator, popularized by Mostafa Belkhayate.

It simply calculates the distance from the current price from the average of median price (calculated over “period”) divided by the average of the candlesticks range (divided by 5) and calculated over “period”. 

//PRC_CenterOfGravityTiming | indicator
//29.09.2022
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

// --- settings 
period = 5
level1 = 4
level2 = 8
// --- end of settings 

ul1 = level1
ul2 = level2
ll1 = -level1
ll2 = -level2
am = 0
ar = 0
am = summation[period](medianprice)
ar = summation[period]((high-low)/5)

am = am / period
ar = ar / period
if ar <> 0 then 
o = (open-am)/ar
hh = (high-am)/ar
l = (low-am)/ar
c = (close-am)/ar
endif 

return ul1 style(dottedline2) coloured("magenta") as "Upper level 1",ul2 style(dottedline2) coloured("magenta") as "Upper level 2",ll1 style(dottedline2) coloured("magenta") as "Lower level 1",ll2 style(dottedline2) coloured("magenta") as "Lower level 2", o  coloured("gray"), hh  coloured("red"), l  coloured("red"), c  coloured("white")

Download
Filename: PRC_CenterOfGravityTiming.itf
Downloads: 143
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...