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 gravdigaz6, Yesterday, 11:40 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by MarianApalaghiei, Yesterday, 10:49 PM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by XXtrader, Yesterday, 11:30 PM
    0 responses
    4 views
    0 likes
    Last Post XXtrader  
    Started by love2code2trade, 04-17-2024, 01:45 PM
    4 responses
    28 views
    0 likes
    Last Post love2code2trade  
    Started by funk10101, Yesterday, 09:43 PM
    0 responses
    9 views
    0 likes
    Last Post funk10101  
    Working...
    X