Showing posts with label AFL CODE- MACD (BUY SELL SIGNALS). Show all posts
Showing posts with label AFL CODE- MACD (BUY SELL SIGNALS). Show all posts

Thursday, October 10, 2024

AFL CODE- MACD (BUY SELL SIGNALS)


_SECTION_BEGIN("MACD");

r1 = Param( "Fast avg", 12, 2, 200, 1 );

r2 = Param( "Slow avg", 26, 2, 200, 1 );

r3 = Param( "Signal avg", 9, 2, 200, 1 );

Plot( ml = MACD(r1, r2), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), 

IIf(MACD(r1,r2)<Signal(r1,r2,r3), IIf(MACD(r1,r2)>0,colorPink,colorRed),IIf(MACD(r1,r2)<0,colorTurquoise,colorGreen)) , ParamStyle("MACD style", styleThick) );

Plot( sl = Signal(r1,r2,r3), "Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorDarkBlue ), ParamStyle("Signal style", styleThick) );

Plot( ml-sl, "MACD Histogram", IIf(ml>sl,IIf(ml>0,colorLime,colorBlue),IIf(ml<0,colorDarkRed,colorPink)), ParamStyle("Histogram style", styleHistogram | styleNoLabel, maskHistogram ) );

Line1= LineArray (0,0,LastValue(BarIndex()),0,20);

Plot (Line1,"Zero line", colorLightGrey, styleDashed | styleNoTitle);

_SECTION_END();

 👉Tải tại đây

https://drive.google.com/file/d/1gSsyZuBqSFsn7XKQlmN63HZikG_rtiy5/view?usp=drive_link

Cách sử dụng AFL  cho Amibroker  

Tải xuống tệp Amibroker AFL. 

Bây giờ hãy sao chép tệp afl và dán vào vị trí cài Amibroker  

D:\A KY PC\Win\Amibroker\Formulas\VIP free