Setting correct sessions for IB CFDs

Questions about MultiCharts and user contributed studies.
Zheka
Posts: 223
Joined: 13 Jan 2016
Has thanked: 8 times
Been thanked: 53 times

Setting correct sessions for IB CFDs

Postby Zheka » 29 Oct 2017

IB CFDs and XAU/XAG are tagged to a "SMART" Exchange.

SMART Exchange has a single list of settings for it, and while changing product settings or session template is not a problem, the TimeZone - relative to which a session template then works - IS a problem.

If one product trades in Japan and exchange session times are in JST, while another's in GMT or CET, how is one supposed to handle this situation and build Daily bars (and broadly speaking - reference correct Open times)?

I do not think setting correct session times manually per product via an offset to GMT in a session template is a good solution.
1 - handling of DST should be handled by MC automatically.
2 - accounting for different exchange opening times in the code would be very cumbersome; - rather than e.g. just referencing 9:30 across the markets.

I have tried to create different "Exchanges" in QM with appropriate TimeZone reference ( AND an appropriate currency) and then symbol-map to IB's SMART in the Broker profile. While this kinda works and plots historical data correctly, I can see errors in the QM generated by TWS ( ID=210, code=200 - Invalid Exchange specified).

Please advise how can one set IB CFD symbols correctly.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Setting correct sessions for IB CFDs

Postby Henry MultiСharts » 01 Nov 2017

Hello Zheka,

Please send me the QMD file with the export of the instruments (settings, without data) you are having issue with.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Setting correct sessions for IB CFDs

Postby Henry MultiСharts » 07 Nov 2017

I have tried to create different "Exchanges" in QM with appropriate TimeZone reference ( AND an appropriate currency) and then symbol-map to IB's SMART in the Broker profile. While this kinda works and plots historical data correctly, I can see errors in the QM generated by TWS ( ID=210, code=200 - Invalid Exchange specified).
Hello Zheka,

You should not change the exchange of IB instruments as this will affect the ability of receiving the data.
As for the instruments sessions - you will need to create individual session templates (not in Exchange time zone) and apply them to the required instruments.

Zheka
Posts: 223
Joined: 13 Jan 2016
Has thanked: 8 times
Been thanked: 53 times

Re: Setting correct sessions for IB CFDs

Postby Zheka » 07 Nov 2017

Henry,

It will be impossible to correctly match e.g. Japanese stock exchange hours to IBs (Exchange) EST/EDT hours - because of the DST.

Is it possible to add a "TimeZone" to the session template?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Setting correct sessions for IB CFDs

Postby Henry MultiСharts » 20 Nov 2017

Hello Zheka,

That is not possible to add a "TimeZone" to the session template within the current software architecture.
We will keep in mind this case if there will be room for improvement of this functionality in the future.

Zheka
Posts: 223
Joined: 13 Jan 2016
Has thanked: 8 times
Been thanked: 53 times

Re: Setting correct sessions for IB CFDs

Postby Zheka » 20 Nov 2017

Pity. What's the recommended way then to trade such non-native (to the exchange) symbols? Monitor DST and manually adjust as you go?
How to correctly do the backtesting?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Setting correct sessions for IB CFDs

Postby Henry MultiСharts » 22 Nov 2017

Hello Zheka,

You can create a session template that will cover both DST and ST to get all the data, then in your code reference the time values according to DST/ST based on the date.

Zheka
Posts: 223
Joined: 13 Jan 2016
Has thanked: 8 times
Been thanked: 53 times

Re: Setting correct sessions for IB CFDs

Postby Zheka » 22 Nov 2017

Coding around is surely always possible. Please let's get this improved in one of the upcoming releases.

Thank you.


Return to “MultiCharts”