eykpunter

Keltner Center Of Gravity Channel ( KeltCOG )

I have the ambition to create a ‘landscape’ which enables the user to see the ‘mood’ of the market about the price of an instrument, simply by looking where the candles go. Prices are a simple phenomenon , they go up or down or stay the same. This is represented quite well for the short term by a candle. I recommend to study candle patterns. Prices not only fluctuate but also trend up, down or go sideways. The user should analyze this by determining the COG (Center Of Gravity ) and the ‘normal’ current range by using the historical data in a lookback period.
As a COG the center line of a Donchian Channel is often used. I.m.o. a COG should be a zone, in this channel I use the gray zone of my Donchian Fibonacci Channel, The ‘normal’ range is a multiple of Average True Range , as used in a Keltner Channel. Combining the two can give a cumbersome result, as one can see in my Keltner Fibonacci Channel. In this KeltCOG channel I solved this by not using all Fibonacci levels and by making the Keltner lines strictly parallel to the nearest COG line. To do this, I use the fact that the COG lines have horizontal stretches, there I make the Keltner lines horizontal too. Only where the COG lines change value, the Keltner lines are recalculated. This way the channel gets a very regular shape with three clear zones.

Interpretation of a chart by using the KeltCOG channel.
Overbought: If the candles go higher then the blue zone, the market is hyper enthusiast, creating an overbought situation. This is often followed by a reversion to the COG.

Uptrend: If the candles form in the blue zone, the market is enthusiast and willing to pay more.

Hopeful: If the candles form in or near the upper uncolored zone, the market is hopeful and is thinking about paying more. Sometimes prices go a little up.

Content: If the candles form in the gray zone, which represents COG, the market is happy with the current prices, so these move sideways

Disappointed: If the candles form in or near the lower uncolored zone, the market is disappointed and contemplates paying less, sometimes prices go a little down.

Downtrend: If the candles form in red zone, the market doesn’t like the instrument at all, rejects the current price and is only prepared to pay less.

Oversold: If the candles form below the red zone, the market overdoes its disgust, creating an oversold situation, often followed by a reversion to the COG.
Release Notes: I added a function that automatically adjusts the width of the blue and red zones when the user changes the look back periods.
For my own use I set the look back to 14 for weekly charts, to 21 for dailies, to 28 for 3hourlies and to 35 to hourly charts.
For finer intraday charts I guess the user will like even longer look back periods, but that is to his, hers or whatevers discretion.
Release Notes: After comparing mij Keltner Fibonacci Channel with prvious versions of this KeltCOG Channel I came to the conclusion that all fibonacci lines are relevant because these give support and resistance. So I made it possible to use these as innerlow and innerhigh. In the inputs this can be switched off, then 0.5*ATR will be used to distance it from the nearest COG-line. Also I now think about the uncolored zones as 'accumulation zone' below the COG and 'distribution zone' above the COG, giving regard to the method of Wyckoff.
Release Notes: I gave the uncolored zones the colors green and yellow and also names, i.e.: "optimistic accumulation and distribution area", which is made green and "pessimistic accumulation and distribution area" which I gave a yellow color. The gray zone is made more transparant. You can change these in the inputs if you don't like them.
Release Notes: The possibility to add extra Keltner lines is added. These lines have a distance of 2 ATR from the border of the channel. These can be used to provide values for setting a take profit target. I also show extra lines in intraday timeframes to function as 'pivot points' in attempts to predict future quotes. Default setting is off , you can switch showing individual extra lines on in the inputs. Enjoy.
Release Notes: New features added:
1. The script chooses a lookback period that matches the timeframe. This feature can be switched off in the inputs, allowing the user to enter the lookback manually
Remarks on the connection between lookback and timeframe: The lookback should i.m.o. be equal to the ‘look forward’. Examples: If you choose a minute chart, you probably are a day trader and you wish to estimate where the quotes might go in the next hour. Then you should choose a lookback near 60, because the cannel will then provide the range and the COG generated by the previous hour and show the relative place of the current price in this range. If you choose an hourly chart, your horizon is probably a few days, so 35 is a proper choise, If you choose a monthly chart, you might want to estimate possibilities for the coming half year, so 7 is a proper value for this argument. The scrips chooses multiples of seven due to some superstition of mine. The script values reveal my personal subjective opinion, so the user can choose other arguments.

2. The script chooses a width that matches the lookback period. This feature can be switched off in the inputs, allowing the user to enter the width manually.
Remarks on the desirable width of the channel: The ‘landscape’ of the channel is meant to encompass most candles with some of those touching the border, then one can reasonably claim that the channel shows the ‘natural range’, providing an argument to call and ‘overbought’ or ‘oversold’ if candles move outside. Interdependency with lookback is caused by the fact that both the COG and the natural range are relatively wider when the lookback is further. However because this is not a linear connection, it took me a few hours to create a non linear formula that seems to works fine.

3. A feedback label is created to show the values that are used for lookback and width and whether these originate from the script or the user. This label can be switched off. The standard arguments label provided by Trandingview only show input defaults or entries while the compiler blocks attempts to change these with the script, so some other way to inform the user on the actual values for these parameters was needed.

The purpose of these additions is that you can throw the KeltCOG in whatever timeframe without worries about the proper settings. e.g. you can toggle through different timeframes trusting that this channel remains relevant.
Skript med en öppen källkod

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Vill du använda det här skriptet i ett diagram?