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 judysamnt7, 03-13-2023, 09:11 AM
            4 responses
            57 views
            0 likes
            Last Post DynamicTest  
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            36 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            7 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            19 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            9 views
            0 likes
            Last Post cre8able  
            Working...
            X