Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT 8.0.6 Draw.Dot() from Mouse-Event or OnRender no longer working

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

    NT 8.0.6 Draw.Dot() from Mouse-Event or OnRender no longer working

    Hello,

    i am using an indicator which draws a dot when i double click somewhere on the chart.
    in more detail, i am using a mouse event which calls a method which does all the calculactions and then adds a dot using the Draw.Dot method.

    Since NT 8.0.6 the indicator fires an exception if the barsAgo method parameter is greater than 0 but even with barsAgo at 0, the dot is not drawn on the chart, just the expections isnt triggered.

    The Exceptions is:
    Unhanded Exception: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

    When i move the whole logic to the OnBarUpdate method, everything works fine with the disadvantage that i have to wait for the next OnBarUpdate Event to take place until the dot is drawn. I also can't use the indicator while the market is closed because there are no new OnBarUpdate events fired.

    Is there any way to fix this or does the Draw.Dot method only work from OnBarUpdate after NT 8.0.6?

    And on another note, the Dots are really getting huge since 8.0.6...

    Thank you and Best regards,
    Mike

    looks like this one here is about the same issue:
    Last edited by mk77ch; 04-23-2017, 11:57 AM.

    #2
    Hello Mike,

    Are you calling TriggerCustomEvent from the other method before trying to draw the object?


    Do you have additional series added to the script?

    Do you have a simplified example script that demonstrates the behavior but has no other coded added other than what is absolutely necessary to reproduce the behavior?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello Mike,

      Are you calling TriggerCustomEvent from the other method before trying to draw the object?


      Do you have additional series added to the script?

      Do you have a simplified example script that demonstrates the behavior but has no other coded added other than what is absolutely necessary to reproduce the behavior?
      Hi ChelseaB,

      Just an observation. This issue is not limited to Draw.Dot. Draw.TriangelUP/Down behaves similar (see other posts on TriangleUp/Down) and there are no options for sizing in the code.

      But most important, there may be a bug in the BarsAgo and Indexing logics in NT8. Many simple NT7 indicators that use BarsAgo when indexing generate similar "out of range" errors once converted to NT8. Unless, the BarsAgo and Indexing methods are significantly different in NT8.

      Thanks.

      Comment


        #4
        Hello aligator,

        I can confirm that the minimum size of chart markers is larger in 8.0.6.0. Please see this post for more information.


        I was able to confirm the behavior with BarsAgo when additional series are added to the script and I have reported this to our development.


        Are you using additional series in your script?

        Can you provide a simplified example that only includes the necessary code to reproduce the behavior and does not contain any other code?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea,

          thank you for your reply.
          The indicator doesn't use additional data series.
          I attached you a test indicator which tries to draw a dot from OnRender so you can see the problem.

          thank you,
          Mike
          Attached Files

          Comment


            #6
            and here i am attaching an indicator which is using the mouse-event.
            just attach it to a chart and then double click on the chart.

            before 8.0.6 a dot has been drawn at the double click location.

            Best regards,
            Mike
            Attached Files

            Comment


              #7
              TriggerCustomEvent(o =>
              {
              ...
              }, null);

              did fix the problem. everything works as expected.

              thank you guys and girls

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by bortz, 11-06-2023, 08:04 AM
              47 responses
              1,607 views
              0 likes
              Last Post aligator  
              Started by jaybedreamin, Today, 05:56 PM
              0 responses
              9 views
              0 likes
              Last Post jaybedreamin  
              Started by DJ888, 04-16-2024, 06:09 PM
              6 responses
              19 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              6 views
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              15 views
              0 likes
              Last Post Javierw.ok  
              Working...
              X