issue-Phantom Order-Automation Sys mode

Questions about MultiCharts and user contributed studies.
SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

issue-Phantom Order-Automation Sys mode

Postby SUPER » 03 Jun 2010

MC 6 beta 2 - automaiton under SYNC mode.
I have just encountered a strange buy order (Broker order ID 9731), I can see it being executed at the broker end and also on the tracking centre but can't see it on the chart at all. As a result of this order I have an open buy order on my broker account resulting into complete mismatch or out of Sync( thanks its simulated trading).

My system logic triggers only "one" buy or short Market type order per bar and the sample code is available at:
http://forum.tssupport.com/viewtopic.php?t=7419

I have e-mailed log file to tssupport and look forward to their comments.
Attachments
t-1.jpg
(401.39 KiB) Downloaded 486 times

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Postby Dave Masalov » 08 Jun 2010

Dear SUPER,

Our engineers have analyzed your log files. And here are their conclusions:

The order was sent to IB. The time of waiting has expired. MC sends Cancel, but IB does not respond. MC waits for 40 seconds (dozens of ticks), however no status is received (filled/cancelled).

This is the IB problem. Finally, the order may be filled (the chance is 50% because the cancellation was sent).

Situations like this may happen and the probability of such behavior should be taken into account. You may want to use the MarketPosition_at_Broker keyword in your script to handle these situations.

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Postby SUPER » 08 Jun 2010

Dave,

Many thanks for your reply, I have better understanding of the problem and your suggestion is much appreciated, however there is some concern about "Market_position_atBroker" function as reported on forum: http://forum.tssupport.com/viewtopic.php?t=7456
Please can you provide some clarification.

Regards
Super

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Postby Dave Masalov » 08 Jun 2010

Dear SUPER,

The MarketPosition_at_broker works fine. It works this way: IB sends the value to MC, MC saves it and returns this value at MarketPosition_at_broker. Which means that if the value is not correct - it is the IB problem.


Return to “MultiCharts”