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

สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
//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