Algokid

AK MACD BB INDICATOR V 1.00

Here's my version of the MACD _BB . This is a great indicator to capture short term trends.

yellow candles = long
aqua candles = short

This indicator can be much better. I will work on it and publish an improved version (hopefully) soon. In the mean time , go ahead and play around with the code, and please share your findings :)

Cheers

Algo
Remove from Favorite Scripts Add to Favorite Scripts
//AK MACD BB 
//created by Algokid , February 24,2015


study("AK MACD BB v 1.00")

length = input(10, minval=1, title="BB Periods")
dev = input(1, minval=0.0001, title="Deviations")

//MACD
fastLength = input(12, minval=1) 
slowLength=input(26,minval=1)
signalLength=input(9,minval=1)
fastMA = ema(close, fastLength)
slowMA = ema(close, slowLength)
macd = fastMA - slowMA

//BollingerBands

Std = stdev(macd, length)
Upper = (Std * dev + (sma(macd, length)))
Lower = ((sma(macd, length)) - (Std * dev))


Band1 = plot(Upper, color=gray, style=line, linewidth=2,title="Upper Band")
Band2 = plot(Lower, color=gray, style=line, linewidth=2,title="lower Band")
fill(Band1, Band2, color=blue, transp=75,title="Fill")

mc = macd >= Upper ? lime:red

// Indicator

plot(macd, color=mc, style =circles,linewidth = 3)
zeroline = 0 
plot(zeroline,color= orange,linewidth= 2,title="Zeroline")

//buy
barcolor(macd >Upper ? yellow:na)
//short
barcolor(macd <Lower ? aqua:na)

//needs improvments 



Indicator is awesome!
Reply
Hi, modded this indicator a little : added barcolor input ( enable/disable). Thanks !
Source code below:

//AK MACD BB
//created by Algokid , February 24,2015
//modded by Alexandre Pereira, July 6, 2016
color_red_light = #e57373
color_red = #f44336
color_red_dark = #d32f2f

color_blue_light = #64b5f6
color_blue = #2196f3
color_blue_dark = #1976d2

color_green_light = #81c784
color_green = #4caf50
color_green_dark = #388e3c

color_orange_light = #ffb74d
color_orange = #ff9800
color_orange_dark = #f57c00

color_lime_light = #dce775
color_lime = #cddc39
color_lime_dark = #afb42b



study("AK MACD BB v 1.00")

length = input(10, minval=1, title="BB Periods")
dev = input(1, minval=0.0001, title="Deviations")
bar_color = input(false, "Bar colors")
//MACD
fastLength = input(12, minval=1)
slowLength=input(26,minval=1)
signalLength=input(9,minval=1)
fastMA = ema(close, fastLength)
slowMA = ema(close, slowLength)
macd = fastMA - slowMA

//BollingerBands

Std = stdev(macd, length)
Upper = (Std * dev + (sma(macd, length)))
Lower = ((sma(macd, length)) - (Std * dev))


Band1 = plot(Upper, color=color_red_light, style=line, linewidth=2,title="Upper Band")
Band2 = plot(Lower, color=color_green_light, style=line, linewidth=2,title="lower Band")
fill(Band1, Band2, color=color_blue_light, transp=75,title="Fill")

mc = macd >= Upper ? color_green: macd <= Lower ? color_red : color_blue

// Indicator

plot(macd, color=mc, style =circles,linewidth = 3)
zeroline = 0
plot(zeroline,color= orange,linewidth= 2,title="Zeroline")

//buy
barcolor(bar_color and macd > Upper ? color_lime:na)
//short
barcolor(bar_color and macd < Lower ? color_orange:na)
+1 Reply
Algokid PRO pereira.alex
Thank you for sharing this with the rest of the community. :)
Reply
gumbah Algokid
Thanks for the indicator Algo!
Q: did you ever manage to find time for a new/improved version of this? And in what way would you improve it?
Reply
AK This is one of my fav indicators... any word on V 2 ? Thanks!!
Reply
I like this indicator but I wish it would leave the candles the correct color. Would you make a version that leaves the candle colors alone please?
Reply
Great indicator in this market
snapshot
Looking forward to V2 ...I use 5 35 5 setting and scalp aggressively
+3 Reply
Mistake: actual figures 5 - 0 .618 - 38 - 52 -9
Reply
JayP2577 javier.gonzalezgarcia.3388
Reply
What about changing parameters to 9 - 0.618 (Fibonacci)- 38-52-9 in view of better highlighting more extended cycles ? . Try and see. Cheers
Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Priority Support Contact Support Ideas Published Followers Following Private Messages Chat Sign Out