Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

setting indicator colors in backtest

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

    setting indicator colors in backtest

    how do i set indicate colors in backtest?

    I see my emas on the chart, and I can set them in indicator preferences inside the strategy analyser, but each time I run my backtest the colors reset to default.

    i can't see a way to make default colors for indicators in strategy wizard?

    #2
    Hello,
    You can not change the color of an indicator from within the strategy analyzer or the strategy wizard.
    To change the color of a strategy you will need to do so using custom programming from within the Initialize() method.
    For example:
    Code:
    protected override void Initialize()
    {
        Add(EMA(20);
        EMA(20).Plots[0].Pen.Color = Color.Red;
    }
    I would recommend to review the following post on changing the properties of an indicator added within a strategy: http://ninjatrader.com/support/forum...4&postcount=10

    This process does require you to unlock the code if the strategy was created through the strategy wizard. If you unlock the strategy you may want to make a copy of the strategy first. To save a copy of the strategy you will press the "View Code" button then right click in the NinjaScript Editor and press Save as. Then you will need to go back to the strategy editor and unlock the code by pressing the "Unlock Code" button.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Understood. Thanks.

      Originally posted by NinjaTrader_CodyB View Post
      Hello,
      You can not change the color of an indicator from within the strategy analyzer or the strategy wizard.
      To change the color of a strategy you will need to do so using custom programming from within the Initialize() method.
      For example:
      Code:
      protected override void Initialize()
      {
          Add(EMA(20);
          EMA(20).Plots[0].Pen.Color = Color.Red;
      }
      I would recommend to review the following post on changing the properties of an indicator added within a strategy: http://ninjatrader.com/support/forum...4&postcount=10

      This process does require you to unlock the code if the strategy was created through the strategy wizard. If you unlock the strategy you may want to make a copy of the strategy first. To save a copy of the strategy you will press the "View Code" button then right click in the NinjaScript Editor and press Save as. Then you will need to go back to the strategy editor and unlock the code by pressing the "Unlock Code" button.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X