Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Rectangle with 2 different colors
Collapse
X
-
Rectangle with 2 different colors
Do you know if there is an indicator or a way to draw a rectangle with 2 different background colors? Thank you very much.Tags: None
-
Hello punkiy2111,
Thanks for your post.
If you are looking for an existing indicator that accomplishes this then you could browse the Ecosystem User App Share for a possible solution.
Ecosystem User App Share:
Otherwise, you could use SharpDX in OnRender() to draw a rectangle on the chart with a gradient Brush color such as a red to blue gradient. Note that you could convert a LinearGradientBrush to a SharpDX brush using ToDxBrush().
See the attached example script demonstrating how this could be done.
And, see the help guide documentation below for more information.
OnRender():https://ninjatrader.com/support/help...8/onrender.htm
Using SharpDX to custom render objects on a chart: https://ninjatrader.com/support/help..._rendering.htm
Let me know if I may further assist.Attached Files<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
- Likes 1
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