Hello Ed, Thats quite right except that to enter a long trade the only condition that is required is that the previous bar is green and you have atleast 3 down bars before the green bar. i.e.,
bc1 = Ref(tt >= 3,-1) AND (C > O) AND dmap > 0; Infact, in the seminar, the setup was to enter intraday as soon as the last redbar's (downday's) low was taken out. But for EOD i think this setup is close enough. BTW, his presentation is very entertaining. thanks Chaitanya. --- In [email protected], "Edward Pottasch" <[EMAIL PROTECTED]> wrote: > > Chaitanya, > > not exactly sure if I have understood your system but here is my interpretation below. When in a long term uptrend the price moves down 5 consecutive bars and then closes green including a higher high is set then buy the next bar at the open, similar story for short, > > Ed > > > per =220; > > // use map for the trend indicator > map = MA(C,per); dmap = map - Ref(map,-1); > > // number of downbars > tt = NumDownBars = BarsSince( C >= Ref(C,-1)); > // number of up bars > ss = NumUpBars = BarsSince( C <= Ref(C,-1)); > > // buy constraint: down 5 bars in a row, then last bar high greater than previous high, trend is up > bc1 = Ref(tt >= 5,-1) AND H > Ref(H,-1) AND C > Ref(C,-1) AND dmap > 0; > Buy = bc1; > Buy = Ref(Buy,-1); BuyPrice = O; > > sc1 = Ref(ss >= 5,-1) AND L < Ref(L,-1) AND C < Ref(C,-1) AND dmap < 0; > Short = sc1; > Short = Ref(Short,-1); ShortPrice = O; > > SetChartOptions(0, chartShowDates); > GraphXSpace = 5; > Plot(C,"C",1,64); > > PlotShapes(IIf(Buy,shapeUpArrow,0),colorWhite, layer = 0, yposition = BuyPrice, offset = 0 ); > PlotShapes(IIf(Short,shapeHollowDownArrow,0),colorLightBlue, layer = 0, yposition = ShortPrice, offset = 0 ); > >
