Broker Position Not Updating In Simulated Auto-Trading

Questions about MultiCharts and user contributed studies.
tony
Posts: 420
Joined: 14 Jun 2013
Has thanked: 30 times
Been thanked: 81 times
Contact:

Broker Position Not Updating In Simulated Auto-Trading

Postby tony » 17 Nov 2013

I have been auto-trading using a simulated (paper) Interactive Broker account for about 8 weeks now. All is fine with one exception. And it happens only a handful of times (maybe 3 in 8 weeks). My strategy will generate a signal, it is sent to IB and IB places the trade.

But Market_Position_at_Broker stays at 0 and does not update. In the order and position tracker window, I see the strategy positions do not match. So I go into IB, and I see the order but it appears to be pending even though they are listed in the trade log as having been executed.

I'm using IQ Feed for data, IB simulated account for the broker, in SA mode, trading just one instrument on one chart and one workstation (do not have multiple charts, work stations, etc open, just one). I am using IOG=True, have recalcbar(5) in my the script is run frequently and I even have "events" checked in auto-trading such as position change. But for whatever reasons, Market_Position_at_Broker just will not update even though the strategy has generated a trade.

Again it has only happened about 3 times in 8 weeks. I suspect it is related to the simulated account for IB but was curious if anyone has come across this in the past and if so if you have any info on the cause? I have a log detail for the IB API but it is about five screen shots in length and pure gibberish to me.

Thank You -

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Broker Position Not Updating In Simulated Auto-Trading

Postby Andrew MultiCharts » 18 Nov 2013

...
So I go into IB, and I see the order but it appears to be pending even though they are listed in the trade log as having been executed.
...
Hello Tony,

Do you mean the orders are shown both as pending and executed in IB TWS at the same moment? If yes, did you contact IB support in regards to this issue?
If this happens again, please come to our live chat during working hours (6:30 am – 4:00 pm EST) to let our operators connect to your computer remotely in order to study the issue and help you: http://messenger.providesupport.com/mes ... pport.html
My guess is: IB API did not return information of the opened position to MC. Checking logs we will be able either to confirm it or to find another reason of the issue.


Return to “MultiCharts”