Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 00:53:58 +0000



[User Discussion] - setting to designate bar at end of time period instead of beginning?

View Count: 718

[2019-02-10 19:39:32]
uM8137 - Posts: 180
This threw me for a bit. Suppose I am looking at a 1-minute
OHLC bar chart in SC at 8:04am NYC time.

I see that SierraChart by default is graphing
1-minute bars with the timestamp at the beginning of the bar's time,
so the close plotted at 8:04am bar actually represents
the closing price in force at 8:05am.

Is there a setting somewhere in SC (to shift the bars over by one) so that the
closing plotted for the 8:04 bar represents the closing
in force at 8:04am? This caught me up because with the defaults
I have "certain knowledge of the future"(!).

* * *

Below is supporting detail. This is way more detail than
hopefully anyone should need; feel free to ignore this if
the above question makes sense.

F.US.EPH19 from CQG ticks

{"TickID":32552477, "Tm":"2019-02-07T08:03:59-05:00", "Cl":2713.25, "Sz":1, "Hi":2713.25, "Lo":2713.00, "Op":0.00}
{"TickID":32552478, "Tm":"2019-02-07T08:04:00-05:00", "Cl":2713.25, "Sz":2, "Hi":2713.25, "Lo":2713.00, "Op":0.00}
{"TickID":32552479, "Tm":"2019-02-07T08:04:00.001-05:00", "Cl":2713.25, "Sz":2, "Hi":2713.25, "Lo":2713.00, "Op":0.00}

... so Cl = 2713.25 for 8:04

{"TickID":32552638, "Tm":"2019-02-07T08:04:58-05:00", "Cl":2713.00, "Sz":1, "Hi":2713.25, "Lo":2713.00, "Op":0.00}
{"TickID":32552639, "Tm":"2019-02-07T08:05:03-05:00", "Cl":2713.25, "Sz":1, "Hi":2713.25, "Lo":2713.00, "Op":0.00}

... so Cl = 2713.00 for 8:05

{"TickID":32552852, "Tm":"2019-02-07T08:05:54.028999-05:00", "Cl":2712.75, "Sz":1, "Hi":2713.00, "Lo":2712.75, "Op":0.00}
{"TickID":32552853, "Tm":"2019-02-07T08:06:01-05:00", "Cl":2712.75, "Sz":1, "Hi":2713.00, "Lo":2712.75, "Op":0.00}

... so Cl = 2712.75 for 8:06

{"TickID":32552984, "Tm":"2019-02-07T08:06:53.005-05:00", "Cl":2713.00, "Sz":1, "Hi":2713.00, "Lo":2712.75, "Op":0.00}
{"TickID":32552985, "Tm":"2019-02-07T08:07:02.999999-05:00", "Cl":2713.00, "Sz":1, "Hi":2713.00, "Lo":2712.75, "Op":0.00}

... so Cl = 2713.00 for 8:07

{"TickID":32553116, "Tm":"2019-02-07T08:07:52.015-05:00", "Cl":2713.25, "Sz":1, "Hi":2713.50, "Lo":2713.25, "Op":0.00}
{"TickID":32553117, "Tm":"2019-02-07T08:08:03-05:00", "Cl":2713.25, "Sz":1, "Hi":2713.50, "Lo":2713.25, "Op":0.00}

... so Cl = 2713.25 for 8:08

so I expected:
tm sym unix_epoc my_close_of_1min_bar
2019-02-07T08:04:00-05:00 F.US.EPH19 1549544640 2713.25
2019-02-07T08:05:00-05:00 F.US.EPH19 1549544700 2713.00
2019-02-07T08:06:00-05:00 F.US.EPH19 1549544760 2712.75
2019-02-07T08:07:00-05:00 F.US.EPH19 1549544820 2713.00
2019-02-07T08:08:00-05:00 F.US.EPH19 1549544880 2713.25
2019-02-07T08:09:00-05:00 F.US.EPH19 1549544940 2712.50

the sequence of Closes I see plotted on SC:

nyc_tm SC_1min_ohlc_bar_plot_close
8:03 2713.25
8:04 2713.00
8:05 2712.75
8:06 2713.00
8:07 2713.25
8:08 2712.50

screenshot of what I am seeing:
http://www.sierrachart.com/image.php?Image=1549827038980.png
[2019-02-10 22:03:20]
User907968 - Posts: 802
Maybe someone else can has a better answer, but using your example -
08:04 1-min OHLC bar = trade activity taking place during the 60 seconds from 08:04:00-08:04:59.9999999
i.e. the closing price is the last traded price after 08:04:00 and before 08:05:00 - or the closing price of the 1-min time period beginning at 08:04:00.
[2019-02-10 22:54:12]
Sawtooth - Posts: 3976
Is there a setting somewhere in SC (to shift the bars over by one) so that the
closing plotted for the 8:04 bar represents the closing
in force at 8:04am? This caught me up because with the defaults
I have "certain knowledge of the future"(!).
The SC 8:04 open-timestamped bar has the same OHLCVTAVBV data as a 8:05 close-timestamped bar.
It's just a matter of the timestamp's time.
There is no "certain knowledge of the future".

To create close-timestamped bars, (to shift the bars over by one) you can do this:
- Add the Spreadsheet Formula (Bar) study.
- Use these formulas:
Open: =O[-1]
High: =H[-1]
Low: =L[-1]
Close =C[-1]
- Check 'Display As Main Price Graph'

Or you can use the attached Study Collection.
attachmentClose-timestamped bars+.StdyCollct - Attached On 2019-02-10 22:50:00 UTC - Size: 9.45 KB - 252 views

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account