Reply To: รบกวนขอสูตรทั้งหมดสำหรับ Amibroker ครับ

#24364
Avatardreamscat
Keymaster

CDC – 1 ATR Channel 20170502.afl

// CDC 1 ATR Channel 20170502
Prc=C;
X=1;
Smth=2;
Upper=Ref(EMA(Prc+X*ATR(14),Smth),-1);
Lower=Ref(EMA(Prc-X*ATR(14),Smth),-1);
Buy=Cross(Prc,Upper);
Sell=Cross(Lower,Prc);
Bullish=BarsSince(Buy)<BarsSince(Sell);
Bearish=BarsSince(Buy)>BarsSince(Sell);
Green=Bullish AND Prc>Lower;
Red=Bearish AND Prc<Upper;

Plot(C,””,IIf(Green,colorGreen,IIf(Red,colorRed,colorWhite)),stylecandle);
Plot(Upper,”Upper”,colorblue,styleLine|styleDashed);
Plot(Lower,”Lower”,colorRed,styleLine|styleDashed);

1 user thanked author for this post.