See screenshot. The arrow is drawn on Bar 2, despite me writing [1]. What am I missing here? why would the bar count by different here than in the condition?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Drawing Bar number is off by -1
Collapse
X
-
Drawing Bar number is off by -1
In a simple strategy that checks if High[0] is greater than High[1]. The bars numbers in the square brackets for the condition here does not match the bar number used to insert drawings on the chart.
See screenshot. The arrow is drawn on Bar 2, despite me writing [1]. What am I missing here? why would the bar count by different here than in the condition?1 PhotoTags: None
-
It's on bar close yes. But even so I don't understand how the condition bar numbers is different from the drawing bar numbers.
Why is High[1] in the condition the 2nd bar from the right in the screenshot, but [1] on the drawing part of the strategy is the 3rd bar from the right. Surely both number should execute the same??
Comment
-
Hello several,
What is the date time showing for the object in the Draw Objects window?
Add debugging prints of the bar time within the action logic block where the drawing object is drawn so that we may compare.
If the object is being drawn with barsAgo 0, this would appear on the bar where the condition that draws the object was true.
If you are seeing the object appearing on the previous bar as a new bar opens, this would be due the object being drawn after the bar closed.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment