Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TradesPerformance.NetProfit stopped returning digits after decimal point

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

    TradesPerformance.NetProfit stopped returning digits after decimal point

    Hello,

    We recently upgraded our NT to version 8.0.28.0 64-bit and realized that the SystemPerformance.AllTrades.TradesPerformance.NetP rofit method call stopped returning the digits after decimal point. It just returned whole numbers...

    Curious.

    Billy

    #2
    Hello Billy,

    Thanks for your post.

    I have created a modified version of the Sample MA Crossover strategy that comes default with NinjaTrader. I added a print to the strategy seen below.

    Print("Net profit is: " + SystemPerformance.AllTrades.TradesPerformance.NetP rofit);

    When testing the script on my end I am seeing decimals print out when the value is a decimal and not a whole number. When the value is a whole number, the number prints to the Output window without decimals.

    See the attached screenshot.

    When the value was -150.00, we see 150 print to the Output window. When the value was -287.50, we see -287.5 print to the output window.​

    I have also attached the script used to test this.
    Attached Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hello Bandon,

      I would like to add that the same call was used in NT back test and live trading, and only during live trading that this problem showed up.

      Billy

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Working...
      X