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

[amibroker] Price at Specified Time


  • Date: Fri, 8 Jan 2010 13:53:16 -0800 (PST)
  • From: B S <bs2167@xxxxxxxxx>
  • Subject: [amibroker] Price at Specified Time

PureBytes Links

Trading Reference Links



Hi-
 
I am using intraday data and would like to be able to get the price from the exact same time of day as the current bar but from x days ago.  I tried to accomplish this with ValueWhen() but I can't think of a way to set the current bar time constant.  Can anyone help?
 
x=2;

CurrBarTime = TimeNum();

ValAtTime = ValueWhen(TimeNum() == CurrBarTime,C,X);

 

...obviously the CurrBarTime just continues to roll back along with the ValueWhen function. 

 

Also, if I can get this to work, I am likely to come across a scenario where there is no bar available for exactly same time on previous days.  In that instance I'd like to take the next closest bar...would also appreciate any thoughts on how to do that.. 

 

Thank you.




__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___