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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        87 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        128 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        65 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        117 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        67 views
        0 likes
        Last Post PaulMohn  
        Working...
        X