I’m new to the forum so I apologize in advance if this is the wrong place to post.
I have a custom indicator that uses level 2 data (market depth). This is the problem.
1. Connect to IB and open a chart for NQ 03 -14 and connect my indicator. Everything is OK
2. Change instruments by typing on the chart to ES 03 – 14. Everything is OK.
3. Change instruments again by typing on the chart to ZN 03- 14. Everything is OK.
4. Change instruments by typing on the chart to YM 03-14 and I get an error saying that the limit of 3 level 2 subscriptions has been reached.
I know that IB imposes a limit of 3 simultaneous Level 2 subscriptions but I only have one chart open and one indicator attached to the chart, so I would assume that I am only using one level 2 subscription. It would appear that NT is not unsubscribing and re-subscribing to the new instrument’s level 2 feed when it’s changed from the chart.
Is this expected behavior and is there any way through Ninja Script that I could programmatically unsubscribe/re-subscribe to the instruments level2 data?
Any help would be greatly appreciated.
Thanks in advance.
Comment