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

User Defined Input Names - what's the correct format?

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

    User Defined Input Names - what's the correct format?

    Hi all...

    I'm back! Just have a quick question about those User Defined Input names in the strategy wizard. What is the definitive naming convention for them?

    I've noticed that the strategy seems to not want to work with certain names. Either that, or there's a serious bug in the system.

    I've got some indicators plotted via the strategy wizard. In the "conditions and actions" section, I've set their plotting parameter to "true" so I can see them on the chart. Even though the user defined input names (and their values) are showing up correctly in the wizard, and in the "variables" section when I click on "view code." However, after I click "compile," and go back to the chart and click "reload ninjascript," their values and their plots are not changing on the chart nor in the actual strategy listed in the strategies tab. The parameters on the chart, and the parameters within the strategy listed on the strategies tab don't change, even though the code and the wizard reflect the changes.

    For example, I'll go in and change the offset parameter for a channel indicator. I'll click on "view code" and the variable has been updated there. Then, I click "compile," I go back into the chart and right click and select "reload ninjascript." The chart goes blank for a couple of seconds... and when it reappears, the parameters along the top of the chart have not changed. I go to the strategies tab... click to edit the strategy... look inside the strategy... and nothing has changed.

    If I remove the strategy completely, and then bring it back via the "right click on chart" method of loading strategies... they load with the new parameters.

    Driving me nuts.

    Any ideas what may be causing this? Is it the names, or maybe something else is going on? Have you run into this before?

    Thanks in advance for your assistance with this.

    -V
    Last edited by Aurum; 07-01-2014, 01:42 PM.

    #2
    Hello V,

    Thank you for your post.

    This is expected, as the plots and drawing objects are already added to the chart we need to remove them and then add the code to the chart again to view the new values for these objects and plots.

    Please let me know if I may be of further assistance.

    Comment


      #3
      Hi Patrick. Thanks for the quick reply.

      I'm not able to understand what you are instructing.

      So... just to clarifiy... when I first began my journey, the chart had nothing on it. The only indicators which show up are the ones which are being generated by the wizard. Before I load the strategy, the chart has no indicators on it.

      So... just in case I misunderstood you... I went to the chart and tried to remove the strategy generated indicators, and I got the "you can't remove an indicator associated to a strategy" error message. So I figured I'd better come back and get further clarification.

      There were no indicators initially, so nothing to remove and reload.

      I think it may be helpful if you outline the steps you're suggesting. Kind of a 1, 2, 3 approach.

      Based on what you've written, and based on the fact that there were no indicators on the chart in the first place, we may be looking at some other problem here. No?

      EDIT: I've just observed that even if I switch the "plot on chart" option to "false" compile, and then go back and switch it to "true" compile again... the parameters on the charts and their plots are not changing. You may find this information useful.

      Your input is appreciated.

      -V
      Last edited by Aurum; 07-01-2014, 02:26 PM. Reason: Forgot to add another observation...

      Comment


        #4
        Patrick... one more thing... remember... the actual parameters in the strategy itself, in the strategies tab are not updating either. This was working before... in other words, whenever I would click compile, and then reload ninjascript... the strategy in the strategies tab would update. The parameters in there would update to reflect the changes made in the wizard. Now, they're not updating. So it's not just the chart that's not updating to reflect the actual code. It's also the actual strategy itself in the strategies tab which is not updating either.

        -V
        Last edited by Aurum; 07-01-2014, 02:56 PM.

        Comment


          #5
          Patrick, as I'm continuing to work on this strategy, here are some further observations.

          Even though the strategy will not update the values from the wizard, if I click on the actual strategy in the strategies tab, I can alter the parameters in there and they are reflected on the chart once I reload ninjascript. Of course, this doesn't change the code of the script, but it is at least a workaround for now. It would be nice if when a person clicks "compile," all the indicators controlled by the strategy would be automatically updated and show on the chart with the new values. I've got the newest version of NinjaTrader as far as I know, and a live license.

          Thanks again for your help on this.

          -V

          Comment


            #6
            Hello V,

            Thank you for your response.

            The indicators, once added to the chart through the strategy will stay the same even if you Reload NinjaScript on the chart. You would need to remove the strategy, and then add it back onto the chart and enable the strategy to see the change.

            For the strategy, is it currently enabled and then you need to disable it to change the parameters?

            Any instance of a strategy started/enabled will be un-changed by any changes you make to the strategy. You literally need to disable the strategy and remove it from the chart and then add it back in and enable it.

            Comment


              #7
              Thanks for the quick reply, Patrick. Answers my question.

              -VJ

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by elirion, Today, 09:32 PM
              0 responses
              2 views
              0 likes
              Last Post elirion
              by elirion
               
              Started by cre8able, Today, 09:15 PM
              1 response
              5 views
              0 likes
              Last Post bltdavid  
              Started by cummish, Today, 08:43 PM
              0 responses
              12 views
              0 likes
              Last Post cummish
              by cummish
               
              Started by Option Whisperer, Today, 07:58 PM
              4 responses
              21 views
              0 likes
              Last Post Option Whisperer  
              Started by ETFVoyageur, 05-07-2024, 07:05 PM
              13 responses
              87 views
              0 likes
              Last Post ETFVoyageur  
              Working...
              X