Thanks!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
display time and date
Collapse
X
-
display time and date
How can I display the current time and date in the chart windows for example in the top left corner?
Thanks!Tags: None
-
-
Hi AlanP,
do you have a version properly working or another utility like this but working ? Because this one is not running with the last NT 8 release ( I franckly dont know with the previous ones...), I mean that when you start NT and opened a chart with this utility installed, you can read date and time but time doesn't update automatically, and time shown compared to the windows clock in the bottom right corner is back ( seconds don't update, and minutes update every 5 minutes ....)
thanks in advance for your kind reply
Best regards
A.
Comment
-
Hello Alinghy,
What you are describing would be the scope of what was provided in this sample, this specifically uses the PC clock time and only updates with the charts bar updates. It sounds like you are using a 5 minute chart if you are seeing this only update each 5 minutes.
You can change the Calculate setting to OnEachTick if you would like to see more frequent updates, however this will still specifically reference the PC clock as that is what is programmed into the sample.
I look forward to being of further assistance.
Comment
-
How can I have the time continuously updates regardless if charts are updating or not?Originally posted by NinjaTrader_Jesse View PostHello Alinghy,
What you are describing would be the scope of what was provided in this sample, this specifically uses the PC clock time and only updates with the charts bar updates. It sounds like you are using a 5 minute chart if you are seeing this only update each 5 minutes.
You can change the Calculate setting to OnEachTick if you would like to see more frequent updates, however this will still specifically reference the PC clock as that is what is programmed into the sample.
I look forward to being of further assistance.
I am looking for a floating clock with seconds to place it on my workspace that updates continuously based on computer clock with seconds.
Any help is appreciated
Comment
-
Hello GussJ,
For an indicator, there would not necessarily be anything I could suggest as this generally relies on some platform events to drive the rendering/script logic. If there is no data to drive the script it would just have to wait.
You could create an addon window if you want a floating clock in the workspace, in a window you can really do whatever you wanted. You could use a timer to update a text control as one possibility. You can find a sample window/addon in the following page: https://ninjatrader.com/support/help...t_overview.htm This would be considered general C#/WPF/Xaml development so most xaml tutorials can assist in understanding how the UI is built in this sample.
I look forward to being of further assistance.
Comment
-
Hello hir04068,
In this sample, Draw.TextFixed is used so this would default to the settings of the tool when not using an overload with a font. You can change the Draw.Text syntax in the script to use an overload that includes a font:
Alternatively, you can replace the ChartControl.Properties.LabelFont with your own font: .Code:Draw.TextFixed(this, "tag1", DateTime.Now.ToString(), TextPosition.TopLeft, ChartControl.Properties.ChartText, [FONT=Helvetica]ChartControl.Properties.LabelFont, Brushes.Blue, Brushes.Transparent, 0); [/FONT]
Please let me know if I may be of additional assistance.Code:new SimpleFont("Arial", 12)
- Likes 1
Comment
-
Hello, Quick question
with DateTime.Now.ToString() - it will print Date and time 6/3/2019 1:19:20 PM
is there a function that will only print the date? don't want time to be printed -like 6/3/2019
With ToDay(Time[0]) it is printing 20190603 --would like to have a separator like above
Thank you.
Comment
-
Hello chalasani,
You can use a format with ToString for this purpose. You can find more infomration about DateTime formats in the public link here: https://www.c-sharpcorner.com/blogs/...p-programming1
Please let me know if I may be of additional assistance.Code:Print(Time[0].ToString("MM/dd/yyyy"));
- Likes 2
Comment
-
Can you share the indicator again please, I see only a screenshot. Thank you !Originally posted by NinjaTrader_AlanP View PostHello Gregorio1980,
I put together an indicator which will draw the current time in the upper left hand corner of the chart. Please see attached.
Please let us know if you need further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
605 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
351 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
561 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment