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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    35 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    13 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    19 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X