Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

need a second look at my code to avoid error

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

    need a second look at my code to avoid error

    i am trying to plot the difference between fast and slow ROC.
    i cannot figure out why i keep getting this error. Need some help
    2025-02-24 6:25:36 PM Default Value of property 'FastPeriod' of NinjaScript 'CustomRocspeed' is 0 and not in valid range between 1 and 2147483647.

    In my code, i have set it in the SetDefault for the default values
    FastPeriod = 7;
    SlowPeriod=14;​
    Attached Files

    #2
    When does this error pop up for you? I'm trying to use it and it's not happening to me. Have you tried to reset the indicator to ensure it has been updated? Or remove the indicator and put it back on?

    Comment


      #3
      i just restarted ninjatrader and it started working .. i was losing my mind for couple of hours.

      Comment


        #4
        I've had a code not work and found out it was not updating because I saved a template as the default. Glad you got it working. Also I noticed in your code that you had IsOverlay set to true; and DrawOnPricePanel also set to true. Is that what you wanted? While they were set to true, if I had hit the fixed scale button, it would unusable as a chart because the ROC difference would be so close to 0. I had to set both of these to false to place it in it's own panel. Regardless your code would still put it in the DataBox so it depends on how you use it...

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        556 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X