PureBytes Links
Trading Reference Links
|
applystop depends of first pic of BUY array...
if you write
mysignal= dayofweek()==5 ;
delayed= hold(mysignal,period);
BUY= Hold(delayed==1,2) and delayed==0
apllystop must be applied to the BUY (delayed of n period+1 from the
mysignal pic)
> Stephane/Jason,
>
> Thanks for the help. Unfortanately, the applystop
> function overrides the buy and sell signals, so a
> profit stop or a stop loss always triggers a position
> to close, regardless of what the buy/sell array holds
> (so hold does not work).
>
> In the backtester settings, there is a checkbox that
> allows you to activate stops immediately--it says when
> turned on, stops are checked AFTER current bar
> signals. I think this is a typo and should say "when
> turned off", because that is when you get a delay
> until the next day before stops can be triggered.
> What I'd like to do is to activate stops after n
> number of days from the buy or sell signal (current
> functionality is n=0 or n=1 based on the checkbox).
> There must be an elegant way to do this with AFL.
> Perhaps writing your own stop routine using barsince?
>
> Thanks,
>
> Walid
> --- Stephane Carrasset <nenapacwanfr@xxxx> wrote:
> > delay=hold(buy, period);
> > newbuy=hold(delay,2) and not(delay);
> >
> >
> >
> >
> >
> > ,
> > >
> > > I'm familiar with using applystop for n-bar stops,
> > > stop losses, and profit stops, but is there anyway
> > to
> > > set a stop loss or profit stop that only applies
> > after
> > > n days? In other words, say I have a buy signal,
> > and
> > > want to hold for n days before applying a profit
> > stop?
> > > I'm currently using the exremspan function to
> > hold
> > > for n days, and applystop, but this can only work
> > for
> > > a one day hold.
> > >
> > > Thanks,
> > >
> > > Walid
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Protect your identity with Yahoo! Mail
> > AddressGuard
> > > http://antispam.yahoo.com/whatsnewfree
> >
> >
>
>
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
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
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|