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

Strategy Development: Do the Following : No user defined variable

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

    Strategy Development: Do the Following : No user defined variable

    I am trying to do something similar to this video:



    At 2.26 in the video the user from "Do the following" selects "add" then "misc" then "set user defined variable".

    In the version of Ninjatrader8 I am using I don't have the "set user defined variable".

    Is this not available now? Is there any other way I can do this?

    Thanks

    #2
    Hello blueboy,

    Thanks for your post and welcome to the NinjaTrader forums!

    In NT7's strategy wizard, you were limited to using 10 internal variables called Variable0 through Variable9. You could not use any other variable.

    In NT8's strategy builder you can create your own variables. You define/create the variable in the "Inputs and Variables" screen, in the "Variables" section at the bottom. Left click on the word "add" at the bottom right, provide a name for the variable (yes, you can use Variable0 if you wish to do the same as NT7 video), select the type of variable (again for the video I recommend a double as that is what price uses) and finally set a default value (typically set to 0), finally click OK.

    After creating the variable, in the conditions and action window when you are ready to add the action to set the variable, in the actions window, click "add", select the Misc folder and you will see at the bottom "Set Variable0" or whatever you named the variable. Once selected you will see the variables current default value, move your mouse over the value field to see the word "set", left click on "set" then left click on "price" then left click "Low", set the bars ago to 1 and finally click OK to repeat the video.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by swestendorf, Today, 11:14 AM
    0 responses
    1 view
    0 likes
    Last Post swestendorf  
    Started by Sparkyboy, Today, 10:57 AM
    0 responses
    3 views
    0 likes
    Last Post Sparkyboy  
    Started by TheMarlin801, 10-13-2020, 01:40 AM
    21 responses
    3,917 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by timmbbo, 07-05-2023, 10:21 PM
    3 responses
    153 views
    0 likes
    Last Post grayfrog  
    Started by Lumbeezl, 01-11-2022, 06:50 PM
    30 responses
    812 views
    1 like
    Last Post grayfrog  
    Working...
    X