Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

stop market order unmanaged true

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

    stop market order unmanaged true

    Hi, I would like to confirm the following;

    Using unmanaged = true and ChangeOrder().

    I am attempting to modify a stop market order which is set to a price of which I would like to update to a market order, essentially this it intended to be a variation of ExitOnClose().

    What is standard practice to ensure that this order is sent as a market order, to be filled at any price. Currently when using the following does not work and in fact cancels the order;
    ChangeOrder(StopOrder1, 1, 0, 0);

    However if I set a price of which works some kind of offset is required to ensure the order gets filled although I would prefer to send the order for this strategy to exit immediately at whatever price, if that is my only option I will work with that instead.
    ChangeOrder(StopOrder1, 1, GetCurrentBid()+3*TickSize);

    Regards, suprsnipes.
    Last edited by suprsnipes; 07-13-2020, 08:31 PM.

    #2
    Hello suprsnipes,

    Thanks for your post.

    ChangeOrder would be used to move an order and would not be used to replace an order with a different order type.

    In this case, I would suggest cancelling the order with CancelOrder, checking for the cancellation in OnOrderUpfdate when that order's OrderState is OrderState.Cancelled, and then to submit your market order with SubmitOrderUnmanaged.

    CancelOrder - https://ninjatrader.com/support/help...ancelorder.htm

    OnOrderUpdate - https://ninjatrader.com/support/help...rderupdate.htm

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    26 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, Yesterday, 09:53 PM
    2 responses
    49 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    192 views
    0 likes
    Last Post Hasadafa  
    Started by GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,235 views
    0 likes
    Last Post xiinteractive  
    Working...
    X