BiBi8
- ago
I don't have problems with daily dataset, but if I use 1 min dataset, it is incorrectly provided:


Use provider data IB
0
747
Solved
29 Replies

Reply

Bookmark

Sort
Cone8
 ( 6.17% )
- ago
#1
Your computer's time does not match the time zone for your machine. That's causing incorrect timestamps when translated to the market's time. (You're looking at premarket data.)

You need to:
1. Synchronize your machine's clock for its time zone.
2. Data Manager > Historical Providers > right click IB > Delete Local Files

If you've only requested a few intraday charts like this, then you can just right click the chart and Reload Chart Data from Provider.
0
BiBi8
- ago
#2
It didn't help me. What should I do for synchronize machine's clock? Maybe I'm doing something wrong for it

0
Cone8
 ( 6.17% )
- ago
#3
What's your time zone specified in Windows?
The time must be correct for the time zone specified on your machine.

Search google to:
1. Set the Time Zone on Windows 11 (or 10)
2. Sync to internet time.

0
BiBi8
- ago
#4
I setted time zone automatically(My location is Armenia) and sync to internet time there. I tried restart computer and application. It didn't work
0
Cone8
 ( 6.17% )
- ago
#6
I think I know why... it's here.
Close TWS, restart, and configure this before logging in.



I'll have to make this a part of the IB TWS setup procedure.
0
BiBi8
- ago
#7
I changed setting in the tws and it didnt help me but I noticed an error in the logs:
"8/16/2023 10:36:48:821" "InteractiveBrokers" "162: Historical market data service error message: No data found for HMDS: AMZN@SMART Trades"
0
Cone8
 ( 6.17% )
- ago
#8
If you needed to change the setting, then it definitely helped.

Now you need to eliminate data that you previously collected by Data Manager > Historical Providers > right click Interactive Brokers > Delete Local Files

Re: AMZN
That error message is from IB. I can't tell you why in that moment an IB server decided to generate that error for your account.

Whenever you've requested data for a contract and it fails for any provider, you won't be able to request it again from that provider for that WL session unless you> Data Manager > Historical Providers > right click Interactive Brokers > Clear Internal Request Tracking Info. Another request may fail again, but at least WealthLab will make the request.

Reviewing because these options do 2 completely different things -

1. Delete Local Files - wipes out all the cached history from the provider.
Only do this for IB when you really need to refresh the data, like when you have bad timestamps.

2. Clear Internal Request Tracking Info - you can do this all day and everyday without any problem.
It just helps to speed things up by skipping over providers that didn't previously return data for a symbol/scale.
0
BiBi8
- ago
#9
I was attentive and always "delete local files" before uploading dataset. I did all that you sed. The problem is not solved.

I think if we had more logs, we would understand the problem. What request is sent to the TWS. Whats timezone in TWS and application?

Can you simulate my case? Turn on vpn for Armenia, set timezone everywhere for this country and check uploading dataset 1 min. Maybe there are other ways to find the problem
0
Cone8
 ( 6.17% )
- ago
#10
If the TWS API had a call to get the TWS time zone, we'd definitely use it. Instead, we have to do workarounds.

When you connect WealthLab to IB, what message do you get here?
If you're already connected, just open the Log Viewer (Ctrl+L) -



0
BiBi8
- ago
#11
"8/16/2023 10:35:45:277" "InteractiveBrokers" "0.3 seconds difference: Local - TWS time"
0
Cone8
 ( 6.17% )
- ago
#12
That indicates that all clocks are synchronized.
There should certainly no longer be a problem.

If there's still a problem, there's another unknown. Are you running TWS version 10.23 or higher?

Edit -
Hold on here! Your timestamp "8/16/2023 10:35:45:277" in that message telling me that your local clock is in a GMT - 4 time zone (or -3? DST confuses this) . Does that mean you changed your Windows time zone to GMT - 4 too?

I'm probably jumping the gun.. it just shows that's your local time when you connected, which could have be 6 or 8 hours ago.
0
- ago
#13
Same I did the steps but I have a lot of error.
Maybe put the american clock on TWS and computer?






0
Cone8
 ( 6.17% )
- ago
#14
The data, which should be displayed in the market's time zone (ET), is advanced by 7 hours. Let's see if we can figure out where the time zone error is. Please run this script on any one symbol and post the Debug log.

