Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 fwendolynlpxz, Today, 05:19 AM
      0 responses
      3 views
      0 likes
      Last Post fwendolynlpxz  
      Started by traderqz, Yesterday, 12:06 AM
      11 responses
      28 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by PaulMohn, Today, 03:49 AM
      0 responses
      8 views
      0 likes
      Last Post PaulMohn  
      Started by inanazsocial, Today, 01:15 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by rocketman7, Today, 02:12 AM
      0 responses
      12 views
      0 likes
      Last Post rocketman7  
      Working...
      X