Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Debug Custom Bar

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

    Debug Custom Bar

    I am trying to debug an issue with a custom bar type. When I refresh the chart, the code that generates the bartype is not always called. I have to play around with the time, date or value settings to be able to set breakpoints. Is there a way to force the bartypes file to be called every single time the chart is refreshed?

    Also, in my my bartype i'm saving off some information in the time property. I was under the impression that the last 3 digits of the time.Ticks should always be 0. It appears that is not always the case? Can you confirm that?
    Last edited by habibalex; 08-05-2017, 09:28 PM.

    #2
    Hello habibalex,

    The bartype script should be called when you reload historical data.

    Attached is a bar type I created, which if you apply to a 15 minute chart, right click and reload historical data, you'll see that "Calling bar code" is printed to the output window. This demonstrates that the bar type script is being ran on a refresh.

    If you still are unable to get the results you desire, please upload a copy of the code and I'll see if anything jumps out.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      That re-downloads the data from the server every time right?

      Comment


        #4
        Hello habibalex,

        No, refreshing historical data is not going to pull data from the server if it already exists on the computer. You would have to delete the historical data using the historical data manager or within My Documents>NT8>DB folder, which would then cause the data to be pulled from the server.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          how come the option to refresh historical data is grayed out unless connected to a broker then?

          does refreshing simply delete the cache files and regenerate the chart?

          Comment


            #6
            Hello Habibalex,

            Without a data connection the option to refresh historical data is not available. I will put in a feature request which requests that you be able to refresh historical data without a connection.

            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by tsantospinto, 04-12-2024, 07:04 PM
            5 responses
            67 views
            0 likes
            Last Post tsantospinto  
            Started by cre8able, Today, 03:20 PM
            0 responses
            6 views
            0 likes
            Last Post cre8able  
            Started by Fran888, 02-16-2024, 10:48 AM
            3 responses
            48 views
            0 likes
            Last Post Sam2515
            by Sam2515
             
            Started by martin70, 03-24-2023, 04:58 AM
            15 responses
            115 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by The_Sec, Today, 02:29 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X