- ago
Hi,

I’m running into an issue with automated trading through Interactive Brokers. At first, everything works fine—the connection between WL and TWS is set up, data streams in, and manual trades from the chart go through to TWS and execute as expected.

The issue starts when I attach a strategy to a chart. It seems like the strategy on the chart and the Order Manager are out of sync. For instance, when the chart shows a buy signal, the Order Manager ends up with a sell order, and vice versa.

To test this, I created a simple strategy (screenshot).



I added it to a 1-minute chart streaming from TWS and turned on auto-staging. Here’s what I see: the three orders in the Order Manager don’t match the signals in the chart window (screenshot).



I’ve checked the logs, but there’s nothing unusual in them (screenshot).



Any idea what might be going on or how to fix this?

Thanks a lot for your help!
Jochen
0
130
Solved
5 Replies

Reply

Bookmark

Sort
GlitchA
 ( 9.66% )
- ago
#1
It looks like it's matching to me, although it's a bit hard to see the timestamps.

It looks like the most recent order in the Order Manager is the sell, which corresponds to the signal that I see on the streaming chart.
0
- ago
#2
Thanks, Glitch, for your quick reply!

Just to clarify, isn’t it the case that the last signal on the chart, next to the current bar, is a buy signal, while the last signal in the Order Manager is a sell signal?
0
- ago
#3
I’ve now enabled auto-placing.

In this situation, I have a position in TWS:



And in this situation, I’m flat in TWS:



Shouldn’t it be the other way around?
0
ConeA
 ( 5.35% )
- ago
#4
The Buy occurred on the last complete bar in the chart. Those are "Trade arrows" (actually triangles).

The signal is for the next bar, the one that is forming. You can't see the signal on the chart. It's shown only in the chart's lower right status bar.

btw, you should look at the Accounts tool (Ctrl+T) if you want to see if the Positions you have with IB match in WL.
0
Best Answer
- ago
#5
Got it now — thanks for explaining!
1

Reply

Bookmark

Sort