Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Rectangle Resize from edges
Collapse
X
-
Rectangle Resize from edges
I would like to vote for the ability to extend rectangles from left / right edge. Typically I would draw rectangles snapped between two chart points (snapped between two candle's open/high/low/close). Once this is done I would like the ability to extend the rectangle into the future without modifying the High/Low. Since we currently are only able to select corners I am forced to go into the drawing properties and change the end-time of one of the corners. If you drag a corner across with snaps enabled the rectangle resizes to the nearest price snap.Tags: None
-
Eduardo,
I have posted a custom tool to the user app submission for this type of rectangle. I simply duplicated/modified the existing rectangle code with some minor tweaks. Users can find the tool here: https://ninjatraderecosystem.com/use...rom-all-sides/
I have attached to this post modifications that can be made to the @Shapes.cs to update the NT8 Rectangle tool.
@Shapes.zip
The modifications were fairly simple, not sure why NT did not originally implement the tool this way. Identifing the four anchors of an Ellipse as ResizeMode.Left / ResizeMode.Right / ResizeMode.Top / ResizeMode.Bottom would eliminate a lot of conditional statements to make its functionality work like the TopLeft, TopRight, etc. targets assigned.
Here is a picture showing the rectangle with four additional adjustment anchors. Corner anchors still attach to bar/price snaps (when enabled) and side anchors allow quick resizing without needing to enter properties dialog and adjust anchor time parameters.
- Likes 2
Comment
-
Originally posted by tickets2themoon View PostEduardo,
I have posted a custom tool to the user app submission for this type of rectangle. I simply duplicated/modified the existing rectangle code with some minor tweaks. Users can find the tool here: https://ninjatraderecosystem.com/use...rom-all-sides/
I have attached to this post modifications that can be made to the @Shapes.cs to update the NT8 Rectangle tool.
[ATTACH]n1235146[/ATTACH]
The modifications were fairly simple, not sure why NT did not originally implement the tool this way. Identifing the four anchors of an Ellipse as ResizeMode.Left / ResizeMode.Right / ResizeMode.Top / ResizeMode.Bottom would eliminate a lot of conditional statements to make its functionality work like the TopLeft, TopRight, etc. targets assigned.
Here is a picture showing the rectangle with four additional adjustment anchors. Corner anchors still attach to bar/price snaps (when enabled) and side anchors allow quick resizing without needing to enter properties dialog and adjust anchor time parameters.
I just noticed that when compiling, this is missing from the original code
private ChartAnchor editingRightAnchor;
and additionally, it would be great if you could add a line right between the LeftAnchor and the RigthAnchor, just to make a 50% division, and that it is editable, cheers
Comment
-
Milton,
not sure what you mean by the line missing:
private ChartAnchor editingRightAnchor
This is line 57 in @Shapes.cs. I wasn't recommending users overwriting the built in tools, I was providing these changes in case NT wanted to implement them. I'm not aware of any issues with the linked user-submitted tool but let me know if you have problems.
Your recommendation to add a division line is received. I started a new topic in the user application discussion since this topic is in regard to the integrated tool.
Comment
-
Originally posted by tickets2themoon View PostMilton,
not sure what you mean by the line missing:
private ChartAnchor editingRightAnchor
This is line 57 in @Shapes.cs. I wasn't recommending users overwriting the built in tools, I was providing these changes in case NT wanted to implement them. I'm not aware of any issues with the linked user-submitted tool but let me know if you have problems.
Your recommendation to add a division line is received. I started a new topic in the user application discussion since this topic is in regard to the integrated tool.
ok, this is the situation, and I think I made a mistake when pointing to where the changes should be made
the suggestion is for this file ( https://ninjatraderecosystem.com/use...rom-all-sides/ ), since when implementing it in NT8, and loading it, they work excellent, but when trying to import any other element, such as another indicator, the NT8 generates an error that there are elements within the system that are not properly compiled, that led me to look for the error in the NinjaScript Editor. And it showed missing elements in the file that I left in the link, I opened and reviewed, I had to pull it to VS, so that it would show me exactly where and what was missing, and it was that line that I already gave you, I added it, compiled, and now, zero errors.
The missing line is this == private ChartAnchor editingRightAnchor;
Comment
-
I downloaded the linked file and the code listed is line 55. I'll try to load the Tool on a separate installation of NT8 and see if I have any issues.
I think you have to compile any new scripts after import and you were receiving an error message until you did so.Last edited by tickets2themoon; 02-17-2023, 02:23 PM.
- Likes 1
Comment
-
Great addition to Ninjatrader! Great Job!Originally posted by tickets2themoon View PostI would like to vote for the ability to extend rectangles from left / right edge. Typically I would draw rectangles snapped between two chart points (snapped between two candle's open/high/low/close). Once this is done I would like the ability to extend the rectangle into the future without modifying the High/Low. Since we currently are only able to select corners I am forced to go into the drawing properties and change the end-time of one of the corners. If you drag a corner across with snaps enabled the rectangle resizes to the nearest price snap.
Looking at this, I almost see an improve risk/reward tool like tradingview has. When it would be possible to drag the middle line and see the % or ratio change you would have a great addition to the static ninjatrader risk/reward drawing tool!
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment