![]() |
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
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
|
Dear Sir/Madam
At today's US stock open, I was autotrading four instruments: "Instrument 1" / strategy "A" "Instrument 2" / strategy "B1" "Instrument 3" / strategy "B2" "Instrument 4" / strategy "B3" Strategies A, B1, B2 and B3 are all separate strategies that I run separately on different charts open on NT. All four intrument/strategy combinations placed orders at 09:30:16, and were filled by 09:30:29. At 09:36:30, "Instrument 2"/B1 hit its profit target and exited. Unexpectedly, it also looks like the stop/profit target orders associated with "Instrument 1"/A and "Instrument 4"/B3 were cancelled (by NT?) approximately 1 second later (but not the stop/profit target orders for "Instrument 3"/B2). I don't understand why? Can you help shed any light on this? Thanks = = = = = = = On Mon, Jan 11, 2010 at 12:56 PM, NinjaTrader Customer Service <support@ninjatrader.com> wrote: Hello, Thank you for your note. I checked your log file and it displays the two profit targets in question were manually cancelled. 11/01/2010 9:36:31|1|32|Order='1f03701:0299/XXXXXXXX' Name='Profit target' New State=PendingCancel Instrument='Instrument 1' Action=BuyToCover Limit price=XX,57 Stop price=0 Quantity=100 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 11/01/2010 9:36:31|1|32|Order='1f03701:029a/XXXXXXXX' Name='Profit target' New State=PendingCancel Instrument='Instrument 4' Action=BuyToCover Limit price=XX,06 Stop price=0 Quantity=100 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' It lists a PendingCancel status, which indicates they are cancelled from within the software. What actions did you perform within the software around 9:36:31? Sincerely, Jason Hilling = = = = = = = = Hi, Jason As far as I recall, I didn't do anything within the trading software at the time. I trade with one copy of NT on a computer dedicated to trading, and - while it's trading - I work on another computer (where I have a free license for NT) developing other trading strategies. At the time of the profit target exit of "Instrument 2"/B1, I don't think I was touching the trading computer. I would have heard the audio NT alert that the position had been exited, and also "order cancelled" ... a few moments later I noticed my working orders (stop/profit target) for "Instrument 1"/A and "Instrument 4"/B3 had also been cancelled. What makes me suspicious that the cancellations were software generated (NT or MBT Navigator?) is that they follow the "Instrument 2"/B1 exit by about 1 second.... = = = = = = = = On Mon, Jan 11, 2010 at 1:18 PM, NinjaTrader Customer Service <support@ninjatrader.com> wrote: Hello, Thank you for your response. It should not be related to the other strategy, since automated strategies run independent from each other, see the forum thread below. http://www.ninjatrader-support2.com/vb/showthread.php?t=21812&highlight=independent Could it be strategy B1 references strategies A and B3? Does this behavior always occur when the profit target of strategy B1 executes? Unfortunately I am not very proficient in NinjaScript and programming and would not know how this would look in the code of B1. If it is not inconvenient for you, we appreciate all NinjaScript related questions be directed to our support forum. This helps us build our knowledge base for future users. There is a very active developer community in our support forum that supplements the responses provided by NinjaTrader support staff providing all users with an exceptional support experience. Sincerely, Jason Hilling NinjaTrader Customer Service = = = = = = = Hi, Jason Q: Could it be strategy B1 references strategies A and B3? A: THE CODE FOR B1 DOES NOT REFERENCE A OR B3, UNLESS THERE IS SOME HIDDEN/IMPLICIT WAY (THAT I AM NOT AWARE OF) THAT THE CODE OF A RUNNING STRATEGY CAN REFERENCE ANOTHER RUNNING STRATEGY ... Q: Does this behavior always occur when the profit target of strategy B1 executes? A: TODAY WAS THE FIRST TIME THE FOUR INSTRUMENT STRATEGY COMBINATIONS ALL TOOK POSITIONS AT THE OPEN, SO I DON'T YET KNOW IF THIS IS SOMETHING THAT WILL "ALWAYS" OCCUR IN THIS SITUATION ... I'll move this to the Support Forum now. Thanks
Last edited by AnotherTrader; 01-11-2010 at 11:54 AM.
|
|
|
|
|
|
#2 |
|
Senior Member
|
From: NinjaTrader Customer Service <support@ninjatrader.com>
Date: Mon, Jan 11, 2010 at 1:33 PM Subject: RE: Cancelled stop/profit target orders {265112} Hello, Thank you for your response. That could be an explanation of the issue. Strategy B1 contains code that will cancel the profit target of the other strategies. Did you create these strategies yourself or did you obtain them from a third party vendor? Unfortunately I am not very proficient in programming and would not know how to check this. Sincerely, Jason Hilling = = = = = = = = = = = = These are strategies that I have created myself ... I would like to understand better in what ways one running strategy might result in cancelation of the orders in another? |
|
|
|
|
|
#3 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,232
Thanks: 83
Thanked 334 times in 326 posts
|
Hello AnotherTrader,
Since you did not code your strategy that way, it should not be related to the code of strategy B1. The log file listed a PendingCancel status, which indicates the orders have been manually cancelled within the software. I suggest to run the strategies in simulation and check if profit targets of strategy A and B3 are cancelled, once profit target of B2 executes.
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#4 |
|
Senior Member
|
At today's open, all four instrument/strategy combos again took positions, for the second day in a row.
But this time, all profit target/stop orders executed as intended without unexpected cancellations. As far as I can tell, there was no difference between how I ran my trading set-up today and yesterday, so I don't know what caused yesterday's anomalies. However, as I am now comfortable that yesterday's order cancellations are unlikely to be due to a coding error - and more likely to some intermittent factor or causes that didn't repeat today - I'm not going to look further into this issue for now. If it occurs again, I'll try to get some more information about the circumstances when it occurs, and then I'll rekindle this thread ... |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Unrealized Profit for Stop Loss and Profit Target | dancorcal | Strategy Development | 1 | 12-17-2009 10:12 AM |
| Profit Target/Stop question | frostengine | Miscellaneous Support | 2 | 12-02-2008 03:01 PM |
| Strategy: Monitoring Stop-Loss and Profit Target Orders | NinjaTrader_Josh | Reference Samples | 0 | 02-23-2008 11:15 PM |
| Strategy: Modifying the price of stop loss and profit target orders | NinjaTrader_Josh | Reference Samples | 0 | 09-06-2007 12:46 PM |
| profit target - no stop | Futures_Shark | Suggestions And Feedback | 1 | 08-14-2007 10:51 PM |