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 bortz, 11-06-2023, 08:04 AM
      47 responses
      1,609 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Today, 05:56 PM
      0 responses
      9 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      19 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      6 views
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      16 views
      0 likes
      Last Post Javierw.ok  
      Working...
      X