Trend AFL For Amibroker That Absolutely Save Analysis Time [Trend Chart v.2]
TREND CHART v.2 AMIBROKER AFL
There is a word that in trading analysis “Trend is always friend”. So when you identify the stock or major pair trend than you will get profit. In a sense Trend AFL for Amibroker play a vital role for trading system. If you are a trader than Trend AFL absolutely save analysis time.
Today we focus Trend Chart v.2 AFL which is made from identify candle color. Trend Chart v.2 for Amibroker AFL identifies trend with exponential moving average(EMA) and MACD .
If candle for :
Red = Downtrend
Green = Uptrend
Yellow = Caution without TrendThis is a simple example to identify trend and just follow the colors GREEN , RED and YELLOW . Its better to watch the graph which is cleaner . The AFL is only an indicator and not a Trading System .
Image of AFL [amibroker formula language].
The Image shows that when candle color is Yellow than trend is steady or side way for sometimes. But when its show Green Candle than its going to uptrend. Reversely Red candle indicate to downtrend.
TREND CHART v.2 FOR AMIBROKER AFL CODE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | //-------------------------------------------------------------------- // Formula Name: Trend Chart v.2 for Amibroker afl by pipschart // Author : KrT group // Uploader : www.pipschart.com // E-mail : info@pipschart.com // Amibroker Blog: www.pipschart.com/amibroker // Origin : Modified & Collected from different sources. //----------------------------------------------------------- _SECTION_BEGIN("KrT group"); GfxSetBkMode(1); X=750; Y=1; Font=10; GfxSelectFont("Impact",Font*2.2, 550);GfxSetTextColor(colorRed);GfxTextOut("KrT group",x,y); GfxSelectFont("Impact",Font*2.2, 550);GfxSetTextColor(colorGreen);GfxTextOut("RESEARCH",x+120,Y); _SECTION_END(); //--------------------------------------------- //Candles or bars colored by trend //identifying trends with EMA and MACD Period = Optimize("Period", 17, 2, 200, 1); EMACALC = EMA(C, Period); cond1 = Close > EMACALC AND MACD() > Signal(); cond2 = Close > EMACALC AND MACD() < Signal() OR Close < EMACALC AND MACD() > Signal(); cond3 = Close < EMACALC AND MACD() < Signal(); _SECTION_BEGIN("Price"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); SetBarFillColor(IIf(Cond1,ParamColor("Candle UP Color", colorGreen),IIf(Cond3,ParamColor("Candle Down Color", colorRed),colorYellow))); Plot(C,"\nPrice",IIf(cond1,ParamColor("Wick UP Color", colorDarkGreen),IIf(cond3,ParamColor("Wick Down Color", colorDarkRed),colorYellow)),64,0,0,0,0); //Plot( C, "Close", ParamColor("Color", colorgreen ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); _SECTION_END(); //============== TITLE ============== _SECTION_BEGIN("Title"); Title = EncodeColor(colorGold)+ "GRAFICO BASICO" + EncodeColor(colorRose)+" (" + Name() + ") " + EncodeColor(colorGold)+ Interval(2) + " " + Date() +" " +" • Open "+WriteVal(O,1.20)+" • "+"High "+WriteVal(H,1.20)+" • "+"Low "+WriteVal(L,1.20)+" • "+ "Close "+WriteVal(C,1.20)+" • Variação R$ = " +WriteVal(C-Ref(C,-1),1.20,0)+" • Variação % = " +WriteVal((C-Ref(C,-1))*100/Ref(C,-1),1.2)+ "% • Volume = "+ WriteVal(V,1.0); upbar = COND1; downbar = COND3; /* Colourized price bars drawn here */ Graph0 = Close; Graph0Style = 64;//number 64 = candlestick or 128 = bar; barcolor = IIf( downbar, 4, IIf( upbar, 5, 42 ) );//number 4 = red, number 5 = green and number 42 = yellow; Graph0BarColor = ValueWhen( barcolor != 0, barcolor ); _SECTION_END(); Plot(EMACALC, "EMACALC", colorWhite, styleLine,0,0,0,0,2); |
How to Use AFL for Amibroker
- Download Amibroker AFL File.
- Now copy the afl file and paste it to \Program Files\AmiBroker\Formulas\Custom. [For 32 bit]
- Have you 64 bit operating system? Than paste it to : \Program Files(x86)\AmiBroker\Formulas\Custom.
- Go to formula section of Amibroker and you will get the afl in Custom folder.
Don’t Know How To Set Amibroker? Than Just Watch our Video Tutorial.
Tags amibroker afl
0 thoughts on “Trend AFL For Amibroker That Absolutely Save Analysis Time [Trend Chart v.2]”