Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing the color of an Indicator plot from the strategy code

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

    Changing the color of an Indicator plot from the strategy code

    Hello,

    Is it possible to set the color of an indicator from the strategy which uses it?

    For example:

    Code:
    protected override void Initialize()
    {
       Add(SMA(15)); // this has default color Orange, I want to change to Blue.
    }
    Tried calling:
    Code:
    SMA(15).PlotColors[0][0] = Color.Blue;
    in various places without success.

    Thanks,
    Boaz

    #2
    Originally posted by boaza View Post
    Hello,

    Is it possible to set the color of an indicator from the strategy which uses it?

    For example:

    Code:
    protected override void Initialize()
    {
       Add(SMA(15)); // this has default color Orange, I want to change to Blue.
    }
    Tried calling:
    Code:
    SMA(15).PlotColors[0][0] = Color.Blue;
    in various places without success.

    Thanks,
    Boaz
    Try:
    Code:
     
    SMA(15).Plots[0].Pen.Color = Color.Blue;

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by gentlebenthebear, Today, 01:30 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Aviram Y, Today, 05:29 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by cls71, Today, 04:45 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by TradeForge, Today, 02:09 AM
    1 response
    22 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by elirion, Today, 01:36 AM
    2 responses
    14 views
    0 likes
    Last Post elirion
    by elirion
     
    Working...
    X