Page 1 of 1

Duplicate orders when TWS is restarted.

Posted: Jul 15 2012
by Splint
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?

Re: Duplicate orders when TWS is restarted.

Posted: Jul 17 2012
by Henry MultiСharts
Hello Splint,

Does auto trading turn off when TWS restarts?
Do you restart the auto trading once the connection to TWS is re-established?

Re: Duplicate orders when TWS is restarted.

Posted: Jul 18 2012
by Splint
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

Re: Duplicate orders when TWS is restarted.

Posted: Jul 18 2012
by Henry MultiСharts
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.

Re: Duplicate orders when TWS is restarted.

Posted: Jul 25 2012
by Splint
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

Re: Duplicate orders when TWS is restarted.

Posted: Jul 25 2012
by Splint
A screenshot of the strategy properties.

Re: Duplicate orders when TWS is restarted.

Posted: Jul 25 2012
by Henry MultiСharts
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.