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

variable

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

    variable

    Hello,
    I would like to try a strategy with the BetterVolume indicator and I do not know how to use a variable that is in the indicator but when I call it in the strategy it does not appear

    Thank you

    #2
    Hello anmir55,

    Thank you for your note.

    Which variable are you unclear on?

    I look forward to your reply.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      Variable "bc"

      attached file
      Attached Files

      Comment


        #4
        Hello anmir55,

        To be able to reference the BC variable from a hosting strategy you would have to create a user input variable in the indicator and pass this in place of BC. A good example of how you could accomplish this would be to see the SMA indicator preloaded on Ninja Trader and the Period user input. Without this you would not be able to reference the variable from a strategy.

        You should see the following sample, Creating User Defined Input Parameters



        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Hello,


          Do you have any other example is that I don't just understand

          Comment


            #6
            Hello anmir55,

            Below is a link to a video bookmarked to the creation of user inputs using the strategy builder. I would suggest watching this and then you can click view code in the builder to see how user inputs are created and passed within the script.

            Understand the fundamentals of basic strategy creation by developing an actual strategy using the NinjaTrader Strategy Builder.2:45 Opening a Strategy Builde...


            So you would be creating a user input of type int and passing this into the script rather than declaring int bc=0; within the script.

            If you still need further assistance, I can have someone reach out with a list of third parties that would be interested in modifying the script for you or going over basic C# concepts.

            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by DavidHP, Today, 07:56 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by kujista, Today, 06:23 AM
            3 responses
            6 views
            0 likes
            Last Post kujista
            by kujista
             
            Started by Mindset, Yesterday, 02:04 AM
            2 responses
            17 views
            0 likes
            Last Post NinjaTrader_RyanS  
            Started by f.saeidi, Today, 08:03 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by samish18, 04-17-2024, 08:57 AM
            15 responses
            52 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X