Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaTrader7: display time and date in chart

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NinjaTrader7: display time and date in chart

    Hello everybody
    I have a short question. I know this topic has been discussed many times but I have not found a solution for NinjaTrader 7.
    How can you easily display the time and date?
    I have attached the picture as I imagine
    Many thanks for your help
    Attached Files
    Last edited by bounty007; 10-26-2017, 04:11 AM.

    #2
    Hello bounty007,

    Thank you for the post and welcome to the NinjaTrader forum.

    I was not able to find a chart date/time display on the forums, so I modified the BarTimer indicator to print the time and date on the bottom right of the chart. Please see attached sample indicator.

    You can import this indicator by going to File > Utilities > Import NinjaScript > select the downloaded .zip file > Open. If NinjaTrader asks you to replace any files, say No.

    Here are some links to get you started with NinjaScript:



    You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:

    Click here to see our NinjaScript Reference Samples: http://www.ninjatrader.com/support/f...splay.php?f=30
    Click here to see our NinjaScript Tips: http://www.ninjatrader.com/support/f...ead.php?t=3229

    Please let us know if you have any questions on the material.
    Attached Files
    Last edited by NinjaTrader_ChrisL; 10-27-2017, 10:34 AM. Reason: Added example

    Comment


      #3
      Hi
      Super thank you.
      A small new problem.
      If I have now but the bar-timer still have, now these two lines come one over the other. (Time, Date & Bar-Timer) See the new picture
      Attached Files

      Comment


        #4
        Hello bounty007,

        Thanks for the follow-up.

        You can open the code (Tools>Edit NinjaScript), look for this line at the bottom:

        Code:
        graphics.DrawString(DateTime.Now.ToString(), ChartControl.Font, textBrush, bounds.X + bounds.Width - textWidth, bounds.Y + bounds.Height - textHeight, stringFormat);
        And replace that line with this:

        Code:
        graphics.DrawString(DateTime.Now.ToString(), ChartControl.Font, textBrush, bounds.X + bounds.Width - textWidth,( bounds.Y + bounds.Height - textHeight)-10, stringFormat);
        Then press F5 to compile, then press F5 on your chart to reload the NinjaScript.

        You can see that I modify the Y coordinate of the string being printed. This script is for educational purposes only.

        Please refer to the following links for further help on NinjaScript:





        Please let us know if we may be of any further assistance.

        Comment


          #5
          Like this?
          Attached Files
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            Hi can we do that on NT8?

            Comment


              #7
              Hi jdextras, thanks for your note.

              You can modify just about any chart element in NT8. There are a few examples posted here on adding your own elements to the chart, chart trader, superDOM, etc.

              Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've


              If you have any questions on this please let me know.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CarlTrading, 03-31-2026, 09:41 PM
              1 response
              128 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              73 views
              1 like
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              116 views
              2 likes
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              109 views
              1 like
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              88 views
              0 likes
              Last Post CarlTrading  
              Working...
              X