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

Bug Report on DrawText()

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

    Bug Report on DrawText()

    Please compile the DrawText.cs file, open a 15 minute chart window on the ES-09-06 and also open an Output window.

    I am reporting the following problems:

    1. Sometimes you will see from the Output window, that I have sent DrawText() a new volume, but the chart display did not refresh the data. If you click on the active price in the y-axis, then the new volume will appear in the chart.

    2. You will sometimes see the volume beging displayed as ". 10 * 10". When this problem occurs, it is always this number. Now this is particularly mysterious because in looking at the source code, you can see that I do not output in ". number * number" format, I only output in ". number" format to DrawText(). However, in my real indicator, I am outputting in the ". number * number" format. But I have deleted my real indicator and recompiled using just the DrawText.cs file as the only non-system indicator. I dont know why I am still getting this number mysteriously coming up. This is happening in my real indicator too. I think it happens when the volume is 1 sometimes. I know I am not outputting that volume when this occurs because I see the real volume that I am sending DrawText() in the Output window.

    3. Sometimes, when we move to a new 15 minute bar, DrawText() will display that mysterious ". 10 * 10" in the previously active bar instead of the newly active bar. I always output to bar=0 (which should be the current active bar) in DrawText(). Then new incoming data will cause DrawText() to display the new volume correctly in the correct bar. Its just that, for a few seconds , you see the weird ". 10 * 10" in the previous bar and the new bar has no DrawText() data. When this happens, DrawText() is going to the correct price, but the wrong bar.

    So I am observing 3 problems: chart not refreshing with the DrawText() data, DrawText() showing the wrong number, and sometimes DrawText() will go to the previous bar when we move to a new 15 minute bar.

    Let me know if you need further clarification. I would like to see if you can confirm these problems. You really need to observe this when the market is quiet -- during after market hours. You really wont be able to see this when the markets are open because the incoming data is too fast.

    As always, thanks in advance for your help.


    Attached Files

    #2
    imported post

    Can you send the cs file, the txt file looks funny.

    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Ray, that is the .cs file, the site wont take a .cs file, so I just renamed it to a .txt.

      After you rename it back to .cs, doesn't it compile?

      Comment


        #4
        imported post

        Ray, I have sent you the .cs file zipped. Thanks
        Attached Files

        Comment


          #5
          imported post

          Hi Richard,

          Very clear, the OnBarUpdate() method is not going to fire the same as market data events. MarketData event handler will fire for every change in market data. The OnBarUpdate() method fires when the chart display updates. There is optimization in the chart refresh code.

          An easy exampleusing three incoming market data eventswith CalculateOnBarClose set to false -

          Last = 1000.00 Vol = 1
          Last = 1000.25 Vol = 1 <-- Chart updates OnBarUpdate() fires
          Last = 1000.25 Vol = 1 <-- Chart does not update OnBarUpdate() does not fire

          Hope this clears things up.


          Ray




          RayNinjaTrader Customer Service

          Comment


            #6
            imported post

            Thanks Ray for the fast reply.

            I agree with you and can understand about the refresh problem being an optimization in the charts. I can live with this.

            What about the other 2 problems I reported? You have to watch it after market close and you should be able to duplicate them. These are obvious problems when looking at the chart and its hard to explain to users.

            Thanks.

            Richard

            Comment


              #7
              imported post

              Send me private mail to [email protected] with contact number, I would want to understand this better via telephone.
              RayNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Christopher_R, Today, 12:29 AM
              0 responses
              6 views
              0 likes
              Last Post Christopher_R  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              166 responses
              2,235 views
              0 likes
              Last Post sidlercom80  
              Started by thread, Yesterday, 11:58 PM
              0 responses
              3 views
              0 likes
              Last Post thread
              by thread
               
              Started by jclose, Yesterday, 09:37 PM
              0 responses
              7 views
              0 likes
              Last Post jclose
              by jclose
               
              Started by WeyldFalcon, 08-07-2020, 06:13 AM
              10 responses
              1,415 views
              0 likes
              Last Post Traderontheroad  
              Working...
              X