/*[[ Name := Similar to the BrainTrend2Sig Author := Darma thanks to Bheurekso for mentoring Notes := Link := www.darmasdt.com Separate Window := No First Color := Blue First Draw Type := Symbol First Symbol := 108 Use Second Data := Yes Second Color := Red Second Draw Type := Symbol Second Symbol := 108 ]]*/ input : itunganbar(0), periodBB(20), periodEMA(20); Variable : shift(0); Variable : akujual(false), akubeli(false); Variable : PrevBars(0), Pertama(True), LoopAnjing(0); Variable : AlertTime(0); SetLoopCount(0); If Bars < PrevBars | Bars-PrevBars>1 Then Pertama = True; Prevbars = Bars; If Pertama Then { LoopAnjing = Bars-18; Pertama = False; }; LoopAnjing +=1; For shift=LoopAnjing Downto itunganbar { //di bawah ini utk itung entry point dan exit point if iCustom("BrainTrend2Stop",10,1,500,MODE_FIRST,shift) and not iCustom("BrainTrend2Stop",10,1,500,MODE_FIRST,shift+1) then akujual=True else akujual=false; if iCustom("BrainTrend2Stop",10,1,500,MODE_SECOND,shift) and not iCustom("BrainTrend2Stop",10,1,500,MODE_SECOND,shift+1) then akubeli=True else akubeli=false; if akubeli then SetIndexValue(shift,iCustom("BrainTrend2Stop",10,1,500,MODE_SECOND,shift)); if akujual then SetIndexValue2(shift,iCustom("BrainTrend2Stop",10,1,500,MODE_FIRST,shift)); };