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

RE: [amibroker] can somebody help me set a real time scan up



PureBytes Links

Trading Reference Links

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