Is there any way to get access to bar time stamps with milliseconds? Clearly this is available as my Data Box show bar times: 18:00:00:023 (bar index 447), 18:00:00:023 (bar index 448), 18:00:00:023 (bar index 449), 18:00:00:023 (bar index 450) . This time stamp is not available with Time[0] which only gives 18:00:00 (actually 6:00:00 PM) for those bars. If yes, how? Please advise. Thank you.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Time Stamps
Collapse
X
-
Time Stamps
Hi,
Is there any way to get access to bar time stamps with milliseconds? Clearly this is available as my Data Box show bar times: 18:00:00:023 (bar index 447), 18:00:00:023 (bar index 448), 18:00:00:023 (bar index 449), 18:00:00:023 (bar index 450) . This time stamp is not available with Time[0] which only gives 18:00:00 (actually 6:00:00 PM) for those bars. If yes, how? Please advise. Thank you.Tags: None
-
Hello Zeos6,
Thanks for opening the thread.
You can read the milliseconds of a DateTime object by changing the format.
For example:
Print(Time[0].ToString("hh:mm:ss.fff"));
For more information on customizing DateTime strings please see the publicly available reference found here: https://docs.microsoft.com/en-us/dot...format-strings
Please let me know if I may be of further assistance.JimNinjaTrader Customer Service
-
Hi Jim,
Thank you for your response. I am aware of changing the format but did not think of applying it to Time[0]. D'oh!
However, that isn't what I was after. I asked my question poorly. Here is a clarification...
In the drawing objects, one of the options for drawing a line is startTime and endTime, which are DateTimes. If Time[0] is used as a start or end time, the "default" format of Time[0] is used; i.e. time stamp accurate only to seconds. Is there a way of being able to use a time stamp with milliseconds accuracy in the drawing objects?
Comment
-
Hello Zeos6,
Thanks for your reply.
As I understand this inquiry is related to your other post below?
The Drawing Tools will snap to an associated slot and there would not be a way to have it plot to an exact time. I have submitted a feature request on your behalf for Drawing Tool overloads that plot an exact time.
In the meantime, you would be able to do this via custom rendering. Keep in mind that the implementation would be very specific and involved for your purposes and providing clear direction for such an advanced technique begins to escape the scope of services we may provide.
If you have additional questions surrounding this matter, let's keep our conversation in one thread so we may keep the discussed information in one place.JimNinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Tim-c, Today, 08:36 AM
|
4 responses
13 views
0 likes
|
Last Post Today, 02:45 PM | ||
Started by JohnS52, 03-22-2024, 08:06 AM
|
4 responses
28 views
0 likes
|
Last Post
by JohnS52
Today, 02:30 PM
|
||
Started by RaygunWizzle, Yesterday, 08:52 PM
|
2 responses
11 views
0 likes
|
Last Post
by RaygunWizzle
Today, 02:26 PM
|
||
Started by carnitron, 03-25-2024, 01:59 PM
|
11 responses
51 views
0 likes
|
Last Post
by carnitron
Today, 02:18 PM
|
||
Started by Gerik, 12-21-2023, 08:20 AM
|
15 responses
203 views
0 likes
|
Last Post
by Mindset
Today, 02:06 PM
|
Comment