I believe applystop in settings window only apply to backtests/scans, could be wrong here To view on chart run the backtest and use Show trade arrows in the chart parameters
-- Cheers Graham AB-Write >< Professional AFL Writing Service Yes, I write AFL code to your requirements http://www.aflwriting.com On 28/03/07, pmxgs <[EMAIL PROTECTED]> wrote: > Hi, > > this code only generates one trade and it should generate more trades. > I've added the plot functions to confirm if the signals were being > correctly generated, and through the chart i can see that the three > conditions are true several times, but only one trade is generated. > In the backtesting settings I have the stops defined. > What am I doing wrong? > > TimeFrameSet(inHourly); > cond1=C>EMA(C,20); > cond2=Ref(MACD(),-2)>0 AND Ref(MACD(),-1)>0; > TimeFrameRestore(); > Cond3=C<EMA(C,20); > cond115m=TimeFrameExpand(cond1,inHourly); > cond215m=TimeFrameExpand(cond2,inHourly); > Buy=cond115m AND cond215m AND Cond3; > Sell=0; > > Plot(Cond115m,"cond115m",colorGreen); > Plot(Cond215m,"cond215m",colorBlue); > Plot(Cond3,"cond3",colorRed); > > thanks >
