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

Question on OrderActions

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

    Question on OrderActions

    Hi
    this is probably a dummy question, but suppose I want to send 2 limit orders to buy and sell but I don't know which one will be executed first. Basically one is the entry and the other one the exit but we don't know yet which is which.

    If the names are irrelevant then I send directly one Buy Limit and One SellShort Limit and don't care about which one is executed first. That would mean SellShort is equivalent to a Sell when I am Long. And Buy is equivalent to BuyToCover when I am short.I hope that is the case.

    However if the name are relevant (for whom? NT or Broker?), then I need to detect which one is executed first, cancel the other one and send the adequate exit order.

    For example if ShortSell is executed first, I cancel the buy and send a BuyToCover. Hence I will have to use OCO orders.

    Thanks in advance for your answer

    #2
    Hello jakjak74,

    Yes, if your buy limit order executes first, the sell limit would close your long position when it executes (and vice versa). The name is irrelevant.
    JasonNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    1 view
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    238 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    383 views
    1 like
    Last Post Gavini
    by Gavini
     
    Started by oviejo, Today, 12:28 AM
    0 responses
    1 view
    0 likes
    Last Post oviejo
    by oviejo
     
    Started by pechtri, 06-22-2023, 02:31 AM
    10 responses
    125 views
    0 likes
    Last Post Leeroy_Jenkins  
    Working...
    X