Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Why do I have 2 Blank Dots per update instead of 1?
Collapse
X
-
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 Photos -
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.
Comment
-
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
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
648 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|




Comment