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 <[email protected]> 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 <[email protected]> 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
Comment