Bug in Session of Weekend

Questions about MultiCharts and user contributed studies.
regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Bug in Session of Weekend

Postby regtracer » 25 Feb 2017

Hello,

I think there's a bug in the session definition during weekend. Some future contracts such as Coal in Dalian futures exchange trade through weekend. For example, a single trading day contains sessions from Friday 9pm to Saturday 2am, and from Monday 9am-3pm (session end).

But when I tried to add this session to the session manager, Multicharts said "session can be no longer than 24 hours". Note that this session's natural hour is indeed longer than 24hours but the trade hour is less than 24 hours. And the daily bar should be from Friday 9pm to Monday 3pm. This needs to be fixed!

Example screenshot:
Screen Shot 2017-02-25 at 4.47.57 PM.png
screenshot
(46.37 KiB) Downloaded 1719 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Bug in Session of Weekend

Postby TJ » 25 Feb 2017

At the end of Saturday, you have to click the box for "Session End".

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Bug in Session of Weekend

Postby TJ » 25 Feb 2017

Please post the link to the exchange's contract specification.

regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Re: Bug in Session of Weekend

Postby regtracer » 25 Feb 2017

At the end of Saturday, you have to click the box for "Session End".

If I click session end, there will be two days if I build daily bar from minute data. By definition it's not correct. In addition, OpenD, CloseD functions return incorrect data.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Bug in Session of Weekend

Postby TJ » 25 Feb 2017

Please post the link to the exchange's contract specification.

regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Re: Bug in Session of Weekend

Postby regtracer » 25 Feb 2017


User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Bug in Session of Weekend

Postby TJ » 25 Feb 2017



You need to post the Contract Specification from the Exchange.

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: Bug in Session of Weekend

Postby bensat » 25 Feb 2017

You need to post the Contract Specification from the Exchange.
TJ you can 'google' it ... http://www.dce.com.cn/DCE/Products/Indu ... index.html ... although I do not see a Saturday trading session if Beijing session time is used ...

Ben

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Bug in Session of Weekend

Postby TJ » 25 Feb 2017

You need to post the Contract Specification from the Exchange.
TJ you can 'google' it ... http://www.dce.com.cn/DCE/Products/Indu ... index.html ... although I do not see a Saturday trading session if Beijing session time is used ...

Ben

I do not ASSUME

regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Re: Bug in Session of Weekend

Postby regtracer » 26 Feb 2017

For example: http://www.shfe.com.cn/en/products/Copp ... 38434.html

"and other trading hours as prescribed by SHFE"

Note that the night sessions have been there for 2 years but it's still not formally listed in the contract spec.

regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Re: Bug in Session of Weekend

Postby regtracer » 26 Feb 2017

The problem with session definition is that the 24 hour limit should be applied to trading hours within one trade day, instead of using natural hours.

User avatar
Angelina MultiСharts
Posts: 260
Joined: 28 Dec 2016
Has thanked: 28 times
Been thanked: 66 times

Re: Bug in Session of Weekend

Postby Angelina MultiСharts » 27 Feb 2017

For example, a single trading day contains sessions from Friday 9pm to Saturday 2am, and from Monday 9am-3pm (session end).
Hello regracer,

Unfortunately, sessions longer than 24 hours are not supported with the current setup. In this case, it is required to set additional session break.

Please leave a feature request to have such functionality available in the future releases: https://www.multicharts.com/pm/

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: Bug in Session of Weekend

Postby bensat » 27 Feb 2017

There is no bug. The exchanges no not declare the different 'Trading Hours' as one session ! Even the added night sessions, any news about are unusually very hard to find, are separated as 'Night' sessions. So I do not see a bug here ... Btw please can the thread opener show us that the exchange is open on Saturday and the night session is not from Sun > Fri only. Just for personal interest ... thank you in advance.

Ben

regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Re: Bug in Session of Weekend

Postby regtracer » 02 Mar 2017

The exchange aggregates data from Friday 9pm to Monday 3pm as a single daily bar. I can add an additional session end, but Multicharts will create two daily bars instead of one in this case.

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: Bug in Session of Weekend

