DALE¬!! THREE-BAR INSIDE BAR PATTERN ! Author: Johnan Prathap TASC March 2011 ! Coded by: Richard Denning 01/11/2011 ! www.TradersEdgeSystems.com !! INPUTS: SLpct is 0.75. PTpct is 0.75. !!ABBREVIATIONS: O is [open]. O1 is valresult(O,1). L is [low]. L1 is valresult(L,1). H is [high]. H1 is valresult(H,1). C is [close]. C1 is valresult(C,1). OSD is offSetToDate(month(),day(),year()). RunDate is ReportDate(). PD is {position days}. PEP is {position entry price}. !! BAR PATTERN RULES: UpC if C > C1. DnC if C < C1. InBar if H < H1 and L > L1. !! ENTRY & EXIT RULES: ! LONG ENTRY: LE if UpC and valrule(InBar,1) and valrule(UpC,2). ! SHORT ENTRY: SE if DnC and valrule(InBar,1) and valrule(DnC,2). ! EXIT LONGS: PT is PEP * (1+PTpct/100). SL is PEP * (1-SLpct/100). LX_PT if H >= PT. LX_SL if L <= SL. LX if LX_PT or LX_SL. ! EXIT SHORTS: PTs is PEP * (1-PTpct/100). SLs is PEP * (1+SLpct/100). SX_PTs if L <= PTs. SX_SLs if H >= SLs. SX if SX_PTs or SX_SLs. ! EXIT PRICING LONGS: LX_Price is iff(LX_SL,min(SL,O),iff(LX_PT,max(PT,O),-99)). ! EXIT PRICING SHORTS: SX_Price is iff(SX_SLs,max(SLs,O),iff(SX_PTs,min(PTs,O),-99)).  Rule Libraryÿÿ CCodeViewLEÿÿ CReportViewÐSymbolÀ<SE€ÐSymbolÀ< ETF-IDXÿÿÿÿÿÿ CBackTestPropertyLELXPPh ThreeBarInside LESPXPETF-IDX UUUUUÍã@«ªªª,Íã@ÿÿÿÿ€â@@Íã@€SESXPPh ThreeBarInside SESPXPSX_PriceETF-IDX UUUUUÍã@«ªªª,Íã@ÿÿÿÿ€â@@Íã@00:00