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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      55 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      142 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      276 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X