Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Assertion Failed Error

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

    Assertion Failed Error

    Hi,

    I am in the process of debugging a relatively simple indicator. During compilation of some new additions to the code, NT7 crashed with an Assertion error.

    I ran the indicator through the VS debugger and the call stack name that came up was

    > ec2402e6bec741a0bd0334bb93bff218.dll!NinjaTrader.I ndicator.MovingAverage._TMA(int Period, int CurrentBar, NinjaTrader.Data.IDataSeries Volume, NinjaTrader.Data.DataSeries Input, NinjaTrader.Data.DataSeries average) Line 795 + 0x35 bytes C#

    The offending code was:
    publicstaticdouble _TMA(int Period, int CurrentBar, IDataSeries Volume, DataSeries Input, DataSeries average)
    {
    PB_TrailDown pb =
    new PB_TrailDown();
    double avg=0;
    avg = pb.TMA(Input, Period)[0];
    return avg;
    }

    The issue is the line
    avg = pb.TMA(Input, Period)[0];

    I should point out that I am trying to call an instance method from a static method. The static method sits inside a different class than the indicator class. I have tried to do this via object reference but that completely crashes NT.

    Any idea why the assertion error? Please advise. Thank you.

    #2
    Zeos6, would you mind sending us a simplified example to support so we could test and review the assert with our developers?

    Thanks
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,

      Where, and to whom, do I send the code?

      Comment


        #4
        Zeos6, please just contact us over Help >> Mail to Support with a zip file attached and then reference this thread in your comment. Thanks in advance.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks Bertrand. I have done as suggested and sent the file in to Support.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Belfortbucks, Today, 09:29 PM
          0 responses
          6 views
          0 likes
          Last Post Belfortbucks  
          Started by zstheorist, Today, 07:52 PM
          0 responses
          7 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          151 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          6 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Working...
          X