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 hazylizard, Today, 08:38 AM
    2 responses
    8 views
    0 likes
    Last Post hazylizard  
    Started by geddyisodin, Today, 05:20 AM
    2 responses
    17 views
    0 likes
    Last Post geddyisodin  
    Started by Max238, Today, 01:28 AM
    5 responses
    47 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by giulyko00, Yesterday, 12:03 PM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by habeebft, Today, 07:27 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_ChristopherS  
    Working...
    X