How to get prior close (prior day close) from TWS  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
ak28228
Posts: 3
Joined: 29 Sep 2014
Has thanked: 1 time

How to get prior close (prior day close) from TWS

Postby ak28228 » 29 Sep 2014

Dear all,

I can display prior close (Prr Cls) in TWS quote line. When I try to program to retrieve this value in Multicharts and I find that I do not have any way to do so. The closing price of a daily bar does not show the same value.

Appreciate anyone have an idea on this.

Best regards,

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

Re: How to get prior close (prior day close) from TWS

Postby Henry MultiСharts » 30 Sep 2014

Hello ak28228,

Please specify the instrument you are using. Attach a screenshot demonstrating the required value in IB TWS window and the chart with the incorrect value in MultiCharts.

ak28228
Posts: 3
Joined: 29 Sep 2014
Has thanked: 1 time

Re: How to get prior close (prior day close) from TWS

Postby ak28228 » 30 Sep 2014

thanks for your looking into this.

I attached today's NQ value for study.


thanks.
Attachments
2014-09-30_PriorCloseQuestion.jpg
TWS Prior Close
(89.8 KiB) Downloaded 602 times

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

Re: How to get prior close (prior day close) from TWS  [SOLVED]

Postby Henry MultiСharts » 30 Sep 2014

ak28228, in QuoteManager go to Tools tab->Data sources ->IB->Settings.
Change the state of "Regular Trading Hours" option to the opposite one.

If "Regular Trading Hours" option is enabled-only the data for session hours will be downloaded from the server.
If "Regular Trading Hours" option is disabled-additional non-session data will be downloaded.

Reload the chart using Ctrl+R after changing the settings.

ak28228
Posts: 3
Joined: 29 Sep 2014
Has thanked: 1 time

Re: How to get prior close (prior day close) from TWS

Postby ak28228 » 30 Sep 2014

Dear Henry,

Your solution works.

But from my result screen capture, it looks like the daily close of the daily bar is not same as the close price of last 5-minute bar of the day. So the daily close of the daily bar is adjusted somewhat by some way under such setting.

Anyway, big thanks Henry.
Attachments
2014-09-30_PriorCloseResult.jpg
TWS Prior Close Result
(34.5 KiB) Downloaded 585 times

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

Re: How to get prior close (prior day close) from TWS

Postby Henry MultiСharts » 01 Oct 2014

ak28228, you can enable the option "Build from minutes" in Format->Instrument->Settings tab in order to build the daily bar out of minute data.


Return to “MultiCharts .NET”