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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
63 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
90 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
47 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
105 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
63 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|




Comment