Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 02:38:59 +0000



[User Discussion] - sc.GetOHLCForDate() Peeks into Future

View Count: 1531

[2013-12-30 16:33:41]
Bad Dog - Posts: 17
When a study using sc.GetOHLCForDate() is recalculated, the function returns the open, high, low and close for a specified session. When a study recalculates, the function will use all existing data for the session even before the session has completed. This can cause the study to peek ahead.

I discovered this when looking at JSYD's Delta Divergence v5 study which uses sc.GetOHLCForDate() to calculate the daily HH/LL. The study
displays very different results during playback/backtesting if the "Use Daily HH/LL" option is selected.

Possbly the function could be modified not to use future data.

-BD
[2013-12-30 17:29:37]
Sierra Chart Engineering - Posts: 104368
We are not understanding this. It is only going to use the data loaded in the chart.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-12-30 17:54:53]
Bad Dog - Posts: 17
If a study is recalculating and determining the daily open, high, low and close for a bar at 9:00am, the function GetOHLCForDate() will use all data available for the whole session. If the session times for the chart are set to end anytime after 9am, then the function is using future data.

-BD
[2013-12-30 17:58:15]
Sierra Chart Engineering - Posts: 104368
This make sense. This function is not meant to get data for a particular time. It is meant to get data for an entire Date as the function name implies. Refer to the documentation for it. There is nothing wrong with the function. It works properly.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account