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

[amibroker] BuyPrice problem



PureBytes Links

Trading Reference Links



I'm having a tough time getting the correct buy price for use in 
calculations of profit target.  The back test shows the correct 
entry price of a trade this morning, 5.65.  However the Buy Price is 
reported as 5.67.  The buy is at market on the next bar and I assume 
should show as Open Price.  I get the same results using the Buy 
Price parameters in Setup as
BuyPrice = Open; in the code.

Here is a snippet of code and the results from _Trace and the back 
test.  What am I doing wrong?

Thanks
Guy


Buy  = InTradeWindow AND (CloseEntry OR LowEntry);
BuyPrice = Open;
_TRACE(NumToStr(BuyPrice));


[3344]    5.670


Ticker	Trade	Date		Price	Ex. date	Ex. Price
	
Novl		Long	2/23/2005 	9:44:00 AM		5.65









------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/