[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Exit on specific date.



PureBytes Links

Trading Reference Links

Thanks, I appeciate the help.

Keith

kaveman perth wrote:

> try this
> Sell= Ref(EMA(C,30),-1) > EMA(C,30) or cross(datenum(),1041201);
>
> you could also have cross for the first buy/sell conditions
> Sell= cross(ref(EMA(C,30),-1), EMA(C,30)) or cross(datenum(),1041201);
> which will cut down on the number of extraneous signals
>
>
> On Tue, 07 Dec 2004 22:32:36 -0000, traderkeith2000
> <kosborn3@xxxxxxxxxxxxxx> wrote:
> >
> >
> > 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));
> >
> >
> > 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
> >
> >
> >
> >
> >
>
>
> -- 
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/ <http://e-wire.net.au/%7Eeb_kavan/>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at: 
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
>
> *Yahoo! Groups Sponsor*
> ADVERTISEMENT
> click here 
> <http://us.ard.yahoo.com/SIG=129prr6pp/M=298184.5639630.6699735.3001176/D=groups/S=1705632198:HM/EXP=1102546753/A=2434971/R=0/SIG=11eeoolb0/*http://www.netflix.com/Default?mqso=60185400> 
>
>
>
> ------------------------------------------------------------------------
> *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
>       <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
>        
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/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/