Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting out with Market order

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

    Getting out with Market order

    Hi All,

    I want to be able to get out of a position -at whatever the costs. I therefore use OrderType.market as below. What then is the use of stopPrice and limitPrice?


    ************** CODE 1 **************
    stopUrgent = SubmitOrder(0, OrderAction.SellShort, OrderType.Market, J, limitPrice -1 * TickSize, stopPrice -1 * TickSize, "", "Get out!!");

    ************** END OF CODE 1 **************




    In addition i wish to enter the market but with with a limit so that I don't get any extreme fills. Should I be using OrderType.Stop or stopLimit? Please see code 2 below.

    ************** CODE 2 **************

    longOrder = SubmitOrder(0, OrderAction.Buy, OrderType.Stop, 1, tickPrice +1 * TickSize, tickPrice +1 * TickSize, String.Format("Gold" + qty), "Long " + J + " " + tickPrice);


    ************** END OF CODE 2 **************

    #2
    cocopod, for the market order just set the unneeded stop and limit price parameters to 0.

    The stop order would be a stop market order, so you cannot limit the fill range - that would be done via a StopLimit order, albeit here you risk not getting filled.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    650 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    577 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X