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

RE: [amibroker] Enhancement Request - "Playback" Function



PureBytes Links

Trading Reference Links

In an exploration, I want to figure out the future exit price for Buy or
Short signal occurring on the current bar. IOW, the SellPrice or CoverPrice
at the time of the next Sell or Cover signal occurring after the entry.

Ignoring trade delays for the moment I did this:

ExitPrice =
	IIf(Buy, ValueWhen(Sell, SellPrice, 0),
	IIf(Short, ValueWhen(Cover, CoverPrice, 0),
	Null));

It's right I think, except that it returns Null for the first Buy and Short
signals in the exploration, and I don't know why. I can see why it would be
Null at first if I was looking backwards, since no exit signals exist before
then, but I'm looking forwards into the future, where exit signals most
definitely do exist.

What's wrong with my thinking?

(And don't worry, this is an analysis tool, not a trading system, so looking
into the future isn't a bad thing.)

Thanks,

Dave Merrill


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/