Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dynamic Plot Color

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

    Dynamic Plot Color

    Hi,

    Can i change one plot color dynamicly? I mean that suppose we need sma. if sma < price.close plot pen color must be red and reverse sma >= price.close plot color must be blue. Yes i know if i use two plot plotUp and plotDown, and write this:

    sma < price.close {only set plotDown}
    else {only set plotUp}

    my problem is solving. But i'm traying to solve this only one plot. Like this:

    sma < price.close {plot.pen.color = red}
    else {plot.pen.color = blue}
    then setplotvalue

    is it possible? And i'm newbe for ninja, could you please explain me shortly what is ninja drawing logic? I think first OnBarUpdate trigered each tick at this time we set plot values then ninja calling OnDrawing method and new values drawing on the chart.
    Last edited by aytacasan; 10-27-2010, 05:04 PM.

    #2
    Hello aytacasan,

    Correct - this is the multi color plot approach that was used in version 6.5

    Version 7 offers a new approach to multi colored indicators. You can read about this approach here:
    http://www.ninjatrader.com/support/f...ad.php?t=21225

    Please see here for Drawing methods available with NinjaTrader:
    http://www.ninjatrader.com/support/h...t7/drawing.htm
    Ryan M.NinjaTrader Customer Service

    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