Hi,
looking at QMLogs (QMLogs.png) I can find that at market opening IB connection was lost at 15:30:00 and got restored at 15:30:08. So no data for 8 sec.
Looking at MC Logs (Logs.png) I can see error msg at this time. Now looking at at MC-Orders (Orders.png) I can see that orders that went out in this time where not confermed – they only have the status “sent”. On TWS I see this orders are out.
To my questions:
1. Why does MC not confirm this orders as out -> Status “Submitted”. I see on TWS that this should be on that status. Shouldn’t it be corrected after the the connection was restored? Shouldn’t “MC-Logs” update that the “errors” have been solved?
2. I don’t see any reason why the connection was broken at 15:30:00 at Market opening. Anybody an idea? Does anybody see the same phenomena at market opening?
Logs problem
Logs problem
- Attachments
-
- Orders.png
- (44.77 KiB) Downloaded 2385 times
-
- Logs.png
- (47.97 KiB) Downloaded 2386 times
-
- QMLogs.png
- (48.28 KiB) Downloaded 2378 times
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Logs problem
I seem to have a problem with the orders that went out during the 8 sec.
QNST went out at 15:30:02 -> MC-Orders3.png
On MC-Strategy Position does not seem to find a link to the active strategy and creates a new line instead of connecting it to the open one -> MC-SP.png
On TWS I see the Limit order gone on the API-Tab and the SetProfit and StoppLoss orders from the strategy itself was NOT sent. Now I have a open position without a exitstrategy that takes care of it. The open position is shown in the Position –Tab… on the API tab it is gone.
At first I thought this would just be a minor problem but at the end this could and probably will cost me. I see this problem a bit more severe now.
The chart itself does not mark a entryprice at the pricedata.
QNST went out at 15:30:02 -> MC-Orders3.png
On MC-Strategy Position does not seem to find a link to the active strategy and creates a new line instead of connecting it to the open one -> MC-SP.png
On TWS I see the Limit order gone on the API-Tab and the SetProfit and StoppLoss orders from the strategy itself was NOT sent. Now I have a open position without a exitstrategy that takes care of it. The open position is shown in the Position –Tab… on the API tab it is gone.
At first I thought this would just be a minor problem but at the end this could and probably will cost me. I see this problem a bit more severe now.
The chart itself does not mark a entryprice at the pricedata.
- Attachments
-
- MC-Orders3.png
- (53.32 KiB) Downloaded 2377 times
-
- MC-SP.png
- (33.77 KiB) Downloaded 2373 times
Last edited by siscop on 26 Apr 2011, edited 2 times in total.
Re: Logs problem
I know that going live with a beta is my own fault BUT if a strategy sends an Limitorder and “forgets” this ever happened and does not take care of the exit only because a short disconnect happened on the opening ( I still don’t know why this happened – I see it only on the logs). This error is severe and has to be solved in the release version.
Personally this issue is a NoGo for a release version.
Reported it to PM:
https://www.multicharts.com/pm/viewissu ... _no=MC-311
Personally this issue is a NoGo for a release version.
Reported it to PM:
https://www.multicharts.com/pm/viewissu ... _no=MC-311
Re: Logs problem
I agree 100%; it's not acceptable. On behalf of all MC users, thank you for reporting it to PM.This error is severe and has to be solved in the release version.
Personally this issue is a NoGo for a release version.
Reported it to PM:
https://www.multicharts.com/pm/viewissu ... _no=MC-311
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Logs problem
1. After losing a connection, order statuses are not renewed - for some reason this is the feature of IB API.
2. We have not witnessed this behavior. Does this happen often? Maybe your internet is slow, or your antivirus is too 'smart'. When the market opens many quotes arrive at one time... something can't handle it.
Please give us more details.
2. We have not witnessed this behavior. Does this happen often? Maybe your internet is slow, or your antivirus is too 'smart'. When the market opens many quotes arrive at one time... something can't handle it.
Please give us more details.
Re: Logs problem
internet DSL:
16M download
1M upload
pings to usa 153ms (not fast but ok)
pings to europe 32ms (not fast but ok)
Speedcheck different tests from different hosts
no torrent, no online games, no mass download and no mass upload so that shouldn't be the problem
Antivirus is Avira AntiVir.
This is the first time I have seen that and the first time I have traded with MC7 beta3. I haven’t specific looked at it before but I would have noticed that my strategy wouldn’t handle the exits and it always did even with beta 1 and 2.
The next market opening is in 2h. I will keep you updated – again with beta3
16M download
1M upload
pings to usa 153ms (not fast but ok)
pings to europe 32ms (not fast but ok)
Speedcheck different tests from different hosts
no torrent, no online games, no mass download and no mass upload so that shouldn't be the problem
Antivirus is Avira AntiVir.
This is the first time I have seen that and the first time I have traded with MC7 beta3. I haven’t specific looked at it before but I would have noticed that my strategy wouldn’t handle the exits and it always did even with beta 1 and 2.
The next market opening is in 2h. I will keep you updated – again with beta3
Re: Logs problem
QM had no disconnects (puhhh I hope that yesterday was just a coincident).
On MC-Orders you can see that 7 out of 21 Limit orders have the status “Sent” instead of “Submitted”. The big question now is if one of the 7 Limits will be hit that if MC realizes that it belongs to the right strategy or if it adds a new line without an exitstrategy. On TWS I can see all 21 Limitorders on the API Tab.
We will see.
On MC-Orders you can see that 7 out of 21 Limit orders have the status “Sent” instead of “Submitted”. The big question now is if one of the 7 Limits will be hit that if MC realizes that it belongs to the right strategy or if it adds a new line without an exitstrategy. On TWS I can see all 21 Limitorders on the API Tab.
We will see.
- Attachments
-
- QM27.png
- (30.7 KiB) Downloaded 2378 times
-
- MC-Orders27.png
- (67.91 KiB) Downloaded 2379 times
-
- MCLogs27.png
- (18.52 KiB) Downloaded 2389 times
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Logs problem
After a disconnect happens, ZIP up all your logs and post them here (before you close and restart MC, or else all logs will be erased). We are currently trying to reproduce the issue on our end.
What seems to be happening is this - there is a feature named Callback on the APIs of all brokers. This is used by MultiCharts to 'listen' to open positions and active orders, at which point, if the information is returned through Callback, we display this info. All brokers supply Callback information about orders and positions, except one.... Guess which one it is.
It appears as though Interactive Brokers gives Callback for open positions but not active orders, even though we are actively listening, and this is in their API. Your situation is currently being confirmed, but if it confirms, we won't hear back from IB about any active orders after losing the connection (for reference, MC6 could not listen for active orders, this is a new feature of MC7).
Then we will either have to leave it the way it is, or try to find a way to somehow find out what orders are active. If they DO send the Callback info about active orders, then all is OK. It's a lot faster to fix something in MC, than it is to wait for an update to the IB API.
What seems to be happening is this - there is a feature named Callback on the APIs of all brokers. This is used by MultiCharts to 'listen' to open positions and active orders, at which point, if the information is returned through Callback, we display this info. All brokers supply Callback information about orders and positions, except one.... Guess which one it is.
It appears as though Interactive Brokers gives Callback for open positions but not active orders, even though we are actively listening, and this is in their API. Your situation is currently being confirmed, but if it confirms, we won't hear back from IB about any active orders after losing the connection (for reference, MC6 could not listen for active orders, this is a new feature of MC7).
Then we will either have to leave it the way it is, or try to find a way to somehow find out what orders are active. If they DO send the Callback info about active orders, then all is OK. It's a lot faster to fix something in MC, than it is to wait for an update to the IB API.
Re: Logs problem
As you can see on the MC-Orders the stock “X” with the org. status ”Submitted” was filled. The strategy itself sent a TP and SL out.
The stock “TSL” with the org. status “sent” was also filled but canceled the order from yesterday (26.04.2011 15:30:05 – this chart is/was NOT active anymore) at the same time and it changed the order from today to “Submitted”. The active chart from today does not have an entryplot on the data – so it is not handling the order- NO exit, no TP and no SL -> no exit strategy
The stock “TSL” with the org. status “sent” was also filled but canceled the order from yesterday (26.04.2011 15:30:05 – this chart is/was NOT active anymore) at the same time and it changed the order from today to “Submitted”. The active chart from today does not have an entryplot on the data – so it is not handling the order- NO exit, no TP and no SL -> no exit strategy
- Attachments
-
- MC-SP271.png
- (40.22 KiB) Downloaded 2388 times
-
- MC-Orders271.png
- (68.73 KiB) Downloaded 2370 times
Re: Logs problem
Well that sounds really bad. So as I understood is that until IB (if it is a IB thing) changes this we will have to live with it? That is one huge bug and I don’t think that anyone can autotrade with the risk of not having the strategy to exit the position.Then we will either have to leave it the way it is, or try to find a way to somehow find out what orders are active. If they DO send the Callback info about active orders, then all is OK. It's a lot faster to fix something in MC, than it is to wait for an update to the IB API.
It would be nice if we could be updated if something has changed.
Re: Logs problem
The same thing happened to the stock “RIG”. It canceled the order from yesterday (chart from yesterday was NOT active) and the status from todays order org. status “Sent” was changed to “Submitted”. The active chart from today did not plot the entry. The order disappeared from the API Tab in TWS and showed up in the Position Tab but without TP and SL order.
So right now I have 2 open Positions in the Position Tab which are not regulated by any strategy.
Should I continue to post what is happening or can you reproduce this issue?
Don’t get me wrong…. I think this is a very big bug or whatever you might call it. I just want to get this fixed as soon as possible and try to help.
So right now I have 2 open Positions in the Position Tab which are not regulated by any strategy.
Should I continue to post what is happening or can you reproduce this issue?
Don’t get me wrong…. I think this is a very big bug or whatever you might call it. I just want to get this fixed as soon as possible and try to help.
- Attachments
-
- MC-SP272.png
- (44.36 KiB) Downloaded 2367 times
-
- MC-Orders272.png
- (78.03 KiB) Downloaded 2371 times
Re: Logs problem
I'm surprised you say that IB does not allow you to use a callback method to retrive open order (active orders) information. The reqAllOpenOrders method does this. Are you using it or are you only relying on the openOrderEx() method to trigger an event when an order is filled? You need to use one or the other depending on the circumstances.It appears as though Interactive Brokers gives Callback for open positions but not active orders, even though we are actively listening, and this is in their API. Your situation is currently being confirmed, but if it confirms, we won't hear back from IB about any active orders after losing the connection (for reference, MC6 could not listen for active orders, this is a new feature of MC7).
Without getting into the details, the way IB APis perform connections can very tricky. Perhaps in your case you suffer an exception in the middle of a callback to IB. In that case, the API sill automatically disconnect to socket for the command in question. The typical course of action is to try again in case there was an intermittent internet connection problem. Perhaps in your case you don't try again but give up after the first attempt. Even if one retries, the problem may persist. In that case one has no option but to give up and flag a serious error. The casue may be an extended internet connection problem, or something wrong with the code, in which it is investagted by debugging it.
With appropriately developed code, you should be able to disconnect your PC from the internet at any time, then re-econnect the PC several minutes later and everything should be synched up for all open orders and executed orders.
Re: Logs problem
When I take a look at my MC-Order Tab I see 16 open Orders with the status “Sent” even though I don’t even have one of them on an active chart?
Now with that in mind if I really open a chart and want to trade one of the 16 symbols that MC will correlate the order to that “open” MC-Order one and not to my active chart and it will be without exitstrategy or without strategyregulation?
I am asking because I wanted to activate some of these symbols for today’s market.
I will just do so and we will see what happens when the market opens.
Now with that in mind if I really open a chart and want to trade one of the 16 symbols that MC will correlate the order to that “open” MC-Order one and not to my active chart and it will be without exitstrategy or without strategyregulation?
I am asking because I wanted to activate some of these symbols for today’s market.
I will just do so and we will see what happens when the market opens.
- Attachments
-
- MC-Orders28.png
- (72.38 KiB) Downloaded 2370 times
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Logs problem
We are currently investigating the issue. I will update the thread when we have more information.
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Logs problem
Dear siscop,
Thank you for your patience and attention in this matter. We investigated the behavior you reported and I want to discuss a couple of things.
MC beta 3 would not always receive updates from IB regarding orders, meaning it would "lose track" of orders after a disconnect-reconnect scenario. Orders would remain on IB's servers but they would become unresponsive in MultiCharts. We were able to reproduce this.
An API connection is sequenced, meaning each next step depends on the previous step. The sequence that we were using did not always return the necessary values. Thanks to your inquiry, we took another look at it, and optimized the sequence by adding additional steps and checks. This problem is now resolved - MC does not lose track of its orders placed with IB after a reconnect-disconnect. This fix will be available in beta 4.
Once again, thank you very much for your close attention and extensive reporting of the issue - it's attention like this that helps us make the platform better for everyone.
Thank you for your patience and attention in this matter. We investigated the behavior you reported and I want to discuss a couple of things.
MC beta 3 would not always receive updates from IB regarding orders, meaning it would "lose track" of orders after a disconnect-reconnect scenario. Orders would remain on IB's servers but they would become unresponsive in MultiCharts. We were able to reproduce this.
An API connection is sequenced, meaning each next step depends on the previous step. The sequence that we were using did not always return the necessary values. Thanks to your inquiry, we took another look at it, and optimized the sequence by adding additional steps and checks. This problem is now resolved - MC does not lose track of its orders placed with IB after a reconnect-disconnect. This fix will be available in beta 4.
Once again, thank you very much for your close attention and extensive reporting of the issue - it's attention like this that helps us make the platform better for everyone.