![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: May 2008
Posts: 28
Thanks: 1
Thanked 0 times in 0 posts
|
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 at 10:53 PM.
|
|
|
|
|
|
#2 | |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Quote:
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.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: May 2008
Posts: 28
Thanks: 1
Thanked 0 times in 0 posts
|
Quote:
Thanks! |
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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.
Ray
NinjaTrader Customer Service |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Long and Short | ZendoZafu | SuperDOM and other Order Entry Windows | 1 | 07-10-2009 08:38 AM |
| How to enter long/short on close of a candle? | pbastowski | Automated Trading | 1 | 02-26-2009 02:59 PM |
| ..."And close any open short/long position" | behealed | Automated Trading | 11 | 02-23-2009 10:52 AM |
| Long and short on same instrument | swandro | Strategy Analyzer | 1 | 11-03-2008 08:58 AM |
| Using a Ninjascript, I am having trouble establishing a long once I close a short | suitguy1 | Strategy Development | 3 | 07-30-2008 10:09 PM |