View Full Version : Time Format
08-13-2007, 04:35 AM
I use an indicator doing this :
Print(">>BUY " + Time.Ticks.ToString() + " : " + Close.ToString("0.00"));
in the output window I get :
'>>>BUY 633222774000000000 : 1478.50'
I searched in the Help File and couldn't find out the way to code my indicator so as to get a time stamp in the line of the T&S Window, for instance : 17:29:56 which is a more readable HH:MM:SS format.
08-13-2007, 04:41 AM
Print(">>BUY " + Time.ToString() + " : " + Close.ToString("0.00"));
08-13-2007, 05:16 AM
I already tried that but I wish to display the accurate time not the bar time; so I guess I will have to convert time stamp from 100-nanosecond units.
08-13-2007, 06:01 AM
You mean the actual local time of your PC? Please try this:
Print(">>BUY " + DateTime.Now.ToString() + " : " + Close.ToString("0.00"));
08-13-2007, 06:11 AM
Actually, what I am looking for is the accurate T&S time but I guess this is out of the scope of this forum support; so when I have some time left I will cope with converting from nanoseconds.
08-13-2007, 06:17 AM
Dealing with nanoseconds does not make difference: Time still will be the timestamp of the actual and not the time as a tick came in (like in T&S window). You need to write to the market data stream, which is not officially supported in NT6, but will be in NT 6.5, fall time frame. Please take a look at e.g. VolumeProfile indicator, OnMarketData method if you want to get into that based on NT6.
08-13-2007, 06:45 AM
As I already figured out that NT 6.5 release is going to be a golden one because, in my opinion, access to market data is one of the most valuable clues.