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 kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      33 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      29 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      36 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      33 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      141 views
      0 likes
      Last Post SalmaTrader  
      Working...
      X