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

Missing Parameters in Called Indicators (Intellisense)

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

    Missing Parameters in Called Indicators (Intellisense)

    Guys, I am calling an indicator inside another indicator in OnBarUpdate (in NT8, indicator converted from NT7), and the called indicator has a large number of inputs, but only a few of them appear in the Intellisense construction. For example, suppose MyIndicator has inputs Input1, Input2, Input3, etc., all of which appear in the Input Window when loaded on chart, as appropriate for user control. But when I call MyIndicator inside another indicator, it appears as MyIndicator(Input1, Input3), leaving out all of the others. I may be able to set the others by calling them individually (e.g., MyIndicator.Input2=false), but the most convenient approach would be to control which inputs appear in the Intellisense construction and set them when calling the indicator to begin with. (I expected to see all of them as parameters.) Is it possible to control which indicator inputs appear in the available parameters when calling an indicator from inside another indicator?

    Thanks for your patience and help,

    Light

    #2
    Hello Light,

    Did you generate all of the inputs using the wizard or were these copied and pasted?

    I'm thinking the NinjaTrader generated code at the bottom doesn't have overloads for all of the inputs.

    I would recommend deleting the NinjaTrader generated code (the entire region) and then compiling the script from the NinjaScript Editor. This will regenerate the overloads and hopefully will have all of the inputs.

    If not, please include an export of an example script that can demonstrate the behavior.

    To export a NinjaTrader 8 NinjaScript do the following:
    1. Click Tools -> Export -> NinjaScript...
    2. Click the 'add' link -> check the box(es) for the script(s) you want to include
    3. Click the 'Export' button
    4. Enter a unique name for the file in the value for 'File name:'
    5. Choose a save location -> click Save
    6. Click OK to clear the export location message

    By default your exported file will be in the following location:
    • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>


    Below is a link to the help guide on Exporting NinjaScripts.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea. I found the problem. It's a very minor typographical difference between how we write properties. I tend to write them all on one line, to save space, and the difference is essentially a "typo," but one that compiles and operates fine in all other respects. The problem occurs if the NinjaScript Properties text contains "]public" instead of "] public" -- the only difference being the space between the bracket and the word "public" preceding the property variable. (These are typically on different lines, so no one sees the problem.) I have fixed it on the parameters that I prefer to have available and have left it in place on those I don't ;-)... a little risky I know, but I'll experiment with it for now. I'll let you know if I have another issue with it. But now that I can fix it, I am back in business... so far so good...

      Thanks again for your help!

      Light
      Last edited by Light; 04-16-2017, 10:26 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by adeelshahzad, Today, 03:54 AM
      5 responses
      32 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by stafe, 04-15-2024, 08:34 PM
      7 responses
      32 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by merzo, 06-25-2023, 02:19 AM
      10 responses
      823 views
      1 like
      Last Post NinjaTrader_ChristopherJ  
      Started by frankthearm, Today, 09:08 AM
      5 responses
      22 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      43 views
      0 likes
      Last Post jeronymite  
      Working...
      X