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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    607 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    353 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    560 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    561 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X