PureBytes Links
Trading Reference Links
|
Thank you, that was it.
BTW it should be
SellPrice=iif(cond1,c,c-c*.0075); 7.5% is a pretty steep commission!
dale b
--- In amibroker@xxxxxxxxxxxxxxx, b <b519b@xxxx> wrote:
> By default, AB checks to make sure the sellprice is not
> higher than the high or lower than the low and if it is out
> of bounds, it is put back in bounds. That is why your IIF
> statement does not work.
>
> The good news is TJ has added the ability to turn off range
> checking:
>
> SetOption("PriceBoundChecking", False );
>
> Try that. Your "IIF" statement should now work.
>
> b
>
> --- msc626 <msc626@xxxx> wrote:
> > Is there any way to incorporate Commissions in the back
> > tester based
> > on the length of time a position is held? Some mutual
> > funds I trade
> > have a minimum holding period.
> > For example how could the following code be modified:
> >
> > BUY = ...my Buy signal;
> >
> > sellCond1 = BarsSince(Buy) > 21; // Minimum 21 day
> > holding period
> > sellCond2 = ...my stop loss condition;
> > Sell = (...my Sell Condition AND sellCond1) OR
> > sellCond2;
> >
> > SellPrice = iif(sellCond1,Close,Close-Close *
> > 0.075);//This doesn't
> > work
> >
> > SellPrice doesn't work because mutual funds have no OHL
> > prices and
> > AmiBroker fills these arrays with the Close---
> > O=H=L=C---, so the
> > backtester adjusts SellPrice to the close.
> >
> > Any hints appreciated.
> >
> > dale b
> >
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/
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 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
---------------------------------------------------------------------~->
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/
|