Support Board
Date/Time: Mon, 25 Nov 2024 02:37:01 +0000
Post From: sc.GetOHLCForDate() Peeks into Future
[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 |