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 futtrader, 04-21-2024, 01:50 AM
              6 responses
              57 views
              0 likes
              Last Post futtrader  
              Started by sgordet, Today, 11:48 AM
              0 responses
              1 view
              0 likes
              Last Post sgordet
              by sgordet
               
              Started by Trader146, Today, 11:41 AM
              0 responses
              2 views
              0 likes
              Last Post Trader146  
              Started by jpapa, 04-23-2024, 07:22 AM
              2 responses
              16 views
              0 likes
              Last Post rene69851  
              Started by funk10101, Today, 11:35 AM
              0 responses
              1 view
              0 likes
              Last Post funk10101  
              Working...
              X