Выбор редакции
OPEN-SOURCE SCRIPT

KCGmut

“KCGmut” stands for “Mutations Of Keltner Center Of Gravity Channel”.
After adding the ‘KeltCOG Width’ label to the KeltCOG, I got the idea of creating a subpanel indicator to show the development of the width-percent in previous periods. After some more thinking, I decided that the development of the COG-width-percent should also be reported and somehow the indicator should report whether the close is over (momentum is up), in (momentum is sideways) or under (momentum is down) the COG ( This is the gray area in the channel).

Borrowing from other scripts:
I tweeked the script of the KeltCOG (published) to calculate the columns and of REVE (also published) to calculate the volume spikes. Because the KeltCOG script had the default option to let the script chose lookback and adapt the width, I decided to not provide inputs to tweek lookback or channel width. Thus, if you use a KeltCOG in default setting, REVE and KCGmut together in the same chart, these will provide consistent complementary information about the candle. This layout has this combination:
снимок
I added actual volume to show where volume spikes occur.

Columns
For the channel-width-percent half of the value is used and for the COG-width-percent the whole to get a better image
By plotting the columns of the full width before those of the COG, in two series of positive and negative values, I created the illusion of a column with a different colored patch representing the COG (most are black) at the bottom where it points up (showing momentum is up), in the middle when the close is in the COG (no momentum) or at the top when the close is below the COG (showing momentum is down)

coloring drama
When nothing much happens, i.e. the channels keep the same width of shrink a bit, the columns get an unobtrusive color, black for the small COG patches and bluish gray for the channel columns pointing up or sideways, reddish gray when pointing down. If the COG increases (drama) the patches get colored lime (up), red (down) or orange (sideways, very seldom). If the channel increases, the columns get colored gold (up), maroon (down) or orange (sideways). Because the COG is derived from a Donchian channel, drama means a new high or low in the lookback period. Drama in the KeltCOG channel just means increase in volatility.

histogram showing volume spikes
Blue spikes indicate more then twice as much volume then recently normal, Maroon spikes indicate clear increases less then twice. To prevent the histogram from disappearing behind a column it is plotted first, spikes made longer then the column and also plotted both positive and negative. Single volume spikes don’t mean much, however if these occur in consecutive series and also come together with drama like new highs or increase in volatility, volume is worth noting. I regard such events as ‘voting’, the market ‘votes’ up or down. The REVE analyses these events to asses whether the volume stems from huge institutional traders (‘whales’) or large numbers of small traders (‘muppets’). This might be interesting too.

Remarks about momentum
Like in MACD, momentum has a direction. The difference is that in KCGmut momentum is a choise of the market to move above the COG (uptrend) or in (sideways) or under (downtrend), whereas in MACD the indicator shows the energy with which the market moves up or down. How does the market ‘choose’? The market doesn’t ‘think’, but still it comes to decisions. I see an analogy with the way a swarm of birds decides to go here or there, up or down, or land in a tree. All birds seem to agree but I guess a single bird has not much say in what the swarm does.


COGTrend AnalysisVolatilityVolume

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности