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:

從收藏腳本中移除 新增至收藏腳本
Twitter: @kivancozbilgic
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
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 如何運作 圖表功能 價格 推薦朋友 網站規則 幫助中心 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 部落格 & 新聞 推特
概覽 個人資料設定 賬戶和賬單 推薦朋友 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出