Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rectangle with 2 different colors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    160 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    307 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    244 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    348 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    178 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X