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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X