Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error after compiling indicator NT7b14

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

    Error after compiling indicator NT7b14

    Hello,


    The Indicator is unprotected (as per the NT7b14 release notes). It compiles OK. However, when added to a chart it creates a panel as expected but does nothing else.


    In the log I get the following error:


    Failed to call method “Initialize” for indicator “name here”; “Ticksize” property cannot be accesed from within “Initialize” method.


    From the NT code breaking documentation, this is the only thing i found regarding Ticksize:

    TickSize is no longer reflective of splits. For splits use this:

    double tickSizeSplitAdjusted = TickSize / Bars.Instrument.MasterInstrument.Splits.GetSplitFa ctor(Bars.GetSessionDate(Time[0]));

    I edited the script and found
    “Ticksize” in 6 places only.

    I understand the indicator, i edited the script and can follow the logic in the code. I am not a programmer and I don't fully understand what “splits” mean but I am not sure that "splits" is the issue here.

    Appreciate any suggestions.


    Many Thanks


    AQ

    #2
    Acqua,

    I am not sure if you received the message posted earlier, but the response was this:

    "Ticksize" should be "TickSize". Please notice the capital S.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      Acqua,

      I am not sure if you received the message posted earlier, but the response was this:

      "Ticksize" should be "TickSize". Please notice the capital S.

      Thanks Josh,

      I did not see the reply posted but i did get it in my email inbox. Not sure why that happens, maybe reply is posted and then the post is deleted for some reason.

      Anyway, the lowercase s in "Ticksize" is a typo in my post, in the script everything is written correctly: TickSize. So that is most likely not the cause of the error.

      I would have expected that if the lowercase "s" in "Ticksize" made such a big difference then the code would have not compiled and show the corresponding error. Is that assumption wrong?

      Would you have any other suggestions as to why the indicator compiles successfully but doesn't execute as described in my original post?

      Thanks

      AQ

      Comment


        #4
        AQ,

        What the error means is you cannot use such a property in the Initialize() method. Please move your line of code into OnStartUp(). http://ninjatrader.com/support/helpG...?onstartup.htm
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        599 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        344 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        558 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        557 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X