Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
adding a drawing within strategy builder
Collapse
X
-
adding a drawing within strategy builder
I am trying to add a drawing to a chart via a strategy i have created. However, i can't quite figure out how to do so via strategy builder. I want to draw a rectangle around the first 5 one-minute candles of the day... 9:30-9:35. is this possible in strategy builder?
Tags: None
-
Hello ageeholdings,
In the condition builder add a condition
Time > Time series, Equals, Time > Time value, set to 9:35 AM
In the actions select Drawing > Rectangle, set End bars ago to 0, set End Y to Price > High with Bars ago set to 0, set Start Y to Price > Low with Bars ago set to 5, set End bars ago to 5.
In the Tag add a string to the string builder, select Misc > Current bar.
Chelsea B.NinjaTrader Customer Service
-
-
so i added the settings above, but get this vertical bars instead of rectangle around the area (highs and lows)... i did i miss something?
Comment
-
-
i now have a rectangle, but not of the high and low of the 5 min time frame... just the first bar.
Comment
-
-
That still didn't work. I was looking around and maybe i need to capture the first bar and the last bar of the time frame and use those?
Comment
-
This is what i am envisioning... a rectangle that encompasses the first 5 one-minute candles. That rectangle will go up to the highest and lowest price in the 5-minute time frame.
Comment
-
Hello ageeholdings,
Thank you for confirming that.
In that situation that would require manual coding to find the MIN/MAX of the area and then also figure out which is the High and Low bar to make sure the rectangle is matching the bar high and low values.
To do this would require that you find the highest and lowest prices within the range, in the builder this part would not be possible because the BarsAgo field cannot use a variable. In manual coding you could make a variable bars ago to find the highest/lowest prices since the start of the session on that series and then use those prices for the rectangle. A second step would be to determine which anchor the high and low prices go with so the rectangle fits on those bars and is not positioned incorrectly.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
58 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
133 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment