Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategy performance shows short position as long

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

    strategy performance shows short position as long

    have there been any known occasion where such thing can happen? in strategy I have:

    `EnterShort(NumContracts, "S_LRSI");`

    and

    `ExitShort("SX_PT", "");​`

    and also on chart, it shows up well (i.e. 25 July)
    Click image for larger version  Name:	2024-08-04 00 20 05.png Views:	0 Size:	156.6 KB ID:	1312798

    what could be the reason? This is the meta:

    ```
    Calculate = Calculate.OnBarClose;
    EntriesPerDirection = 1;
    EntryHandling = EntryHandling.UniqueEntries;
    IsExitOnSessionCloseStrategy = true;
    ExitOnSessionCloseSeconds = 30;
    IsFillLimitOnTouch = false;
    MaximumBarsLookBack = MaximumBarsLookBack.TwoHundredFiftySix;
    OrderFillResolution = OrderFillResolution.Standard;
    Slippage = 0;
    StartBehavior = StartBehavior.WaitUntilFlat;
    TimeInForce = TimeInForce.Gtc;
    TraceOrders = true;
    RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose;
    StopTargetHandling = StopTargetHandling.PerEntryExecution;​
    ```
    Last edited by ttodua; 08-04-2024, 02:24 AM.

    #2
    Hello ttodua,

    I'm seeing the entry order name is SX_PT and the exit order name is S_LRSl.

    Likely the SX_PT order is a buy order and S_LRSl is a sell order.

    You can print the order.ToString() in OnOrderUpdate() to verify.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      NinjaTrader_ChelseaB thanks for response, however, did you see my top lines of the post?

      `EnterShort(NumContracts, "S_LRSI");`

      `ExitShort("SX_PT", "");​`

      how can `SX_PT` be seen as entry and `S_LRSI` as an exit?

      Comment


        #4
        Hello ttodua,

        The exit would not be for that entry as the fromEntrySignal does not match the entries signalName.

        So there are other orders at work that may be causing the pairing to be not as you expect.

        Once you provide the requested debugging output, we will have more information.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        116 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        61 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        40 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        43 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        82 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X