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

[amibroker] Re: Delaying A Buy or Sell



PureBytes Links

Trading Reference Links

Thanks Nick but I didn't want to have to run a backtest
everytime I was looking for a trade signal. Basically I am trying to 
get my hands around the syntax and flow of AFL and for some reason I 
am having trouble. But Steve fixed me up and it makes since to me 
what he did.

Rusty

--- In amibroker@xxxxxxxxxxxxxxx, "Nick Robinson" <nickrobinson@xxxx> 
wrote:
> Try the backtester settings under trades to delay buys and sells by 
any
> number of days you want.
> 
> Nick
> ----- Original Message ----- 
> From: "kandrstocks" <kandrstocks@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, September 14, 2005 10:17 AM
> Subject: [amibroker] Delaying A Buy or Sell
> 
> 
> > Here is my code I am working on just to try and understand AFL.
> > Nothing big just a cross of a 13 and 5 day ema. How Can I delay 
the
> > buys and sells for a given number of bars or days? I have tried
> > barssince function without any luck. I am sure I am doing 
something
> > wrong but getting frustrated and thought someone here could help 
me a
> > bit.
> >
> > Thanks
> > Rusty
> > MaxGraph = 18;
> > Plot ( Close, "Close", colorBlack, styleBar);
> > Graph3Style = 1;
> > Graph3Color = 43;
> > Graph3 = EMA (Close, 5);
> > Graph4Style = 1;
> > Graph4Color = 42;
> > Graph4 = EMA (Close, 13);
> > Graph5Style = 1;
> > Graph5Color = 32;
> > Graph5 = (EMA (Close, 200));
> > Graph6Style = 1;
> > Graph6Color = 21;
> > Graph6 = ((EMA (Close, 200))- (EMA (Close, 200))*.13) ;
> >
> > //Buy = Cross( EMA( Close, 5), EMA( Close, 13 ) ) AND Close > EMA
> > (Close,200);
> > //Buy = Cross( EMA( Close, 5), EMA( Close, 13 ) ) AND Close < EMA
> > (Close,200);
> > Buy = (EMA( Close, 5)> (EMA(Close, 13)))  AND Cross( (EMA( Close,
> > 5)), EMA( Close, 13 ) );
> >
> > //Sell = Cross( EMA( Close, 200 ), Close );
> > Sell = (Cross( EMA( Close, 13), EMA( Close, 5 ) ));
> >
> > PlotShapes( shapeUpArrow*Buy, colorGreen,0, L, -20);
> >
> > PlotShapes( shapeDownArrow*Sell, colorRed,0,H, -20) ;
> >
> >
> >
> >
> >
> >
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/