Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add a variable in a strategy

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

    Add a variable in a strategy

    Good morning,
    I created a strategy and all is okay, but at the beginning, I forget a variable and I would want to add a new variable.
    I tried to write in the code and change the part "variable" and the part"properties" but don't work.
    How do I do for this without create again a strategy please?

    Thank's a lot for your help and scuse for my poor english, because I'm french.

    #2
    Hello,

    To make changes to your code, go to Tools -> Edit NinjaScript -> Strategy... -> Select the strategy you were working on and click OK.

    If it was made with the Wizard, the Wizard will pop back up and allow you to make changes and add variables.

    If the Code pops up you can add variables to the #region Variables section
    It may look something like this
    All the Variables go between the #region and #endregion
    any lines with // are comments that are not read by the system
    Code:
            #region Variables
            // Wizard generated variables
            private int myCustomIntVariable = 1; // Default setting for MyInput0
            // User defined variables (add any user defined variables below)
            private double myCustomDouble = 10.5;
            #endregion
    Please let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    666 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    377 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    110 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    580 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X