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 Mestor, 03-10-2023, 01:50 AM
          16 responses
          388 views
          0 likes
          Last Post z.franck  
          Started by rtwave, 04-12-2024, 09:30 AM
          4 responses
          31 views
          0 likes
          Last Post rtwave
          by rtwave
           
          Started by yertle, Yesterday, 08:38 AM
          7 responses
          29 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by bmartz, 03-12-2024, 06:12 AM
          2 responses
          22 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by funk10101, Today, 12:02 AM
          0 responses
          7 views
          0 likes
          Last Post funk10101  
          Working...
          X