Skip to main content

3 PIXEL (scan Buy) for Amibroker (AFL)

dmr28 almost 4 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    signal, buy, amibroker, pixel

Pixel that only scan buy condition (usually used in Indonesian Stock Market).
It has 3 Condition:
Cond1/OKE = 3 Green (first time 3 pixels are green)
Cond2 = first and second pixels are green
Cond3 = second and third pixels are green

Screenshots

Indicator / Formula

Copy & Paste Friendly
//PIXEL 1 = 5 HARI (BULLISH)
//PIXEL 2 = 4 MINGGU (BULLISH)
//PIXEL 3 = 3 BULAN (BULLISH)

Plot( C, "Price", colorDefault, styleCandle );

TS5HARI  = (Ref(HHV(High,5),-2) + Ref(LLV(Low,5),-2)) /2;  
TS4MING  = (Ref(HHV(High,20),-2) + Ref(LLV(Low,20),-2)) /2;  
TS3BULN  = (Ref(HHV(High,60),-2) + Ref(LLV(Low,60),-2)) /2; 
TS5 = C > TS5HARI;
TS4 = C > TS4MING;
TS3 = C > TS3BULN;
OKE = (TS5 AND TS4 AND TS3);
ZONEPIXEL1 = IIf(OKE,colorBrightGreen,IIf(TS5,colorGreen,colorRed));
ZONEPIXEL2 = IIf(OKE,colorBrightGreen,IIf(TS4,colorGreen,colorRed));
ZONEPIXEL3 = IIf(OKE,colorBrightGreen,IIf(TS3,colorGreen,colorRed));

//SetBarFillColor(IIf(OKE,colorBrightGreen,IIf(TS5,colorGreen,colorRed)));

SetBarFillColor(IIf(OKE,colorBrightGreen,IIf(TS3,colorGreen,colorRed)));
PlotOHLC(0,2,0,2,"PIXEL3",ZONEPIXEL3,styleCandle|styleOwnScale| styleNoTitle | styleNoLabel,0,150);
SetBarFillColor(IIf(OKE,colorBrightGreen,IIf(TS4,colorGreen,colorRed)));
PlotOHLC(3,5,3,5,"PIXEL2",ZONEPIXEL2,styleCandle|styleOwnScale| styleNoTitle | styleNoLabel,0,150);
SetBarFillColor(IIf(OKE,colorBrightGreen,IIf(TS5,colorGreen,colorRed)));
PlotOHLC(6,8,6,8,"PIXEL1",ZONEPIXEL1,styleCandle|styleOwnScale| styleNoTitle | styleNoLabel,0,150);

Buy1 = OKE AND Ref(NOT OKE, -1) AND Volume > 3000000;
Buy2 = TS5 AND TS4 AND Ref(NOT OKE, -1) AND Volume > 3000000;
Buy3 = TS3 AND TS4 AND Ref(NOT OKE, -1) AND Volume > 3000000;
Buy = Buy1 OR Buy2 OR Buy3;

Filter = Buy1 OR Buy2 OR Buy3;
AddColumn(Close,"Close", 1.2);
AddColumn(Volume, "Volume", 1.0);
AddColumn(Buy1, "OKE");
AddColumn(Buy2, "Buy2");
AddColumn(Buy3, "Buy3");

6 comments

3. inad
almost 4 years ago

pixel 1 itu kotak paling bawah atau yang paling atas? terima kasih

Comment hidden — Show
over 3 years ago

Thank you for the code but unfortunately, it’s not showing anything in my chart & analysis results

Leave Comment

Please login here to leave a comment.