LazyBear

Indicator: Custom COG channel

This is my custom channel ( Bear Channel!? :)) derived from BB/STARC. It uses both ATR/STDEV for plotting the bounds.

I use COG (Center of Gravity) for deriving the baseline. This enables it to track the price action better than many other channels that make use of MAs or simply "close". Indicator also marks "squeezes" (stdev bands come inside ATR bands). Pay attention to these, as these usually indicate a move.

I am still exploring this indicator on different BTCUSD             time frames, would love to hear your feedback / setups for other instruments.

Code for this indicator: http://pastebin.com/QXBJqAhA


Code for COG fibs I mentioned in the comments: http://pastebin.com/CbxY31at
Remove from Favorite Scripts Add to Favorite Scripts
//
// @author LazyBear
//
// This is my custom channel derived from BB/STARC. This uses both ATR/STDEV for plotting the bounds. 
// I use COG for the base line (normally it is SMA/EMA). 
// 
// If you use this code in its original/modified form, do drop me a note. 
//
study("COG Double Channel [LazyBear]", shorttitle="COGChannel_LB", overlay=true)
src = close
length = input(34)
median=0
mult=input(2.5)
offset = input(20)
tr_custom() => 
    x1=high-low
    x2=abs(high-close[1])
    x3=abs(low-close[1])
    max(x1, max(x2,x3))
    
atr_custom(x,y) => 
    sma(x,y)
    
dev = (mult * stdev(src, length))
basis=linreg(src, length, median)
ul = (basis + dev)
ll = (basis - dev)
tr_v = tr_custom()
acustom=(2*atr_custom(tr_v, length))
uls=basis+acustom
lls=basis-acustom

// Plot STDEV channel
plot(basis, linewidth=1, color=navy, style=line, linewidth=1, title="Median")
lb=plot(ul, color=red, linewidth=1, title="BB+", style=dashed)
tb=plot(ll, color=green, linewidth=1, title="BB-", style=dashed)
fill(tb,lb, silver, title="Region fill")

// Plot ATR channel
plot(basis, linewidth=2, color=navy, style=line, linewidth=2, title="Median")
ls=plot(uls, color=red, linewidth=1, title="Starc+", style=circles)
ts=plot(lls, color=green, linewidth=1, title="Star-", style=circles)
fill(ts,tb, green, title="Region fill")
fill(ls,lb, red, title="Region fill")

// Mark SQZ
plot_offs_high=2
plot_offs_low=2 
sqz_f=(uls>ul) and (lls<ll)
b_color=sqz_f ? teal : na
plot(sqz_f ? lls-plot_offs_low : na, color=b_color, style=cross, linewidth=2)
plot(sqz_f ? uls+plot_offs_high : na, color=b_color, style=cross, linewidth=2)
List of my free indicators: http://bit.ly/1LQaPK8
List of my indicators at Appstore: http://blog.tradingview.com/?p=970

TheLark PRO
2 years ago
Something like this works better for all symbols, rather than a hard set 2:

plot_offs_high=0.002
plot_offs_low=0.002
sqz_f=(uls>ul) and (lls<ll)
b_color=sqz_f ? teal : na
plot(sqz_f ? lls - (lls * plot_offs_low) : na, color=b_color, style=cross, linewidth=2)
plot(sqz_f ? uls + (uls * plot_offs_high) : na, color=b_color, style=cross, linewidth=2)
+3 Reply
LazyBear PRO TheLark
2 years ago
agree, thx.
+5 Reply
TheLark PRO LazyBear
2 years ago
NP, thanks for this and all the rest
+2 Reply
sublimares2 LazyBear
2 years ago
Can you update this tool with TheLark correction? I have no idea of how to do it. Thank you
+2 Reply
LazyBear PRO sublimares2
2 years ago
Pastebin link I have given above has this.
+4 Reply
QuantitativeExhaustion PRO LazyBear
2 years ago
If only we had a screener to find these Sqz plays.
Reply
LazyBear PRO
2 years ago
Quick visual comparison of this channel with BB. Similar ATR comparison can be made too.

