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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    153 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    89 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    133 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    127 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X