Thursday, October 10, 2024

AFL CODE-CHỈ BÁO ĐỘNG


// Chi bao xu huong

_SECTION_BEGIN("Chi bao xu huong");


VAR2=(High+Low+(Close)*(2))/(4);

B = ((EMA((VAR2-LLV(VAR2,15))/(HHV(Low,15)-LLV(VAR2,15)),2))*(38));

Plot(b, "", 4, 1+4);

bot1 = ((((-1))*(EMA((VAR2-LLV(VAR2,15))/(HHV(Low,15)-LLV(VAR2,15)),2))+0.01)*(38));

Plot(bot1, "", 4, 1+4);

VAR22=((Close-LLV(Low,10))/(HHV(High,10)-LLV(Low,10)))*(100);

VAR33=EMA(VAR22,10);

VAR44=EMA(VAR33,10);

VAR55=(3)*(VAR33)-(2)*(VAR44);

VAR66=EMA(VAR55,5);

BridgeT = (EMA(VAR66,1));

Plot(bridget, "", IIf(bridget > Ref(bridget,-1),colorCustom12,colorBlue), 1+4);

Plot(-bridget, "", IIf(bridget > Ref(bridget,-1),colorCustom12,colorBlue), 1+4);


trend = (5)*(EMA(((Close-LLV(Low,27))/(HHV(High,27)-LLV(Low,27)))*(100),5))-

(3)*(EMA(EMA(((Close-LLV(Low,27))/(HHV(High,27)-LLV(Low,27)))*(100),5),3))-

EMA(EMA(EMA(((Close-LLV(Low,27))/(HHV(High,27)-LLV(Low,27)))*(100),5),3),2);

Buy1 = Cross(trend,5);

PlotShapes( IIf( Buy1, shapeSmallSquare, shapeNone ), colorGreen, layer = 0, yposition = 0, offset = 3 ); 

PlotShapes( IIf( Buy1, shapeSmallSquare, shapeNone ),colorGreen, layer = 0, yposition = 0, offset = -4 ); 


VARA1=((Close>=Ref(Close,-1)) AND (Ref(Close,-1)>=Ref(Close,-2)) AND (Ref(Close,-1)<=Ref(Close,-3)) 

AND (Ref(Close,-2)<=Ref(Close,-3)) AND ((Ref(Close,-4)>Ref(Close,-2)) OR (Ref(Close,-4)<=Ref(Close,-2)) 

AND (Ref(Close,-5)>=Ref(Close,-3))) OR (Close>=Ref(Close,-1)) AND (Ref(Close,-1)<=Ref(Close,-2)) 

AND (Close>=Ref(Close,-2)) AND ((Ref(Close,-3)>Ref(Close,-1)) OR (Ref(Close,-3)<=Ref(Close,-1)) 

AND (Ref(Close,-4)>=Ref(Close,-2))));



VARA2=LLV(Low,5);

VARA3=HHV(High,5);

VARA4=EMA(((Close-VARA2)/(VARA3-VARA2))*(100),4);

VARA5=EMA((0.66699999)*(Ref(VARA4,-1))+(0.333)*(VARA4),2);

VARA6=(VARA5<24) AND (Open<MA(Close,20));


Buy2 =IIf(VARA1 AND (VARA6),30,0);

Plot(Buy2, "", 8,2+4);

Plot(-Buy2, "", 8,2+4);


_N(Title = StrFormat("\\  | {{VALUES}}")+EncodeColor(colorBrightGreen)+WriteIf(Buy2==30,"BuySignal-A","" )+EncodeColor(colorBrightGreen)+WriteIf(Buy1==1," | BuySignal-B",""));



_SECTION_END();


Filter = 1 AND V > 100000;

AddColumn ( buy1,"Mua 1",1, colorDefault,colorDefault,70);

AddColumn ( buy2,"Mua 2",1, colorDefault,colorDefault,70);

AddColumn ( C,"Gia",1.2, colorDefault,colorDefault,70);

AddColumn ( V,"Vol",1, colorDefault,colorDefault,120);


 👉Tải tại đây

https://drive.google.com/file/d/1-DWn5L_sWRYVm0t06SydiBOpUtVg-nNW/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


1 comment: