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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    47 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X