Postby bensat » 02 Mar 2017

Please can you share us a paper or something which shows that there is some weekend trading ? If you change your session to Mo-Fr 9am-3pm has the bar on Monday the same OHLC compared to the session you want to set up ?

Ben

regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Re: Bug in Session of Weekend

Postby regtracer » 03 Mar 2017

See attached screenshots. It's 15min bar for Copper (CU) trading in Shanghai futures exchange.

On 2/25 Sat 1am night session (2/24 9pm-2/25 1am) ends and On 2/27 Mon 9am day session (2/27 9am-2/27 3pm) resumes. By exchange's definition it's a single daily bar lasting from 2/24 9pm to 2/27 3pm. This is more than 24 hours during the weekend.
Attachments
Screen Shot 2017-03-03 at 3.23.22 PM.png
(112.32 KiB) Downloaded 1633 times
Screen Shot 2017-03-03 at 3.21.14 PM.png
(122.45 KiB) Downloaded 1633 times

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: Bug in Session of Weekend

Postby bensat » 03 Mar 2017

Thank you .... could you export the data for the symbols from 01/01/2017 till today && provide a download link for it please. Can't see daily bars and the resolution of the chart is not helpful enough. Would be helpful to experiment with session settings. Did you find any documents for more clarification for the added sessions from the exchange ?

Thank you in advance .

Ben

regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Re: Bug in Session of Weekend

Postby regtracer » 03 Mar 2017

See attached files. 1min and daily data.
Attachments
CU.txt
(293.52 KiB) Downloaded 275 times
CU-daily.txt
(761 Bytes) Downloaded 262 times

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: Bug in Session of Weekend

Postby bensat » 03 Mar 2017

Thank you .... I used following settings for the session :

Image

You can see in the chart that the data for the Saturday 02/25/2017 are plotted. Further the Daily data are congruent with the minute data of the session ... I think it should be fine and there is no bug. I strongly believe that issue was that you set Fri > Sat before the Monday session.

Image

I hope it helps and solves the overall problem.

Ben

regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Re: Bug in Session of Weekend

Postby regtracer » 04 Mar 2017

Hi Ben,

Thanks for the study. If you take a look at the daily file I gave, there is no daily bar for 2/25 Sat. Instead, the daily bar is 2/27 Monday, which should have the open price at 2/24 9pm.

The ideal session definition should be:
Fri 9pm - Mon 3pm
Mon 9pm - Tue 3pm
Tue 9pm - Wed 3pm
Wed 9pm - Thu 3pm
Thu 3pm - Fri 9pm

There should only be 5 daily bars for a week.

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: Bug in Session of Weekend

Postby bensat » 05 Mar 2017

There is no ideal session as long as there is no paper from the exchange explaining the correct session settings. Further I've never seen or read about an exchange with 1day gap of trading for 1 session. Even it's China. Further you were setting a session beginning and session end at the same time on Fri 9pm ... The only setting for intraday session data to be congruent with your daily data is without including the Fri > Sat session ... My daily bar for Sat was build because I set to build daily bars from minute bars.

You could try ....... for 5 daily bars only >>>>

Mo 9am > Tue 1am
Tue 9am > Wed 1am
Wed 9am > Thu 1am
Thu 9am > Fri 1am
Fri 9am > Sat 1am

But you have to set the session settings to comply with the delivered OHLC daily data, which I did in my previous post.

It seems to me I can't help you until we have a clear paper from the exchange about the correct session settings. Still not a bug for me .... I am sorry and I am out of this.

Ben

regtracer
Posts: 28
Joined: 28 Dec 2016
Been thanked: 2 times

Re: Bug in Session of Weekend

Postby regtracer » 05 Mar 2017

Sorry there's a typo in my post. Should be Thu 9pm - Fri 3pm.

Your daily bar built from 1min obviously does not comply with the delivered OHLC daily data. The Sat bar should not be there.


Return to “MultiCharts”