PureBytes Links
Trading Reference Links
|
Hi, the following is a simple crossover system. I would like to add to
the sell line a condition that not only sells on the EMA cross but
also on a specific date such as 1-dec-2004.
I want to do this so there is no open positions at the end of the
backtest period.
Regards and thanks......Keith
Plot(C,"Close Price", colorRed,styleBar);
Plot(EMA(C,30),"EMA - 30 Period",colorYellow,styleLine);
Buy = EMA(C,30) > Ref(EMA(C,30),-1);
Sell= Ref(EMA(C,30),-1) > EMA(C,30);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
PlotShapes(shapeUpArrow*Buy+shapeDownArrow*Sell,
IIf(Buy,colorBrightGreen,colorYellow));
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
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/
|