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 AveryFlynn, Today, 04:57 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Max238, Today, 01:28 AM
    4 responses
    37 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by r68cervera, Today, 05:29 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by geddyisodin, Today, 05:20 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by timko, Today, 06:45 AM
    2 responses
    14 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Working...
    X