Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how do i draw a dot ..... ?
Collapse
X
-
Something like this would work well, notice that if I want the same call to DrawDot to not override the previous dot I need to create a unique tag
DrawDot("tag1"+CurrentBar, true, 0, Low[0] - TickSize, Color.Red);
DrawDot("tag2"+CurrentBar, true, 0, High[0] + TickSize, Color.Red);
Please be aware, sometimes when plotting historical values from multi series scripts or from OnExecution() the dot values will appear shiftedLanceNinjaTrader Customer Service
-
the following drawdot gives confusing results. could it be because the time field is missing?
DrawDot("tag1"+CurrentBar, true, 0, Low[0] - TickSize, Color.Red);
DRAWDOT Parameters
tag
A user defined unique id used to reference the draw object. For example, if you pass in a value of "myTag", each time this tag is used, the same draw object is modified. If unique tags are used each time, a new draw object will be created each time.
autoScale
Determines if the draw object will be included in the y-axis scale
barsAgo
The bar the object will be drawn at. A value of 10 would be 10 bars ago.
time
The time the object will be drawn at.
y
The y value
color
The draw object color (reference)
Comment
-
The time field is optional and you can use a bars ago value instead (which I did)
DrawDot() has two overloads, one takes a date time and the other uses a bars ago value.
A value of 0 would draw it on the bar when the condition triggers (sometimes you may need to shift this to the left or right if you're using a multi series script or calling it from OnExecution() )LanceNinjaTrader Customer Service
Comment
-
results of the following drawdots are displayed in the attachment. dots are not at bar tops and bottoms? please tell me what to do. this is for the multi time frame custom programming you did for me.
DrawDot("tag1"+CurrentBar, true, 0, Low[0] - 100*TickSize, Color.Black);
DrawDot("tag2"+CurrentBar, true, 0, High[0] + 100*TickSize, Color.Black);
Comment
-
With multi time frame scripts it can be difficult to make the dots line up with the series. If it's the same script as before, you're likely placing the dots from the secondary series and plotting them on the primary.
Try using
DrawDot("tag1"+CurrentBars[0], true, -1, Lows[0][0] - 100*TickSize, Color.Black);
to shift the values generated from the smaller time frame.LanceNinjaTrader Customer Service
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
|
||
|
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