Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RC1 Strategy Analyzer calculation of profits Bug

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

    RC1 Strategy Analyzer calculation of profits Bug

    Enter to a position like:
    Code:
    EnterLong(0, QuantityFull, fromEntrySignalLong);
    first target:
    Code:
    ExitLongLimit(0, true, Position.Quantity >= Quantity1 ? Quantity1 : Position.Quantity, priceTarget, fromEntrySignalTarget1, fromEntrySignalLong);
    stop order:
    Code:
    ExitLongStopMarket(0, true, Position.Quantity, priceStop, fromEntrySignalStop, fromEntrySignalLong);
    then the stop order modified after triggered the first target:
    Code:
    ChangeOrder(orderStop, Position.Quantity, 0, priceLong);
    Instead profitable considers the deal as unprofitable, but $6.25 - $5.12 = $1.43. Not minus.
    In fact 8 out of 33 transactions at a loss, but the tester finds that 17 of the 33 unprofitable.
    Attached Files

    #2
    Thanks for your report. There was a bug identified where the profit calculation would incorrectly charge twice the commission for the entry when pairing the trade with the exit:

    $6.25 - (2 entries $5.12 + 1 exit $2.56) == $-1.43

    RC2/B14 will include a fix which uses the correct commission calculation:

    $6.25 - (1 entry $2.56 + 1 exit $2.56) == $+1.13


    10380 Fixed Commissions Profit commission calculation issue on a Trade was incorrect in scale in/out case
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    666 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    377 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    110 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    580 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X