Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
DrawDot() works with primary bars object only?
Collapse
X
-
Hello Loki45,
Thank you for your post.
The following code will work but keep in mind it's resource intensive and there is really no way to have dots show on a chart where the timestamps of the added bar series in code may not exist on the chart. In my test I ran a 1 Minute chart with an added 1 Tick series in code, only three dots showed as only three ticks occurred on the same timestamp at the 1 Minute chart bars.
If you wanted to show dots on the close price of another bar series you could do that. However, in either case I would recommend custom plotting (graphics) in Plot() versus the draw methods as this will be expensive in regards to PC resources.Code:if (CurrentBars[0] <= 20 || CurrentBars[1] <= 20) return; if (BarsInProgress == 1) { DrawDot(CurrentBars[1].ToString(), true, 0, Closes[1][0], Color.Blue); }
For an example of custom plotting go to Tools > Edit NinjaScript > Indicator > CustomPlotSample.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by sjsj2732, 03-23-2026, 04:31 AM
|
0 responses
76 views
0 likes
|
Last Post
by sjsj2732
03-23-2026, 04:31 AM
|
||
|
Started by NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
313 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
313 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
149 views
1 like
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
113 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|

Comment