Yeah thanks it worked. Regards
On Sat, Sep 4, 2010 at 10:40 PM, soni67c <[email protected]> wrote: > > > Hello M.D.kumar, > > check this. > > Plot(C,"",3,64); > > A1=SAR(0.02,0.2); > Cond3=Cross(C,A1); > Cond4=Cross(A1,C); > Plot(A1, "K", colorOrange, 24 ); > PlotShapes(Cond3*shapeHollowUpArrow,colorBlue,0,L,-10); > PlotShapes(Cond4*shapeHollowDownArrow,colorBlack,0,H,-10); > > TimeFrameSet(in1Minute*30); > A=SAR(0.02,0.2); > TimeFrameRestore(); > K = TimeFrameExpand(A, in1Minute*30); > Cond1=Cross(C,K); > Cond2=Cross(K,C); > col = IIf(K < L,colorGreen,IIf(K > H,colorRed,colorWhite)); > Plot(K, "K", col, 24 ); > PlotShapes(Cond1*shapeUpArrow,colorGreen,0,L,-20); > PlotShapes(Cond2*shapeDownArrow,colorRed,0,H,-20); > > Buy=Cond1 AND Cond3; > Sell=Cond2 AND Cond4; > Buy=ExRem(Buy,Sell); > Sell=ExRem(Sell,Buy); > PlotShapes(Buy*shapeUpTriangle,colorGreen,0,L,-35); > PlotShapes(Sell*shapeDownTriangle,colorRed,0,H,-35); > > Thank you > > --- In [email protected] <amibroker%40yahoogroups.com>, "mdkumarz" > <mdkum...@...> wrote: > > > > Dear Sir, > > I somehow messed up with this simple logic. > > Buy: if Close> Parabolic SAR in 30 min then > > if close> parabolic SAR in 10 min > > SELL:if Close< Parabolic SAR in 30 min then > > if close< parabolic SAR in 10 min > > The AFL code follows: > > > > TimeFrameSet(in1Minute * 30); > > A=SAR(0.02,0.2); > > Cond1=C>SAR(0.02,0.2); > > Cond2=C<SAR(0.02,0.2); > > TimeFrameRestore(); > > K = TimeFrameExpand(A, in1Minute * 30); > > Cond3=C>SAR(0.02,0.2); > > Cond4=C<SAR(0.02,0.2); > > Plot(K, "K", colorRed, styleDots ); > > Buy=Cond1 AND Cond3; > > Sell=Cond2 AND Cond4; > > Buy=ExRem(Buy,Sell); > > Sell=ExRem(Sell,Buy); > > > > Regards, > > M D KUMAR > > > > > -- Yours sincerely, M D KUMAR [email protected], 7666686533
