Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Submitting long or short, ignore whether open or close

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

    Submitting long or short, ignore whether open or close

    Working with the DOM, I can enter limit orders all over the place short or long regardless of what my current position is--long, short or flat.

    I'm using the SubmitOrder, Unmanaged = true; mechanism. But if my position changes from flat to long and if I have a SellShort limit order already in place, it cancels it automatically: "Cancelled pending entry order on opposite side of the market:" it says, because now my position is long and the order was created (created when my position was flat by the way) with SellShort action.

    I just want to enter limit orders to go short or long and ignore what my position is. Meaning, if a short is hit, my overall position decreases by one--meaning, if I'm flat, I'm now 1 short. If I was 10 short, now I'm 11 short. If I was 10 long, now I'm 9 long. Why does it seem this is so hard to do programmatically? It works fine on the DOM.

    At this point, it seems I have to track every one of my orders and manually convert them from SellShort to Sell anytime my position changes. Horrible nuisance, that.

    Is there some way to submit orders more simply and ignore whether they are to open positions vs. closing positions?
    Last edited by taotree; 03-27-2010, 10:53 PM.

    #2
    Originally posted by taotree View Post
    Working with the DOM, I can enter limit orders all over the place short or long regardless of what my current position is--long, short or flat.

    I'm using the SubmitOrder, Unmanaged = true; mechanism. But if my position changes from flat to long and if I have a SellShort limit order already in place, it cancels it automatically: "Cancelled pending entry order on opposite side of the market:" it says, because now my position is long and the order was created (created when my position was flat by the way) with SellShort action.

    I just want to enter limit orders to go short or long and ignore what my position is. Meaning, if a short is hit, my overall position decreases by one--meaning, if I'm flat, I'm now 1 short. If I was 10 short, now I'm 11 short. If I was 10 long, now I'm 9 long. Why does it seem this is so hard to do programmatically? It works fine on the DOM.

    At this point, it seems I have to track every one of my orders and manually convert them from SellShort to Sell anytime my position changes. Horrible nuisance, that.

    Is there some way to submit orders more simply and ignore whether they are to open positions vs. closing positions?

    taotree,

    I deleted the subsequent posts since we were going down the wrong path on your original post. Sorry for the wasted time, let me try and get on track.

    - Unmanaged really means unmanaged and I believe that the automatic cancelling of the entry order to go short should not occur. Give us a few days to look into this.
    - Its not clear if you are trading futures or equities (I suspect futures since you mention the DOM)
    - If futures, the DOM does not care about marking orders with sell vs sellshort. All orders are marked as sell since brokers either take care or don't care, not sure which one.
    - Equities is a different story since regulations require that orders are correctly marked as a sell or sellshort. You would need to check/try in real-time to see how your broker behaves. I know some brokers make this transparent to the client API application and correctly mark the order if sent in incorrectly, some reject, some hold on server etc...
    - So...if you are trading futures, you might even be able to just send one order to sell 2 (1 to close, 1 to open) etc...

    I hope this makes sense.
    RayNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Ray View Post
      - Unmanaged really means unmanaged and I believe that the automatic cancelling of the entry order to go short should not occur. Give us a few days to look into this.
      - Its not clear if you are trading futures or equities (I suspect futures since you mention the DOM)
      - If futures, the DOM does not care about marking orders with sell vs sellshort. All orders are marked as sell since brokers either take care or don't care, not sure which one.
      - Equities is a different story since regulations require that orders are correctly marked as a sell or sellshort. You would need to check/try in real-time to see how your broker behaves. I know some brokers make this transparent to the client API application and correctly mark the order if sent in incorrectly, some reject, some hold on server etc...
      - So...if you are trading futures, you might even be able to just send one order to sell 2 (1 to close, 1 to open) etc...

      I hope this makes sense.
      Thank you! Extremely helpful! Yes, I'm trading futures. So the automatic cancelling is a bug. That's a relief, it seemed so strange.

      Thanks!

      Comment


        #4
        This issue will be fixed for our next beta update due in a few days. Please let us know if the issue is resoved. Thanks for your patience.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        591 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        342 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        555 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X