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

Passing variable

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

    Passing variable

    Is there a way to make a switch in NT?
    For instance say 50 bars ago i set a variable to 1 and is there a way to check to see if it has changed to 2. if so then i play alert1.wav.

    Hope that isn't too cryptic.

    #2
    caldolegare,

    This is possible through custom NinjaScript programming. You would create a variable and set it to take a value. Then whenever you want access that variable.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok I'm thinking you didn't finish this post or am I totally missing the point of the post? lol

      Originally posted by NinjaTrader_Josh View Post
      caldolegare,

      This is possible through custom NinjaScript programming. You would create a variable and set it to take a value. Then whenever you want access that variable.

      Comment


        #4
        caldolegare,

        The post was complete. The point is that you can do it, but you will need to custom program it to fit your needs.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Ah ok my bad. I already have my indicator up and running. i'm just not sure how to make the variable accessable a few bars later. all my variables reset once a new bar form.

          Comment


            #6
            If you want your variables past values to be accessible you will want to create them into DataSeries objects. Please take a look at this article: http://www.ninjatrader-support.com/H...iesObject.html
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks that helped a lot.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by cre8able, Today, 01:16 PM
              2 responses
              9 views
              0 likes
              Last Post cre8able  
              Started by chbruno, 04-24-2024, 04:10 PM
              3 responses
              48 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by samish18, Today, 01:01 PM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by WHICKED, Today, 12:56 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by WHICKED, Today, 12:45 PM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X