Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator to show the day of the week on the chart

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

    Indicator to show the day of the week on the chart

    Hi Guys,

    does anyone know how to show/ how to display the Day of The week on the chart?

    Is there an indicator that does this?

    I am not a programmer and I am too old to learn now, so if someone can help that would be really appreciated.

    If this exists I need it for both NT7 and NT8.

    Thanks a lot

    #2
    Hello AGL-PL,

    Thank you for writing in.

    While we do not provide custom programming services, this indicator would be simple enough to provide as a sample.

    For further clarification, are you wanting to print the day of week based on your computer's clock or based off of the last bar on your chart?
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Hi Zachary,
      sorry for the late reply.
      First of all, thank you for replying to me.
      Secondly, responding to your question, I would like to have every day of the week printed on the chart based on 0:00 AM New York Time (default 24/7), with the possibility to personalise it with my computer clock as well (I am in Australia)

      This is mainly to identify every trading day on smaller time frames like a 3, 5, 15 min chart. I need it particularly for backtesting.

      Hope you can help.

      Thanks & Regards

      Comment


        #4
        Hello AGL-PL,

        I have created a simple indicator here that will print the day of week on the chart based on 12:00 AM Eastern Time.

        To import this indicator, click on File -> Utilities -> Import NinjaScript from the Control Center.

        You can view the indicator's code by clicking on Tools -> Edit NinjaScript -> Indicator.

        To explain what this script is doing, on lines 39 and 40, we're creating new DateTime objects based on the conversion of the times based on your local PC clock to UTC. Once this is done, we convert UTC to Eastern Time (New York time).

        This gives us the times of each bar on the chart based off of Eastern Time.

        Once we have done this, we compare the converted time of the previous bar to the converted time of the current bar. If their days of week do not match, this denotes that a new day has occurred and we print out text on the chart over that bar with the day of week.

        You can easily change the time zone to convert to by changing the TimeZone parameter for the indicator.

        I would highly suggest taking a look at the following references below for more information about the various methods and properties I am using in this example script:

        ConvertTimeFromUtc(): https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
        ToUniversalTime(): https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
        FindSystemTimeZoneByID(): https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
        Time collection: https://ninjatrader.com/support/help.../nt7/?time.htm
        DrawText(): https://ninjatrader.com/support/help.../?drawtext.htm

        We do have resources to help you begin creating NinjaScript Strategies/Indicators.

        The best way to begin learning NinjaScript is to use the Strategy Wizard. With the Strategy Wizard you can setup conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.

        I'm also providing a link to a pre-recorded set of videos 'Strategy Wizard 301' and 'NinjaScript Editor 401' for you to view at your own convenience.
        Strategy Wizard 301
        NinjaScript Editor 401

        There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under Tools--> Edit NinjaScript--> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)

        We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:
        Click here to see our NinjaScript Reference Samples
        Click here to see our NinjaScript Tips

        These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

        Further, the following link is to our help guide with an alphabetical reference list to all supported methods, properties, and objects that are used in NinjaScript.
        Alphabetical Reference

        We also have a few tutorials in our help guide for both Indicators and Strategies.
        Indicator tutorials
        Strategy tutorials
        Attached Files
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Hi Zachary,

          Thank you so much for that. Unfortunately I cannot import it on NT7.

          Every time I try to import the file it comes up with a error message saying
          " Import failed. The NinjaScript Archive File may contain duplicate
          method names that already exist on your PC or there is a required file
          missing on either your PC or in the import archive"

          Regards

          Comment


            #6
            Zachary,

            I have been able to fix the issue. There was a conflicting name with another indicator on my PC. I changed the name and fixed the conflicting error.
            Now everything works perfectly.
            Thank You so much for your help. This is exactly what I wanted.

            Comment


              #7
              Can you tell me what you did to get this indicator to work - I'm getting the same error

              Comment


                #8
                Try this tool, much better with many extra features. IT_ToolBarTime
                eDanny
                NinjaTrader Ecosystem Vendor - Integrity Traders

                Comment


                  #9
                  Robi749,

                  Just edit the indicator and change the name to "weekday"
                  It should work.

                  Please let me know if you have any issue in doing that.
                  Good luck

                  Comment


                    #10
                    If the above instructions aren't successful, please visit Tools -> Edit NinjaScript -> Indicator -> select any indicator -> Open, then press F5 to compile, and follow the instructions in the attached image to export the messages this gives you to an excel file so we can further investigate what is occurring.
                    Attached Files
                    Jessica P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by DayneSwift, Yesterday, 11:06 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post DayneSwift  
                    Started by AidanLawrence, Yesterday, 10:03 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post AidanLawrence  
                    Started by butt_toast, Yesterday, 09:47 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post butt_toast  
                    Started by GaryOz, Yesterday, 06:54 PM
                    0 responses
                    5 views
                    0 likes
                    Last Post GaryOz
                    by GaryOz
                     
                    Started by 2inthebush, Yesterday, 06:27 PM
                    0 responses
                    24 views
                    0 likes
                    Last Post 2inthebush  
                    Working...
                    X