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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    160 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    81 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    125 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    206 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    184 views
    0 likes
    Last Post CarlTrading  
    Working...
    X