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

RE: [amibroker] DateTime() and DateTimeToStr question



PureBytes Links

Trading Reference Links

I think you'll just have to make a date to text function 
http://www.amibroker.com/library/detail.php?id=362&hilite=DateNum

Just compute the future date and print it to the Interpretation window.

--
Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Andy Davidson
Sent: Tuesday, July 04, 2006 12:03
To: Amibroker Yahoo Group
Subject: [amibroker] DateTime() and DateTimeToStr question

I'm trying to use the DateTime() function in the Title of an indicator 
to show what the *predicted future date/time* of an event might be. 
Before anyone groans(!) I'm not a complete novice and aware that my data

cannot predict the future... :-)
However, I have an indicator which plots, amongst other things, a sine 
wave and I would like the Title to tell me what the date/time will be 
when the next peak or trough will occur based on the currently plotted 
wavelength.
Here is the relevant part of the code that I came up with before I hit 
the brick wall
(the "bars" variable is calculated previously in the code as the number 
of bars beyond the last bar in the chart where the peak or trough will
be)

nextDateTime =  LastValue(DateTime()) + bars*Interval() ;     (I am 
guessing that this gives me a numerical value for the future date &
time)

Title = ...."some stuff".... + "On " + DateTimeToStr(nextDateTime);

Problem seems to be that the functions do not like referencing beyond 
the last bar. The displayed string is always just the date & time of the

most recent bar.

Can anyone help?
TIA

		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new
Yahoo! Security Centre. http://uk.security.yahoo.com


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links