/*[[ Name := Bheurekso_pattern Author := Bheurekso Link := http://www.darmasdt.com Notes := Pattern Recognizer Separate Window := No First Color := Lime First Draw Type := Symbol First Symbol := 225 Use Second Data := Yes Second Color := Red Second Draw Type := Symbol Second Symbol := 226 ]]*/ Input : Toleransi(3), panah(1), komentar(1); Variable : Pertama(True), TitikUlang(0), Prevbars(0), Kedip(false); Variable : shift(0), shift1(0), shift2(0), shift3(0); Variable : BullEngulf(False), MorningStar(False), BullPierce(False), Hammer(False); Variable : BearEngulf(False), EveningStar(False), DarkCloud(False), Shooter(False); Variable : Harami(False); SetLoopCount(0); If Bars < PrevBars | Bars-PrevBars>1 Then Pertama = True; Prevbars = Bars; If Pertama Then { TitikUlang = Bars-5; Pertama = False; }; TitikUlang += 1; For shift=TitikUlang Downto 0 { // Manjakan MT shift1=shift+1; shift2=shift+2; shift3=shift+3; //*** periksa pola bullish*** //*************************** //--- Bullish Engulfing (2 bars) if c[shift2] < o[shift2] & o[shift1] < c[shift2] & //| l[shift1] < l[shift2]) & c[shift1] > o[shift2] then BullEngulf=True else BullEngulf=False; //--- Bullish Piercing (2 bars) cuma cari kalo ga ada BullEngulf if !BullEngulf then { if c[shift2] < o[shift2] & c[shift1] > o[shift1] & (o[shift1] < c[shift2] | l[shift1] < l[shift2]) & c[shift1] > c[shift2]+((o[shift2]-c[shift2])/2) then BullPierce=True else BullPierce=False; } else { BullPierce=False; }; // Morning Star (3 bars) if c[shift3] < o[shift3] & o[shift2] < c[shift3] & c[shift2] < c[shift3] & (o[shift1] > c[shift2] | h[shift1] > h[shift2]) & c[shift1] >= c[shift3] then MorningStar=True else MorningStar=False; // Hammer if c[shift1] > o[shift1] & (o[shift1]-l[shift1] > max( h[shift1]-c[shift1],c[shift1]-o[shift1])*3 ) then Hammer=True else Hammer=False; //*** periksa pola bearish*** //*************************** //--- Bearish Engulfing (2 bars) if c[shift2] > o[shift2] & c[shift1] < o[shift1] & o[shift1] > c[shift2] & //| h[shift1] > h[shift2]) & (c[shift1] < o[shift2] | l[shift1] < l[shift2]) then BearEngulf=True else BearEngulf=False; //--- Bearish Dark Cloud (2 bars) cuma cari kalo ga ada BearEngulf if !BearEngulf then { if c[shift2] > o[shift2] & (o[shift1] > c[shift2] | h[shift1] > h[shift2]) & c[shift1] < c[shift2]-((c[shift2]-o[shift2])/2) then DarkCloud=True else DarkCloud=False; } else { DarkCloud=False; }; // Evening Star (3 bars) if c[shift3] > o[shift3] & o[shift2] > c[shift3] & c[shift2] > c[shift3] & //| h[shift2] > h[shift3]) & (o[shift1] < c[shift2] | l[shift1] < l[shift2]) & c[shift1] < c[shift3] then EveningStar=True else EveningStar=False; // Shooting Star if c[shift1] < o[shift1] & (h[shift1]-o[shift1] > max( c[shift1]-l[shift1],o[shift1]-c[shift1])*3 ) then Shooter=True else Shooter=False; // Kasih keterangan dan panah Bullish di chart if BullEngulf then { if komentar=1 then SetText(t[shift1],l[shift1]-5*Point,"Engulfing !",Blue); if panah=1 then SetArrow(t[shift1],l[shift1]-1*Point,225,Blue); } else { if BullPierce then { if komentar=1 then SetText(t[shift1],l[shift1]-5*Point,"Piercing !",Blue); if panah=1 then SetArrow(t[shift1],l[shift1]-1*Point,225,Blue); }; }; if MorningStar then { if komentar=1 then SetText(t[shift2],l[shift2]-3*Point,"Morning Star !",Blue); if panah=1 then SetArrow(t[shift2],l[shift2]-1*Point,225,Blue); }; if Hammer then { if komentar=1 then SetText(t[shift1],l[shift1]-2*Point,"Hammer !",Blue); if panah=1 then SetArrow(t[shift1],l[shift1]-1*Point,225,Blue); }; // Kasih keterangan dan panah Bearish di chart if BearEngulf then { if komentar=1 then SetText(t[shift1],h[shift1]+5*Point,"Engulfing !",Magenta); if panah=1 then SetArrow(t[shift1],h[shift1]+1*Point,226,Magenta); } else { if DarkCloud then { if komentar=1 then SetText(t[shift1],h[shift1]+5*Point,"Dark Cloud !",Magenta); if panah=1 then SetArrow(t[shift1],h[shift1]+1*Point,226,Magenta); }; }; if EveningStar then { if komentar=1 then SetText(t[shift2],h[shift2]+3*Point,"Evening Star !",Magenta); if panah=1 then SetArrow(t[shift2],h[shift2]+1*Point,226,Magenta); }; if Shooter then { if komentar=1 then SetText(t[shift1],h[shift1]+2*Point,"Shooting !",Magenta); if panah=1 then SetArrow(t[shift1],h[shift1]+1*Point,226,Magenta); }; // Tampilkan disaat ada konfirmasi. If (BullEngulf | BullPierce | MorningStar | Hammer) & c[shift] > o[shift] then SetIndexValue(shift, l[shift]) else SetIndexValue2(shift,0); If (BearEngulf | DarkCloud | EveningStar | Shooter) & c[shift] < o[shift] then SetIndexValue2(shift, h[shift]) else SetIndexValue2(shift,0); TitikUlang-=1; };