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 cmoran13, 04-16-2026, 01:02 PM
|
0 responses
51 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
31 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|
||
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
165 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
100 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
160 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|

Comment