CODE:
using WealthLab.Backtest; using System; using WealthLab.Core; using WealthLab.Data; namespace WealthScript5 { public class MyStrategy : UserStrategyBase { public override void Initialize(BarHistory bars) {          WriteToDebugLog(DateTime.UtcNow);          WriteToDebugLog(DateTime.Now);          TimeZoneInfo tzi = TimeZoneInfo.Local;          WriteToDebugLog($"{tzi.DisplayName}\nBaseUtcOffset: {tzi.BaseUtcOffset}\n{tzi.DaylightName}\n{tzi.IsDaylightSavingTime(DateTime.Now)}");       } public override void Execute(BarHistory bars, int idx) { } } }
0
- ago
#15
here is the debug

0
- ago
#16
FYI, I am located in the French DOM TOM and I automatically synchronized which gave me Nairobi

0
Cone8
 ( 6.17% )
- ago
#17
Okay, I changed my settings to Nairobi and it worked fine.
I don't know what the problem could possibly be with your setup, but I want you to do what I just did.

Follow this procedure precisely.

1. Close WL8
2. Go to C:\Users\yourWindowsName\AppData\Roaming
3. RENAME the WealthLab8 folder. This contains all of your data, scripts, settings, etc.
Example - rename it to WealthLab890

WealthLab will create a new WealthLab8 user folder now with default settings.
4. Start WealthLab
5. Data Manager >Historical Providers > add a check to Interactive Brokers
6. Open a Chart for a U.S. symbol and change it to 30 minute bars.

How does it look now?
0
- ago
#18
I don't know if it's better but errors appear.
The worst is the kind of gap that directly distorts all backtests.
Also, when I click on "run backtest" several times without changing conditions the results are different.
Maybe the IB data on intradays is not really good?



0
- ago
#19
Before I use Alpaca for us stocks but I deleted it.
0
Cone8
 ( 6.17% )
- ago
#20
1. You're looking at Pre/Post market data.
Select the Pre/Post filter at the bottom of the chart to only look at market hours.
For a Strategy, select the Pre/Post filter in the Strategy Settings.

2. You didn't show the timestamps on the WealthLab chart. I can't tell if anything changed and you didn't even say so. Pfff!

3. Re: Backtest changing
It's a common "rookie discovery".
FAQ > Basic usage > Every time I run a Strategy I get a different result. Why?

If the timestamps are correct, you'll have to adjust all your default settings, passwords, etc. again, and copy over you Strategy and DataSet folders and anything else you need from "WealthLab890" to the new WealthLab8 folder. Close WealthLab first before you change/move data.
0
- ago
#21
here is the debug.
That hasn't changed.
And the filter pre/post market data I feel like there is also a problem.


0
Cone8
 ( 6.17% )
- ago
#22
Until this moment, I didn't even realize that I was working with someone other than BiBi, who started this topic.

@BiBi - do you still have a problem?

@Ramsa976 - Please don't post any more chart images without the timestamps when that is the entire point of this conversation. Please capture all of the WealthLab Chart window - even below the chart there's more information and it doesn't cost anything extra!

Anyway, from the image sequence at least I can assume when Pre/Post Filter is checked the chart appears to be showing Pre/Post market data. And from that we can deduce that the timestamps aren't correct for whatever market is showing below the chart window.

Ramsa976, did you make sure that the TWS Time Zone is the same as the Windows Time Zone? See Post #6 above.
0
- ago
#23
I was on IB Beta so I installed to be on the latest update.
I'm still on the new wealth lab folder and my WL times zones; BI; Computer looks the same.
I don't have too much inspiration.
Can you advise me which API as an alternative for US intraday (and penny stock)?
And if I use datasets with IB and another API there is no risk of confusion?


0
Cone8
 ( 6.17% )
- ago
#24
The chart looks fine to me because there are no times displayed. You need to expand the bars to display some times are displayed. Example -



If you don't mind paying about $100/month for data, IQFeed is the way to go for intraday and streaming data.

Anyway, I can't figure out why the IB timestamps aren't translated correctly for you. It's truly a mystery. (IQFeed will certainly be correct for the U.S. market for everyone because it always sends data with EST timestamps.)
1
- ago
#25
I installed IQFeed as a free trial and I think it's not too correct.
I changed the timezone to EST.

Or IQFeed does not take into account the pre/post market? but the problem also comes that checking pre/post filter is reversed.


0
Glitch8
 ( 12.53% )
- ago
#26
No it looks correct to me, no problem. When you have it checked it is filtering out the pre/post market data.
0
BiBi8
- ago
#28
My problem is solved. Thank you very much!
1
Cone8
 ( 6.17% )
- ago
#29
Here's the answer (finally) to what I'm sure was actually the problem.

WealthLab's IB Provider expects this TWS API Settings to be "operator timezone" because it applies the time zone correction to be back to the market time zone.



If another one of the options, it breaks.

Probably you changed this unknowingly and that's what fixed it for you.
0
Best Answer

Reply

Bookmark

Sort