snapshot
+6 Reply
QuantitativeExhaustion PRO LazyBear
2 years ago
This works great!
+4 Reply
magarto
2 years ago
Thanks!!! Expected indicator!
+1 Reply
LazyBear PRO magarto
2 years ago
yw :)
+4 Reply
Thanks a lot! Once again really great work from you :)
+1 Reply
LazyBear PRO Kurbelklaus
2 years ago
Thx.
+4 Reply
magarto
2 years ago
What about a fibo bear channel like this one ;)
snapshot
+2 Reply
LazyBear PRO magarto
2 years ago
A similar Fib channel, based on COGs though

snapshot
+5 Reply
magarto LazyBear
2 years ago
Thanks again ;)
+1 Reply
sublimares2
2 years ago
Great- super great- can you post the code for the Fibo channel? Thank you
+1 Reply
LazyBear PRO sublimares2
2 years ago
Thx. Code: http://pastebin.com/CbxY31at
+4 Reply
sublimares2
2 years ago
Thank you for this tool- so expected . Here is in action on AAPL:)
+2 Reply
sublimares2 sublimares2
2 years ago
snapshot
+6 Reply
littleriver
2 years ago
Applied your indicator to NVIDA, it says a move is coming . I agree. Thank you !!

snapshot
+5 Reply
LazyBear PRO littleriver
2 years ago
Nice. BTW, you may want to use the code I have given in the link -- http://pastebin.com/QXBJqAhA <-- this has the suggested changes from @TheLark.
+5 Reply
Hey guys, i really like this one. Yet still i have problems figuring out how to make proper use of it. Can someone drop me a hint or a good source to a read about channels like this one? I haven't found anything sufficient yet.
+2 Reply
QuantitativeExhaustion PRO Kurbelklaus
2 years ago
Buy straddles/strangle options when you see the blue crosses
+2 Reply
Kurbelklaus PRO QuantitativeExhaustion
2 years ago
Ah thank you that helps :) Basically this was my problem since the squeeze only indicates a move but not the direction. I am just not sure if this is possible on BFX.
Reply
COG overlay is much better than Bollinger
Reply
JoeMce
2 years ago
Works Great!
Reply
I'm surprised this is not your most popular indicator.
Reply
LazyBear PRO QuantitativeExhaustion
2 years ago
:)

If you liked CogChannel, you will love the new tuned version.


snapshot
+2 Reply
QuantitativeExhaustion PRO LazyBear
2 years ago
You going to post/publish?
Reply
LazyBear PRO QuantitativeExhaustion
2 years ago
Planning to make this part of the package that I will be publishing to the TV store.

Here's a new oscillator derived from this channel.

snapshot
+1 Reply
QuantitativeExhaustion PRO LazyBear
2 years ago
Very nice. Noticing bands vs price chart and shows relative overbought/oversold and sqz helps determine timing
Reply
QuantitativeExhaustion PRO LazyBear
2 years ago
Once you get a sqz indication, need something that factors direction/trend. Bottom or top of Oscillator is not always telling.
Reply
tradearcher PRO LazyBear
2 years ago
Nice. Any idea when the store is going live? I am interested in publish some of my proprietary scripts too.
Reply
Zaloopa tradearcher
2 years ago
I'm interested as well!
Reply
LazyBear PRO tradearcher
2 years ago
Store is already live. You can contact support@tradingview.com regarding publishing your script there.
Reply
tradearcher PRO LazyBear
2 years ago
Great. Thank you.
Reply
MTF COG SQZ indicator with a function that allows a user to alternate three different time frames would be very helpful. If I see 1w 1d 4h all with Sqz indications I know its going to play out a big price move with a high probability. You can also use 5m 15m and 1h signals for confirming short burst
Reply
LazyBear PRO QuantitativeExhaustion
2 years ago
I do have MTF version of SQZ. Will add it to my to-publish queue.
Reply
forexopl LazyBear
2 years ago
Hi LazyBear,

Thanks for this indi, i am changing the offset within the settings, but it is not making any changes ? Could you please advise? Thanks!
Reply
LazyBear PRO forexopl
2 years ago
Are you using the updated code from here - http://pastebin.com/CbxY31at ?? This has the fix for using the proper "offset" value.
Reply
VSh LazyBear
2 years ago
Hi LazyBear,

This pastebin is for your COGFibs, not for COGChannel. COGChannel still has no usage for offset. I believe you wanted to pass it to linreg instead of median. In this case 20 is too large for default, should be 0.
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out