Center of Gravity Oscillator - Ehlers by KIVANC fr3762


Converted the original code from his book "Cybernetic Analysis for Stocks and Futures"

This article describes a new oscillator that is unique because it is both smoothed
and has essentially zero lag. The smoothing enables clear identification of turning
points and the zero lag aspect enables action to be taken early in the move. This
oscillator is the serendipitous result of my research into adaptive filters. While the filters
have not yet produced the result I seek, this oscillator has substantial advantages over
conventional oscillators used in technical analysis . The “CG” in the name of the
oscillator stands for the Center of Gravity of the prices over the window of observation.
The Center of Gravity ( CG ) of a physical object is its balance point. For example,
if you balance a 12 inch ruler on your finger, the CG will be at its 6 inch point. If you
change the weight distribution of the ruler by putting a paper clip on one end, then the
balance point (e.g. the CG ) shifts toward the paper clip. Moving from the physical world
to the trading world, we can substitute the prices over our window of observation for the
units of weight along the ruler. With this analogy, we see that the CG of the window
moves to the right when prices increase sharply. Correspondingly, the CG of the
window moves to the left when prices decrease.

For further information:

Here's the link to a complete list of all my indicators:

Şimdiye kadar paylaştığım indikatörlerin tam listesi için:

Remove from Favorite Scripts Add to Favorite Scripts
Twitter: @fr3762
Hi, I need help with an indicator. I want to paint the double indicator value of cci 14 and cci 40 together. Something like what you have plot in blue and plor in red in the indicator. You can help me?
study(title="Commodity Channel Index", shorttitle="CCI", format=format.price, precision=2)
length = input(14, minval=1)
src = input(close, title="Source")
ma = sma(src, length)
cci = (src - ma) / (0.015 * dev(src, length))
plot( cci, color=color.olive)
band1 = hline(175, color=color.gray, linestyle=hline.style_dashed)
band0 = hline(-175, color=color.gray, linestyle=hline.style_dashed)
fill(band1, band0, color=color.olive)

length1 = input(40, minval=1)
src1= input(close, title="Source")
ma1 = sma(src, length1)
cci1 = (src1 - ma) / (0.015 * dev(src1, length1))
band3 = hline(175, color=color.gray, linestyle=hline.style_dashed)
band2 = hline(-175, color=color.gray, linestyle=hline.style_dashed)
fill(band2, band3,
thanks to your indicator. i was able to create another version of it by adding a histogram and gives higher probability on spotting divergences.

serkan2112 francxisz
@francxisz, I cant see it in your profile
francxisz serkan2112
@serkan2112, i did not published it yet. currently for personal use only while still backtesting. might post it soon.
Teşekkürler. Aklınıza emeğinize sağlık.
Tesekurler hocam
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing House Rules Moderators Website & Broker Solutions Widgets Charting Solutions Help Center Feature Request Blog & News FAQ Wiki Twitter
Profile Profile Settings Account and Billing TradingView Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out