Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why do I have 2 Blank Dots per update instead of 1?

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

    Why do I have 2 Blank Dots per update instead of 1?

    I am creating a very simple indicator. Currently I have a 8 EMA (Gold). I am displaying a Dot in a new panel. I have asked to plot a Dot in Green when above the 8 EMA and Red when below, pretty simple. My question is why am I getting blank areas?


    #2
    OK so I printed to the Output file which confirms I should be getting a Red or Green dot in those area. Why would it not post the Dots when clearly, they should have been there?



    ​​

    Comment


      #3


      Very Simple code nothing else going on.

      Comment


        #4
        Because your code will only plot one dot PER PRICE rather than one dot per bar. In the tag parameter, where you have "lowertrend Dot_1" + Close[0] try instead using something like "lowertrend" + CurrentBar.ToString(). Remember, there can only be one drawing object per unique tag. That's what tags are for (well, one of the things) - so you can replace an existing drawing object or find it again to delete it. So, if you add another one with the same tag (closing price in your case) it will replace the previous one.
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey

        Comment


          #5
          Hello JohnnyCat,

          Thanks for your post.

          As QuantKey_Bruce stated, it could be caused by your code only plotting one dot per price instead of one dot per bar. Try changing the tag parameter to something like ""lowertrend Dot_1" + CurrentBar"

          Note that the prints could be added within the condition used to draw a dot on the chart instead of outside the condition. For example, add your "Green dot: " print and Time print one line below your Draw.Dot() method that draws a green dot on the chart and add your "Red dot: " print and Time print one line below the Draw.Dot() method used to draw a red dot on the chart.

          I have attached an indicator used to test this. If you run the test indicator that I have attached, are you able to reproduce the behavior?

          I look forward to assisting further.​
          Attached Files
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment


            #6
            Thank you for your time. Makes sense. Thank you QuantKey_Bruce and Brandon H. Works perfectly I added a Multitimeframe to complete the simple indicator. Thanks again.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            647 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X