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

Double entry in automated strategy

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

    Double entry in automated strategy

    Hello, I have acquired a strategy that can close an order and at the same time send another one in the opposite direction, for example, I can be short and I want to close the position at the close of a bar higher than the open one but at the same time. enters long in that same close, and every time it does so, it gets an error message "Cancellation rejected by the Order Management System" and what it does is open the position twice in the opposite direction to that new order, in the same example, you can be short with 1 contract and the moment you close the position, you open a long one, but for 2 contracts, but nevertheless it seems that the first short does not close.
    Could you help me figure out how to properly close the original position so that I don't open twice as many contracts on the reverse?
    attached images
    Attached Files

    #2
    Hello Agustinvitalee,

    When you say 'can close an order' do you mean can close a position? Or do you mean can cancel an order?

    This is the unmanaged approach correct?
    (The managed approach would result in an overfill or double the quantity in the opposite direction if you try and exit a position and reverse at the same time. You have to just call the entry in the other direction or you have to use the unmanaged approach.
    https://ninjatrader.com/support/foru...16#post1036616)

    Is this a live order or a Sim101 order?

    If this is a live order, have you contacted your broker to inquire why the order cancellation was rejected?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by arvidvanstaey, Today, 02:19 PM
    4 responses
    11 views
    0 likes
    Last Post arvidvanstaey  
    Started by samish18, 04-17-2024, 08:57 AM
    16 responses
    57 views
    0 likes
    Last Post samish18  
    Started by jordanq2, Today, 03:10 PM
    2 responses
    9 views
    0 likes
    Last Post jordanq2  
    Started by traderqz, Today, 12:06 AM
    10 responses
    18 views
    0 likes
    Last Post traderqz  
    Started by algospoke, 04-17-2024, 06:40 PM
    5 responses
    47 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X