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

Input Parameters on Wizzard

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

    Input Parameters on Wizzard

    Is there a way to increase the number of Input Parameters on the NinjaScript Indicator Builder? I have a couple of Indicators that require more than 4 Inputs. If NOT then what would be the work around?

    I am having so much stinking fun rewriting ESignal to Ninja!!!!

    Thanks
    TJ

    #2
    You would need to custom code additional parameter by the NinjaScript editor.

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      You would need to custom code additional parameter by the NinjaScript editor.
      Is there any documentation that I can use as a guide. I have not found where to declare the Parameter Type (int, double.....)

      Thanks
      TJ

      Comment


        #4
        There is plenty of info available:
        - just press F1 and check the relevant sections of the help guide
        - additional info here http://www.ninjatrader-support.com/v...splay.php?f=30
        - additional info here http://www.ninjatrader-support.com/v...splay.php?f=31
        - also: please take a close look at the wizard generated code

        Comment


          #5
          more than 4 parameters for an indicator

          Apologies, I've already posted this before (in another thread) but then I found this post and tried a few more things.

          Followed the instructions as shown here http://www.ninjatrader-support2.com/...ead.php?t=5782 but still got the warning message about a recursive property that might cause Ninja to crash. I hit "No", got an error message that said my indicator already contained a definition for my parameter. If I remove the definition from "Variables" it fails with many errors, all saying that my indicator "takes '4' arguments". When I have a look in the secret Ninja section at the end my extra parameter has been added at all the relevant places (or so it seems to my untrained eye).

          I also noticed that, when a parameter is defined in the Wizard, it must start with an upper case letter, but when it is defined in the Properties section the first letter is changed to lower case. I tried this variation too but still got the same result, many error messages...

          Any hints???

          Thanks,
          Ian

          Comment


            #6
            Hello,


            Someone will respond to your post on Monday. Sorry for the delay.
            DenNinjaTrader Customer Service

            Comment


              #7
              Further developments...

              I've discovered a few more things. Notably that all the error messages generated were NOT for the indicator <doh>, they were for strategies I'd set up that use the indicator. The message is "CS1501 No overload for method 'myind' takes '4' arguments". So I guess when I try to add a fifth one, Ninja gets upset.

              What's the procedure for this? Do I have to remove every instance of my indicator from all the strategies, then update and compile the indicator, than go and put it back in all the strategies again? If that's the case I should probably add in a few extra, just in case...

              (If you're wondering why I have lots of strategies, I have one (basically the same) for each instrument I trade with the input parameters hard coded. I have not yet discovered how to get Ninja to save my strategy settings across sessions...)

              Thanks,
              Ian

              Comment


                #8
                Hi Ian, so the indicator itself works well on its own?

                You will need to use the complete overload when calling the indicator from your strategies, make sure the indicator compiles well and then update your strategies with the correct overload.

                You are correct, this is a feature currently on our list for future consideration.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Yep

                  Hi Bertrand,

                  Indicator works a treat on its own with it's four parms, and the strategy works fine too. Just need to understand the process. Bit of a pain in the fundamental orifice, but sailor vee as the French say.

                  Ian

                  Comment


                    #10
                    Hi Ian - Great, so where do you get stuck and we may assist?
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Not really stuck...

                      Hi Bertrand,

                      Thanks for the offer. I think I know what to do now, just haven't gotten around to it yet. Right now trying to program my own trailing stop (haven't found where to get the latest trade price etc. yet, what fun!). It seems I have to go the long way around and remove the indicator from all my strategies, then update the indicator with the additional parm(s), then add it back into my strategies again. Not hard, just time consuming, and not totally convinced I even need the extra parm yet (still experimenting with that too). Almost as much fun as actually trading!

                      Cheers,
                      Ian

                      Comment


                        #12
                        Hi Ian, you are welcome. Nice you have it working without errors now. For the trailing stop this may be handy - http://www.ninjatrader-support.com/H.../AvgPrice.html

                        You can also find some good trailing stop codes in our sharing section - http://www.ninjatrader-support2.com/...ng+stop&desc=1

                        Good weekend!
                        BertrandNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by WHICKED, Today, 12:56 PM
                        1 response
                        8 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by cre8able, Today, 01:16 PM
                        0 responses
                        1 view
                        0 likes
                        Last Post cre8able  
                        Started by chbruno, 04-24-2024, 04:10 PM
                        2 responses
                        47 views
                        0 likes
                        Last Post chbruno
                        by chbruno
                         
                        Started by WHICKED, Today, 12:45 PM
                        1 response
                        11 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by samish18, Today, 01:01 PM
                        0 responses
                        5 views
                        0 likes
                        Last Post samish18  
                        Working...
                        X