Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

API Change help

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

    API Change help

    I had a strategy coded and I switched to NT6.5. The programmer said that the error I was getting when I was compiling was API based and told me to contact NT support. Here is the snippet of code that won't compile. Thank you for your help.

    #if TESTBED || INDCOM
    return TotalTradeProfit();
    #else
    if (TotalTradeProfit() != startegy.Performance.AllTrades.Performance.Currenc y.CumProfit)
    {
    // Indicator.("signals","Total Net Profit calc:{0} NT:{1}", TotalTradeProfit(), startegy.Performance.AllTrades.Performance.Currenc y.CumProfit);
    }
    return startegy.Performance.AllTrades.Performance.Currenc y.CumProfit;
    #endif

    (There is no space in 'currency' in the actual code but the forum makes it look like there is)

    #2
    Can you paste the error you get when you compile the strategy? The error should show up at the bottom of the NinjaScript Editor.

    Thanks.
    RayNinjaTrader Customer Service

    Comment


      #3
      I should also mention that if it does not work in 6.5 due to changes we made, then you will have to have the developer ammend the strategy (update it) so it works with 6.5. Very little code breaking changes were made and the cost to update it should be reasonable.
      RayNinjaTrader Customer Service

      Comment


        #4
        Indicator\SignalIndicator.cs 'NinjaTrader.Strategy.TradeCollection' does not contain a definition for 'Performance' CS0117 - click for info 298 74

        Indicator\SignalIndicator.cs 'NinjaTrader.Strategy.TradeCollection' does not contain a definition for 'Performance' CS0117 - click for info 302 55

        Comment


          #5
          Thanks.

          If you feel you can change this yourself in the NinjaScript Editor, you should replace:

          AllTrades.Performance

          with

          AllTrades.TradesPerformance

          Assuming this is the only error --> It should compile.
          RayNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          571 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          330 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          548 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          549 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X