I have noticed that when TWS restarts it duplicates some of the existing orders. I experimented with this for a while to try and understand what is going on with it. I got one instrument to duplicate it's stop 6 times while other instruments which went through the same number of restarts only duplicated their orders once. The duplicate orders are being executed resulting in a discrepancy between the broker position and the strategy position. Is Multicharts and TWS supposed to reference each other to correct such errors?
I also noticed that when the orders expired, the existing open positions stops weren't replaced for a few hours even when the instruments trading session was running. What is causing the delay in placing the new stops?
Duplicate orders when TWS is restarted.
- Henry MultiСharts
- Posts: 9165
- Joined: Aug 25 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Hello Splint,
Does auto trading turn off when TWS restarts?
Do you restart the auto trading once the connection to TWS is re-established?
Does auto trading turn off when TWS restarts?
Do you restart the auto trading once the connection to TWS is re-established?
Hi Henry,
From what I've seen auto trading remains on at all times and no, I have not restarted auto trading once the connection is re-established.
Here's a couple of screen shots. It looks like initial entry orders are not effected, just the stops, but some duplicate more than others. I got it to duplicate so many times by closing and re-opening TWS. I've lost track of when the orders duplicated without my input. I'll have to monitor the situation and take some notes. I've also attached a log file.
David
From what I've seen auto trading remains on at all times and no, I have not restarted auto trading once the connection is re-established.
Here's a couple of screen shots. It looks like initial entry orders are not effected, just the stops, but some duplicate more than others. I got it to duplicate so many times by closing and re-opening TWS. I've lost track of when the orders duplicated without my input. I'll have to monitor the situation and take some notes. I've also attached a log file.
David
- Attachments
-
- api.jpg
- (167.89 KiB) Downloaded 337 times
-
- api 2.jpg
- (192.45 KiB) Downloaded 335 times
-
- Log 2012_07_18_10_47_34.xls
- (262.5 KiB) Downloaded 142 times
- Henry MultiСharts
- Posts: 9165
- Joined: Aug 25 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Unfortunately the information you have provided is not sufficient for analysis. That is not clear what exactly the problem is.
In order to investigate the issue please provide additional information:
1) Detailed problem description. Highlight the problem on the screenshots or capture this behavior on a video.
2) MultiCharts logs (if you have not restarted the platform. Logs from the previous run are erased when you start MC).
In MultiCharts 8.0 Release go to Help->Feedback->Send logs. Please let me know that you have uploaded the logs.
If your MC version is lower than MC 8.0 Release Candidate please follow this guide: https://www.multicharts.com/trading-sof ... harts_Logs
3) In MultiCharts go to File->New->Open Order and position tracker window-> Orders tab->make sure you are not filtering the information in columns, then go to File->Export to excel.
Please also export the information from the Logs tab and send it to me for analysis.
Highlight the duplicated orders in the Orders tab export file.
4) Create a screenshot of Format->Strategy properties->Auto trading tab.
You can also come to our live chat Monday-Friday 6:30 am - 4 pm EST to demonstrate the issue remotely. The operator will be able to collect all information required for analysis.
In order to investigate the issue please provide additional information:
1) Detailed problem description. Highlight the problem on the screenshots or capture this behavior on a video.
2) MultiCharts logs (if you have not restarted the platform. Logs from the previous run are erased when you start MC).
In MultiCharts 8.0 Release go to Help->Feedback->Send logs. Please let me know that you have uploaded the logs.
If your MC version is lower than MC 8.0 Release Candidate please follow this guide: https://www.multicharts.com/trading-sof ... harts_Logs
3) In MultiCharts go to File->New->Open Order and position tracker window-> Orders tab->make sure you are not filtering the information in columns, then go to File->Export to excel.
Please also export the information from the Logs tab and send it to me for analysis.
Highlight the duplicated orders in the Orders tab export file.
4) Create a screenshot of Format->Strategy properties->Auto trading tab.
You can also come to our live chat Monday-Friday 6:30 am - 4 pm EST to demonstrate the issue remotely. The operator will be able to collect all information required for analysis.
OK, I set snag-it to take screenshots at 30 second intervals and managed to capture the following behavior.
At 25/7/2012 2:00:48PM ZN switched form 1 long position to 1 short position. Instead of putting a stop to buy 2 contracts and go long again, MC interpreted the position as being closed even though it was actually short. The short position was then left without a stop.
I have uploaded the log for your perusal. Here are some screenshots I captured. I've yet to capture any of the stops being duplicated.
Thanks
Splint
At 25/7/2012 2:00:48PM ZN switched form 1 long position to 1 short position. Instead of putting a stop to buy 2 contracts and go long again, MC interpreted the position as being closed even though it was actually short. The short position was then left without a stop.
I have uploaded the log for your perusal. Here are some screenshots I captured. I've yet to capture any of the stops being duplicated.
Thanks
Splint
- Attachments
-
- ZN orders.gif
- (11.03 KiB) Downloaded 342 times
-
- ZN closed when short.gif
- (12.14 KiB) Downloaded 338 times
-
- 0009489.jpg
- (205.53 KiB) Downloaded 333 times
-
- 0008948.jpg
- (210.68 KiB) Downloaded 342 times
-
- 0008940.jpg
- (216.49 KiB) Downloaded 337 times
- Henry MultiСharts
- Posts: 9165
- Joined: Aug 25 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Hello Splint,
Please send me your strategy code and workspace to support@multicharts.com for further analysis.
In order to investigate the issue with orders we need to know the order IDs. Please provide information as described:
3) In MultiCharts go to File->New->Open Order and position tracker window-> Orders tab->make sure you are not filtering the information in columns, then go to File->Export to excel.
Please also export the information from the Logs tab and send it to me for analysis.
Please send me your strategy code and workspace to support@multicharts.com for further analysis.
In order to investigate the issue with orders we need to know the order IDs. Please provide information as described:
3) In MultiCharts go to File->New->Open Order and position tracker window-> Orders tab->make sure you are not filtering the information in columns, then go to File->Export to excel.
Please also export the information from the Logs tab and send it to me for analysis.