PureBytes Links
Trading Reference Links
|
hello,
Buy = C > Ref(C,-1) AND Ref(C,-1) > Ref(C,-2);
/* N-bar stop */
BuyPrice=C;
Sell=0;
ApplyStop( stopTypeNBar, stopModeBars, 5 );
Equity(1,0);Plot(C,"",1,64);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,
0,Low,-20 );
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed
,0, High,-20 );
> Good day,
>
> I want to implement a simple Exit strategy, namely EXITING after 5
> trading days.
>
> I have created a simple strategy for backtesting: (still learning):
>
> Buy = Ref(C,-1) > Ref(C,-2) AND //buy after 2 up-Closes
> Ref(C,-2) > Ref(C,-3):
>
> BuyPrice = (Ref(C,-1); //Buy today at yesterdays Close
(Limit)
> ----------------------------------------------------------------
> Now I want to sell after 5 days.
>
> Went to the Backtester and Settings > Stops and set the "N-Bar
Stop"
> to 5.
> After doing this, I get the following error message from backtester:
>
> "Missing Buy/Sell Variable assignment".
>
> What am I doing wrong?
>
> Thanks.
>
> Werner
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|