-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indicator Resolution.DAILY and timedelta(days=1) gives different values #8416
Comments
Hey! this is because resolution daily will respect daily precise end times (if enabled), while a time span will respect the given span |
Hi @Martin-Molinero, However, I think there is more going on here than that. The second picture in the initial post shows where the symbol is subscribed at a Daily resolution, and the indicators shown are Daily and timedelta. Both these charts are identical which is nice. For me, this graph represents the truth. However, with the first picture, when the symbol is set to an Hourly resolution, neither the Daily resolution or the timedelta indicator charts come close to matching the 'truth' chart. In fact it almost looks like the timedelta chart is closer to the actual truth. Here is an updated first picture that shows reporting just once a day to remove the flat parts from the initial code that reported every hour. Notice that it still doesn't look the same as the 'Truth' charts... Even the first values for the STO are wildly off.. |
The hour bars for US equity are given from 9h to 16h but the exchange opens at 9:30am. Thus, It turned out the first bar was skipped when consolidating hour bars into daily ones. For that reason the indicators' values differed when registered with Closed as fixed by #8442. |
When the symbol resolution is set to Hour, indicator values using Daily resolution are different from indicators using timedelta(days=1)
Expected Behavior
With a symbol resolution of Hour, indicators of resolution.Daily are the same as timedelta(days=1).
Actual Behavior
values are different. Spot the difference between the two graphs:
When the symbol resolution is set to the same as the indicators ie. Resolution.DAILY, the graphs produced are the same. However they are different to the daily resolution graphs above ...
Potential Solution
Reproducing the Problem
System Information
cloud
Checklist
master
branchThe text was updated successfully, but these errors were encountered: