Announcement

Collapse
No announcement yet.

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.



            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 Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 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
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X