![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Mar 2009
Posts: 68
Thanks: 0
Thanked 0 times in 0 posts
|
Hi
I am trying to figure out wether it is possible to have a buy limit and sell limit order at the same time within an automated strategy? (similar to superDOM) I tried with enter long/short position by limit order - but somehow I get only fills on one side (bid OR ask - depending what i put first in my script)- the other side seems to be ignored. Maybe I have some logic errors in my code? A workaround could be to have a second strategy with different name running the same time doing the other "direction" , but this seems rather inconvenient. I do not want a strategy that does only react after things happened, but before things happen! (means I need to have orders in the market before a certain event is going to happen) This is a VERY important feature in my opionion! Is that possible with NT automated strategies? greetings Steve |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
|
Hi steve, thanks for your post - with this you would run into the 'Internal Order Handling Rules' as outlined in the bottom section of this link - http://www.ninjatrader-support.com/H...verview36.html
To track ignored orders the TraceOrders features is helpful - http://www.ninjatrader-support.com/H...aceOrders.html Please also check into this tip here - http://www.ninjatrader-support2.com/...ead.php?t=3627 A workaround would be to monitor the last price and only send one order as the breakout / fade occurs.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Mar 2009
Posts: 68
Thanks: 0
Thanked 0 times in 0 posts
|
Bertrand, thank you for your reply -
the workaround you suggest does not really help, since you would miss the really interesting part of the action. (consider stops, or wild market orders sent in the market that cause only one short up or downburst in the price - if you cannot "wait" on the bid and ask side for it... you miss it!) - and entering "after" those things happen does not make sense. Methods that generate orders (excluding market orders) to enter a position will be ignored if:
If the stops happen - its too late already, since NT will only enter after the stops are gone and the price is up again at the "right" lvl. The Superdom lets you do exactly what the Internal Order handling for automated strategies is trying to prevent? Is this "protection" not rather a limitation? I feel one should have the choice wether to use or not use these "protective" rules. |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
|
Steve, not sure I follow - in your example you could issue an additional buy order to improve the average price of your long position, but you can't issue an order in the opposite direction (market orders excluded) while an Exit() method is working. Those 'internal order handling rules' are in place to prevent unwanted positions from overfills or inflight executions - http://www.ninjatrader-support.com/H...njaTrader.html
Changes to this approach are already on our list for future consideration.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Entering Buy/Sell Limit orders before Market opens | scjohn | SuperDOM and other Order Entry Windows | 1 | 01-22-2009 08:56 AM |
| buy stop limit and sell stop limit | avalanche800 | ATM Strategies (Discretionary Trading) | 1 | 09-12-2008 06:24 AM |
| Submitting a Buy Limit at the same time as Sell Limit (Problem) | vjsworld | Strategy Development | 2 | 08-26-2008 03:09 PM |
| Turn off prompt to confirm 'buy/sell stop limit' orders.. | newbouldm | Miscellaneous Support | 2 | 01-16-2008 03:52 PM |
| Placing resting limit BUY & SELL orders on the DOM | Nelson1980 | Miscellaneous Support | 2 | 06-02-2006 12:06 AM |