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

Error on getting/setting property : Value cannot be null

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

    Error on getting/setting property : Value cannot be null

    Hello.

    I am experiencing error

    Error on getting/setting property 'My_Parameter' for NinjaScript 'My_Strategy/-1': Value cannot be null.
    Parameter name: Strategy 'My_Strategy/-1': no such parameter 'My_Parameter'


    while optimization.

    It happens for each parameter with attribute [Browsable(false)].

    Am I doing something wrong?
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Hello fx.practic,

    Can you provide the full code for the input?

    Is there a default being set for the input? If so, what is the default?

    Attached is a test where I have made two inputs, one with [Browsable(false)] one without. I am not able to reproduce.

    Are you able to reproduce the error with the test script attached?
    Attached Files
    Last edited by NinjaTrader_ChelseaB; 09-18-2018, 09:52 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello, Chelsea

      Please, look video below.
      I got same error message with Your script while optimization:
      Error on getting/setting property 'TestInput1' for NinjaScript 'BrowseableFalseInputTest/-1': Value cannot be null.
      Parameter name: Strategy 'BrowseableFalseInputTest/-1': no such parameter 'TestInput1'
      Error on getting/setting property 'TestInput1' for NinjaScript 'BrowseableFalseInputTest/-1': Value cannot be null.
      Parameter name: Strategy 'BrowseableFalseInputTest/-1': no such parameter 'TestInput1'


      Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


      In my script I use both old and modern setters approach with same result.
      Only [Browsable(true)] let optimization start.
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment


        #4
        Hi fx.practic,

        I overlooked that the [NinjaScriptProperty] attribute was still applied. This need to be removed.

        The [Browsable(false)] attribute hides the property from the UI. The [NinjaScriptProperty] attribute if removed will prevent the property from showing in the overloads and list of optimizable inputs.

        An object with [NinjaScriptProperty] applied must be Browsable in the UI to be optimized over.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          This helps, Thank You, Chelsea!
          fx.practic
          NinjaTrader Ecosystem Vendor - fx.practic

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by funk10101, Today, 09:43 PM
          0 responses
          6 views
          0 likes
          Last Post funk10101  
          Started by pkefal, 04-11-2024, 07:39 AM
          11 responses
          37 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Yesterday, 08:51 AM
          8 responses
          44 views
          0 likes
          Last Post bill2023  
          Started by yertle, Today, 08:38 AM
          6 responses
          26 views
          0 likes
          Last Post ryjoga
          by ryjoga
           
          Started by algospoke, Yesterday, 06:40 PM
          2 responses
          24 views
          0 likes
          Last Post algospoke  
          Working...
          X