Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Default Values Mismatch: Chart vs. Analyzer

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

    Default Values Mismatch: Chart vs. Analyzer

    For a long time when testing I would write some changes compile the code, then refresh the strategy analyzer.
    I will declare the variables in the `[NinjaScriptProperty]`
    Field and then define it under the section `if State == State.SetDefaults`

    But when I load the Script up in Strategy Analyzer or if I Load it into a Chart, these default values are not what is set in the SA or on the Chart when selecting the strategy.

    Click image for larger version

Name:	image.png
Views:	49
Size:	35.3 KB
ID:	1330277

    I could probably use some questions to refine my problem statement. ​

    #2
    Hello Cornhusk7789,

    Thank you for your post.

    Can you provide further detail - are you saying that the default values you're setting in code are not what you are seeing when you load the strategy on a chart or within the analyzer?

    Is this occurring for only custom parameters, or is this also happening with default parameters like BarsRequiredToTrade?

    Comment


      #3
      This is occurring for custom parameters but it was not before. Prior to this situation. In the strategy analyzer. I would change the Strategy under "General" to a different script then change it back, and the custom parameters would change to what was written in the script.

      Confirmed that it's only the custom parameters.

      Comment


        #4
        Hello,

        If you make a copy of the SampleMACrossover script and change the Fast and Slow parameters' values in State.SetDefaults, then test that out in the Analyzer, are you seeing the same behavior occur?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        87 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        132 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        65 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        118 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        67 views
        0 likes
        Last Post PaulMohn  
        Working...
        X