Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Limit Short Order

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

    Unmanaged Limit Short Order

    What am I missing?

    My unmanaged Limit Short order is getting filled at market.
    All my print statements state there should be a limit short order placed at 21730 (the price where 10SMA/20SMA crossed). The order is filled on the bar after the cross at MARKET (21689.50).

    Here's my code:
    Code:
                        if (limitOrder == true) {
                            Print(Times[0][0] + "  ------------- Entering a Limit Order at: " + shortLimit);
                            SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.Limit, Qty, 0, shortLimit, oco, "Short entry");
                            limitOrder = false;
                        } else {
                            SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.StopMarket, Qty, 0, mktShortStop, oco, "Short entry");
                        }
    
    ​
    See attached screenshots
    Attached Files

    #2
    Never mind, I need to place a zero for the market-price.

    SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.Limit, Qty, shortLimit, 0, oco, "Short entry");

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X