View Full Version : Failed to Execute error
werosen
01-11-2006, 01:54 AM
I am using Ver 5.0.1000.7. I placed an order to the PATsystems and the order failed with the following message in an error window:
Failed to executeDB job 'StrategyUpdateJob':You cannot add or change a record because a related record is required in table 'nt_strategy'
What do I do know?
Warren
NinjaTrader_Ray
01-11-2006, 02:09 AM
Tools-->Options, Misc tab, Press repair dbase.
werosen
01-11-2006, 06:19 AM
Attached is the log file for the DB failure. It shows that an order was filled, then that the Stop was working, then the Target was rejected, then that NT arbitrarily/incorrectly cancelled my valid working Stop.
It appears thatthere are several code issues in NT.
The first is that a DB error occurred because the Stop was accepted and working, while the Target was rejected.
The second is that NT incorrectly cancelled a valid working Stop.
The third is that there was no notification from NT that a valid working order was cancelled (the Stop).
In addition to the above, the cancellation of the valid working Stop, without authorization or input from me, resulted in a $340 loss that would not have otherwise occurred. NT only notified my that the Target had been rejected, so I was dealing with that issue with my broker, while the price blew through my stop price. By the time I was aware that NT incorrectly cancelled my valid working Stop, the result was a net additional loss of $340. Since this was caused by improper actions in NT, I am requesting re-imbursement for this loss (I am willing to forego the additional $116 I also lost by missing another trade to deal with this becausethe broker had a settings problem with the margins on my account, so it might not have happened). I am willing to accept this as a cash re-imbursement, or as credit on my Ninja Trader subscription.
Please let me know how you would like to handle this.
Regards,
Warren Rosenfeld (214-460-6335)
NinjaTrader_Dierk
01-11-2006, 06:53 AM
Please send traces and logs (Help->Mail to support).
Thanks
werosen
01-11-2006, 07:11 AM
files sent
NinjaTrader_Ray
01-11-2006, 07:56 AM
We have reviewed your files. In your log it is very clear that you reached account margin limitations and thus the stops/targets were rejected which in turn cancelled the OCO tied stop order.
Here is the part in the log.
08:32:02:312XXXXXX Pats.Callback.Order5: pos=0 status=Rejected orderId='XXXXX' orderType='Limit' contractName='MINI R2000' price=716.3/716.3 price2=0/0 lots=1 amountFilled=0 averagePrice=0/0 status=Rejected nonExecReason='PATS host rejected due to insufficient margin'
You can either ask your broker to increase your account limitations or reduce the lot size you trade.
Ray
werosen
01-11-2006, 08:00 PM
OK, I understand now that this was an internal OCO issue which is why you cancelled the working STOP, so you really aren't responsible for the loss.
Can you address the issue of the DB error?
Also, I would highly recommend that you add an error message if there is a failure, for whatever reason, in the execution of placing the Target/Stop orders so that the trader immediately knows they have an open positionthat is not protected with a Stop. Expecting the trader to automatically assume this is probably not a good idea. I have added my own codein eSignal to recognize this condition and deal with it should the need arise.
NinjaTrader_Ray
01-12-2006, 02:57 AM
Thanks for suggestion. DB issue under investigation.