below Rohits idea in Amibroker AFL code. The systeem needs some additional rules. As is it is not profitable imo.
SetTradeDelays(0,0,0,0);
SetOption("CommissionMode",3);
SetOption("CommissionAmount",2.01);
SetOption("FuturesMode",True);
NumContracts=1;
PositionSize=NumContracts*MarginDeposit;
SetOption("MaxOpenPositions",4);
TimeFrameSet(inDaily);
HH=Max(Ref(H,-1),Ref(H,-2));
LL=Min(Ref(L,-1),Ref(L,-2));
TimeFrameRestore();
HH=TimeFrameExpand(HH,inDaily,expandFirst);
LL=TimeFrameExpand(LL,inDaily,expandFirst);
Buy=Cross(C,HH);BuyPrice=C;
Short=Cross(LL,C);ShortPrice=C;
Buy=ExRem(Buy,Short);
Short=ExRem(Short,Buy);
Sell=Short;SellPrice=ShortPrice;
Cover=Buy;CoverPrice=BuyPrice;
SetChartOptions(0, chartShowDates);
Plot(C,"",colorWhite,64);
Plot(LL,"\nLL",colorRed,styleDashed);
Plot(HH,"\nHH",colorGreen,styleDashed);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,L,-15);
PlotShapes(IIf(Buy,shapeHollowSmallCircle,shapeNone),colorWhite,0,BuyPrice,0);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,-15);
PlotShapes(IIf(Sell,shapeHollowSmallCircle,shapeNone),colorWhite,0,SellPrice,0);
PlotShapes(IIf(Short,shapeDownTriangle,shapeNone),colorYellow,0,H,IIf(Short AND Sell,-30,-15));
PlotShapes(IIf(Short,shapeHollowCircle,shapeNone),colorWhite,0,ShortPrice,0);
PlotShapes(IIf(Cover,shapeUpTriangle,shapeNone),colorLightBlue,0,L,IIf(Cover AND Buy,-30,-15));
PlotShapes(IIf(Cover,shapeHollowCircle,shapeNone),colorWhite,0,CoverPrice,0);