Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error msg when applying DoubleMA indicator

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

    Error msg when applying DoubleMA indicator

    On NT 7, i'm getting an error message when applying a DoubleMA indicator to a chart.

    The error message is:

    "Failed to call method 'Initialize' for indicator 'DoubleMA': 'TickSize' property can not be accessed from within 'Initialize' method"

    It appears to be this line of code in the indicator which is in the "Initialize" method:

    "double double1 = TickSize;"

    Is this a code breaking condition of NT 7?

    If so, how could i correct it?


    Thanks,
    taddypole...

    #2
    Taddypole, correct please try moving this to the first OnBarUpdate bar -

    Code:
     
    double double1;
    
    if (CurrentBar == 0)
    double1 = TickSize;

    Comment


      #3
      Taddypole, there is a new method added in NT7 that does basically the same exact thing Bert's code does. It is called OnStartUp() and it replaces the if (CurrentBar == 0) check:
      Code:
      double double1;
      OnStartUp()
      {
          double1 = TickSize;
      }
      AustinNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      626 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      359 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      562 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      567 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X