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

[amibroker] Question - Formula control of Commissions



PureBytes Links

Trading Reference Links

Is there a way to change the commission within an AFL formula, or 
must it be changed on the settings screen? 

Or is there a way to turn off AB's range check for its BuyPrice, 
SellPrice, Shortprice, Coverprice arrays?

I have looked over the documentation but can not find an answer.

The following works some of the time. It does not work if price ends 
up outside the high-low range for the day. AB's documentation says 
AB checks for this and forces the price arrays to be within the high-
low range.

   slippage = 0.01   ;// 0.01 = 1%, 
   BuyPrice  = CoverPrice = Open *(1+ slippage);
   SellPrice = ShortPrice = Open *(1- slippage);

This works if the Open is not the high or low for the day. But if 
the Open is the high or low, then the buy/sell prices are brought 
back within the high-low range and the trade executes without 
slippage (would be nice in the real world). 

So to be sure to each trade takes slippage into account, I have to 
include it in the "commission" percent on the settings screen. That 
create a potential problem, because I use different slippage 
assumptions for AFL formulas for low priced stocks than for high 
priced. It is too easy for me to forget to go to the settings page 
and change the commission when I load a different AFL formula. That 
brings back the original questions:

Is there an AFL command to change the commission? Or do I always 
have to click to the settings page to change this?

Or is there a way to turn off AB's range check for its BuyPrice, 
SellPrice, Shortprice, Coverprice arrays? 

Thanks in advance.
 

b





------------------------ 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/l.m7sD/LIdGAA/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/