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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          66 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          149 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          99 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          286 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X