Showing posts with label AFL CODE-WEIS WAVE. Show all posts
Showing posts with label AFL CODE-WEIS WAVE. Show all posts

Thursday, October 10, 2024

AFL CODE-WEIS WAVE


 _SECTION_BEGIN("WeisWave");

//up[0] = V[0]; 

//dn[0] = V[0];

//vol[0] = V[0]; 

trend[0] = 0;

wave[0] = 0;

vol[0] = 0;

mov[0] = 0;

dif=1;

rp    = Param("Reversal Bars", 0.1,0.01,5,0.01);

for( i=1; i<BarCount; i++) {

 

if (Close[i]-Close[i-1]>rp) mov[i]=1;

if (Close[i]-Close[i-1]==rp) mov[i]=0;

if (Close[i]-Close[i-1]<-rp) mov[i]=-1; 

 

if ((mov[i]!=0) && (mov[i]!=mov[i-1])) 

{

trend[i]=mov[i];

else {trend[i]=trend[i-1];} 

if ((trend[i]!=wave[i-1]) && (abs(Close[i]-Close[i-1])*10000>=dif)) 

{

wave[i]=trend[i];

else

{

wave[i]=wave[i-1];

}    

if (wave[i]==wave[i-1]) 

{

vol[i]=vol[i-1]+Volume[i];

else

{

vol[i]=Volume[i];

}

 

if (wave[i]==1) 

{

up[i]=vol[i]; 

dn[i]=0;

}

if (wave[i]==-1) 

{

dn[i]=vol[i]; 

up[i]=0;

}

if (wave[i]==0) 

{

dn[i]=vol[i-1]; 

up[i]=vol[i-1];

}

}

 

  

PlotOHLC(0,up,0,up,"SwingWave",5 , 2|styleThick ) ;

PlotOHLC(0,dn,0,dn,"",4 , 2|styleThick ) ;

 

 

 

 

GfxSetOverlayMode(1);

GfxSetTextColor(10); 

GfxSelectFont("MS Sans Serif", 6, 300, False, False, 0); 

GfxTextOut(" By : Casoni ", Status("pxwidth")-60 , Status("pxheight")-13 );

_SECTION_END();

👉Tải tại đây

https://drive.google.com/file/d/143XfedBNN2ewUheadd2nB0JfVvlZGGhC/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