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 f.saeidi, Today, 07:07 AM
    2 responses
    8 views
    0 likes
    Last Post f.saeidi  
    Started by algospoke, Yesterday, 06:36 PM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by sugalt, 04-30-2024, 04:02 AM
    4 responses
    17 views
    0 likes
    Last Post backtester831  
    Started by tkaboris, Today, 08:32 AM
    3 responses
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by dcriador, Today, 08:56 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X