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 AaronKoRn, Today, 09:49 PM
              0 responses
              11 views
              0 likes
              Last Post AaronKoRn  
              Started by carnitron, Today, 08:42 PM
              0 responses
              10 views
              0 likes
              Last Post carnitron  
              Started by strategist007, Today, 07:51 PM
              0 responses
              11 views
              0 likes
              Last Post strategist007  
              Started by StockTrader88, 03-06-2021, 08:58 AM
              44 responses
              3,980 views
              3 likes
              Last Post jhudas88  
              Started by rbeckmann05, Today, 06:48 PM
              0 responses
              9 views
              0 likes
              Last Post rbeckmann05  
              Working...
              X