Home › Forums › CDC Forums › General Discussion — The Living Room › indicator CDC action zone V2 › Reply To: indicator CDC action zone V2
23/04/2020 at 1:00 pm
#35713
dreamscat
Keymaster
ขออนุญาตดัดแปลงให้สีของ cloud เป็นสีเหมือนแถบริบบิ้นใน metastock แทนนะครับ เนื่องจากเขียนสูตรแสดงแถบริบบิ้นเหมือนใน metastock บน amibroker ไม่เป็นครับ (ดังนั้นสูตรนี้สีของ cloud จะไม่เหมือนกับสูตรใน tradingview แบบดั้งเดิมนะครับ)
// CDC ActionZone V2 29 Sep 2016
// CDC ActionZone is based on a simple 2MA and is most suitable for use with medium volatility market
// 11 Nov 2016 : Ported to Trading View with minor UI enhancement
// from TradingView by Aj Piriya33 + convert to Amibroker by Dreamscat (V2.1 cloud color = Fast & Slow) - not original !!!
src = (O+H+L+C)/4;
prd1 = 12;
prd2 = 26;
AP = ema(src,2);
Fast = ema(AP,prd1);
Slow = ema(AP,prd2);
Bullish = Fast>Slow;
Bearish = Fast<Slow;
Green = Bullish and AP>Fast;
Red = Bearish and AP<Fast;
Yellow = Bullish and AP<Fast;
Blue = Bearish and AP>Fast;
Buy = Bullish and Ref(Bearish,-1);
Sell = Bearish and Ref(Bullish,-1);
//Plot
Plot(Fast,"Fast",colorRed);
Plot(Slow,"Slow",colorBlue,styleThick);
BarColor = IIf(Green,colorLime,IIf(Red,colorRed,IIf(yellow,colorYellow,IIf(blue,colorlightBlue,colorWhite))));
CloudColor = IIf(Bullish,colordarkgreen,IIf(Bearish,colordarkRed,colorGrey50));
Plot(C,"Price",BarColor,styleCandle);
PlotOHLC(Fast,Fast,Slow,Slow,"",CloudColor,styleCloud);
- This reply was modified 4 years, 8 months ago by dreamscat.