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 Karado58, 11-26-2012, 02:57 PM
    8 responses
    14,825 views
    0 likes
    Last Post Option Whisperer  
    Started by Option Whisperer, Today, 09:05 AM
    0 responses
    1 view
    0 likes
    Last Post Option Whisperer  
    Started by cre8able, Yesterday, 01:16 PM
    3 responses
    11 views
    0 likes
    Last Post cre8able  
    Started by Harry, 05-02-2018, 01:54 PM
    10 responses
    3,203 views
    0 likes
    Last Post tharton3  
    Started by ChartTourist, Today, 08:22 AM
    0 responses
    6 views
    0 likes
    Last Post ChartTourist  
    Working...
    X