PureBytes Links
Trading Reference Links
|
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 <pmxgs@xxxxxxxxxx> 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
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|