• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 levikNT, Today, 04:39 AM
            2 responses
            14 views
            0 likes
            Last Post levikNT
            by levikNT
             
            Started by chartish, Today, 08:36 AM
            2 responses
            15 views
            0 likes
            Last Post chartish  
            Started by login_dejavu, Yesterday, 04:58 AM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_RyanS  
            Started by NinjaTrader_PaulH, Today, 07:40 AM
            0 responses
            4 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by awesometrader, Today, 06:59 AM
            2 responses
            9 views
            0 likes
            Last Post awesometrader  
            Working...
            X