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 Tim-c, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post Tim-c
    by Tim-c
     
    Started by FrancisMorro, Today, 03:24 AM
    0 responses
    3 views
    0 likes
    Last Post FrancisMorro  
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,772 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    31 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    945 views
    0 likes
    Last Post spwizard  
    Working...
    X