![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Certified NinjaScript Consultant
|
I am using advanced order handling in a strategy that returns the following message while backtesing in the Strategy Analyzer:
Quote:
7:15 am bar - place a EntryLongStopLimit order (aka buy stop ) 8:15 am bar - Buy stop order is triggered and limit order is placed and filled. OnOrderUpdate method is used to place target limit and stop loss (market) orders above and below the average entry price respectively using the proper entry signal name. 9:15 am bar - Stop loss (market) order is hit to close the position. A new EntryShortStopLimit order (aka sell stop) is placed but is ignored per the message above. I would have thought that the previous trade's outstanding exit order (target limit order) would have been cancelled via OCO and therefore not interfere with the new entry being placed in the opposite direction on the same bar. 1) Am I missing something or is this behavior expected? 2) Is there a way to have previous trade exits and new orders be placed in the opposite direction on the same bar? 3) Can you confirm whether "fix your strategy" messages of this nature are displayed once for the first occurrence or for each occurrence encountered within a strategy backtest? Thanks, Whitmark PS Note the typo in the error message "site" vs "side". |
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
In your example, wait for the stop order to be confirmed cancelled and then submit the next entry order. It will be cancelled once the position is closed out.
The error text will be changed in next release. Disregard the "fix your strategy"
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hotkey order entry | chudx | Suggestions And Feedback | 7 | 11-25-2008 01:30 AM |
| Order entry Desire | Mike Winfrey | ATM Strategies (Discretionary Trading) | 1 | 09-17-2007 02:49 PM |
| Submit Limit Entry Order and Stop Loss Order at same time? | aspTrader | Miscellaneous Support | 2 | 10-04-2006 02:40 AM |
| wait for entry order fill before placing stoplimit order | ratherBgolfing | Automated Trading | 2 | 03-27-2006 01:59 AM |
| order entry/exit | Vin | Miscellaneous Support | 1 | 06-29-2005 12:10 AM |