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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      161 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      308 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      349 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X