Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              571 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              331 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              549 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              549 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X