Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 FilesBrandon H.NinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Waxavi, Today, 02:10 AM
|
1 response
17 views
0 likes
|
Last Post Today, 03:03 PM | ||
Started by Kaledus, Today, 01:29 PM
|
5 responses
13 views
0 likes
|
Last Post Today, 02:56 PM | ||
Started by Waxavi, Today, 02:00 AM
|
1 response
12 views
0 likes
|
Last Post Today, 02:53 PM | ||
Started by alifarahani, Today, 09:40 AM
|
5 responses
23 views
0 likes
|
Last Post Today, 02:53 PM | ||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
3 responses
17 views
0 likes
|
Last Post Today, 02:41 PM |
Comment