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:	43
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 NullPointStrategies, Today, 05:17 AM
        0 responses
        23 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        120 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        63 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        41 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        45 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X