- ago
This code works fine:

CODE:
indicator = new ScaledInd(bars,new StochK(bars,6),HistoryScale.Daily);


And this one causes a startup error at last line:

CODE:
externalSymbol = GetHistory(bars, "RI.RVI_1MIN_150505"); indicator = new ScaledInd(externalSymbol,new StochK(externalSymbol,6),HistoryScale.Daily);


0
1,351
Solved
51 Replies

Closed

Bookmark

Sort
- ago
#1
I can reproduce this...
EDIT: ...if the data provider is unchecked on Data Manager's Historical Providers tab. Is this the case?
0
- ago
#2
Try this as a workaround:
CODE:
var externalSymbol = GetHistory(bars, "RI.RVI_1MIN_150505", "your ASCII DataSet name");
0
- ago
#3
The corresponding Data Provider is checked. I also tried to specify the appropriate parameter in the function. And it didn't work. I see the same error.
0
- ago
#4
Hello!

I would like to know the status of this issue.
0
- ago
#5
I was unable to reproduce.
0
- ago
#6
I am still getting this error. Please tell me what can I do to fix it? Perhaps I can help you reproduce it.
0
- ago
#7
Ironically, what you might want to try at the moment is the opposite of what's been suggested in this topic i.e. ScaleInd: make a call to BarHistoryCompressor.
0
- ago
#8
Eugene, hi!

Did according to your advice. I still get an error on the second line.

CODE:
externalSymbol = GetHistory(bars, "RI.RVI_1MIN_150505");          BarHistory CompressedBars = BarHistoryCompressor.ToDaily(externalSymbol);


0
Cone8
 ( 6.71% )
- ago
#9
What's the debug output for this?

CODE:
public override void Initialize(BarHistory bars)       {          WriteToDebugLog(String.Format("{0}, Scale: {1}, Count {2}, Start {3:o}, End {4:o}",             bars.Symbol, bars.Scale, bars.Count, bars.DateTimes[0], bars.DateTimes[bars.Count - 1]));                    BarHistory ext = GetHistory(bars, "RI.RVI_1MIN_150505");          if (ext != null)          {             WriteToDebugLog(String.Format("{0}, Scale: {1}, Count {2}, Start {3:o}, End {4:o}",                ext.Symbol, ext.Scale, ext.Count, ext.DateTimes[0], ext.DateTimes[ext.Count - 1]));          }          else             WriteToDebugLog("ext is null");           }
0
- ago
#10
Cone, hello!

Here is what the terminal outputs:

SPFB.RTS_YFL_20200508, Scale: 60 Minute, Count 8799, Start 2020-06-01T11:00:00.0000000, End 2022-12-30T23:00:00.0000000
RI.RVI_1Min_150505, Scale: 60 Minute, Count 8799, Start 2020-06-01T11:00:00.0000000, End 2022-12-30T23:00:00.0000000

0
Cone8
 ( 6.71% )
- ago
#11
I think we're a step closer... it looks like you're accessing ASCII data whose base scale is 1-minute bars, and the Strategy Settings are scaled to 60-minute bars. Is that accurate?

Nonetheless, I still can't duplicate the issue with my DataSets.
0
- ago
#12
Cone, hello!

I send you files with quotes:

https://drive.google.com/file/d/1lMtPgX_2K6pr1tp87f3nfayOtb-KiHsm/view?usp=sharing

https://drive.google.com/file/d/1ARtSDIj9JbkTqEMiG4NnqVj10KrIljUJ/view?usp=sharing

The base symbol scale is 5 minutes (SPFB.RTS_YFL_20200508.txt).

The base scale of the additional symbol is 1 minute (RI.RVI_1Min_150505.txt).
0
- ago
#13
Cone, hello!

Is there any progress on the issue?
0
Cone8
 ( 6.71% )
- ago
#14
Not yet!
0
Cone8
 ( 6.71% )
- ago
#15
For me, it still works fine with, even with your data. Here's my output for that same test. With the Pre/Post Filter disabled, there are 9411 bars.

CODE:
SPFB.RTS_YFL_20200508, Scale: 60 Minute, Count 9411, Start 2020-06-01T11:00:00.0000000, End 2022-12-30T23:00:00.0000000 RI.RVI_1Min_150505, Scale: 60 Minute, Count 9411, Start 2020-06-01T11:00:00.0000000, End 2022-12-30T23:00:00.0000000
I don't know why our tests with the same data and range produced a bars.Count that differs by more than 600 bars.

Let me ask, you didn't put the 5-minute ASCII data in the same folder as the 1-minute data, did you?
0
- ago
#16
Cone, hello!

Made a video just in case. Perhaps it will show missing details.

https://drive.google.com/file/d/1gW6E9pbzBohExFezUDiGXT5fNNYP7m1_/view?usp=sharing
0
Cone8
 ( 6.71% )
- ago
#17
Thanks, but you're missing the status bar for the Strategy Window.

Maybe it has something to do with the Market assigned. Add this to the top of the script -
CODE:
WriteToDebugLog(externalSymbol.Market.Name);
For me, since I didn't assign a market, it's defaulting to US Stocks, and with the Pre/Post filter, the result is 9411 bars -

CODE:
US Stocks SPFB.RTS_YFL_20200508, Scale: 60 Minute, Count 9411, Start 2020-06-01T11:00:00.0000000, End 2022-12-30T23:00:00.0000000 RI.RVI_1Min_150505, Scale: 60 Minute, Count 9411, Start 2020-06-01T11:00:00.0000000, End 2022-12-30T23:00:00.0000000
0
- ago
#18
Cone, hello!

Sending character settings:





Also for the experiment I set Security Type-Stock, market-US Stocks, currency-USD. I get the same error and the same number of candles.
0
Cone8
 ( 6.71% )
- ago
#19
No change for me with those SymbolInfo. When you said you get the "same number of candles" - do you mean the same as your previous result or the same as mine?

If the result is not 9411 bars, we need to find out why that's different. In that case, please right click your 60 min chart, paste the data into a text document (not excel) and please give me a download link.
0
- ago
#20
Hello Cone!

QUOTE:
1. "No change for me with those SymbolInfo. When you said you get the "same number of candles" - do you mean the same as your previous result or the same as mine?"


The same one I had before.

2. I am sending you the data uploaded in the way you described:

https://drive.google.com/file/d/1UBMVffcTShLuwD_G0Aelk3hsPDul4Xi7/view?usp=sharing
0
Cone8
 ( 6.71% )
- ago
#21
Oddly, I think I see a data compression error in my data, that which "works", but not yours, the one throwing an error.

Looking at this now.
0
Cone8
 ( 6.71% )
- ago
#22
We've got the compression fixed for this "hourly-compression-with-a-market-close-near-midnight" scenario. Let's see if it all works correctly for you too when Build 36 is ready, (probably later this week).
1
Cone8
 ( 6.71% )
- ago
#23
Build 36 is ready to download.
0
- ago
#24
Cone, hello!

Today I updated to build 37.

The problem remains. The text of the error is the same.
0
Cone8
 ( 6.71% )
- ago
#25
I'm certain at least one problem was resolved and I don't know which error you're referring to now.

Sorry, but let's take it from the beginning. What's the problem exactly? If have the ASCII data, so give me a screen shot of the Strategy Settings and a script to run.
0
- ago
#26
Cone,

Here is the link to the video:

https://drive.google.com/file/d/1LRv9JpBv7KRjP9dpFPBU0e0A469yi6lk/view?usp=sharing
0
Cone8
 ( 6.71% )
- ago
#27
You're using a different data file than the one I previously retrieved, which was SPFB.RTS_YFL_20200508

Please send me a link to the one you're using.

Also, check the scaled-to-60-min chart data DateTimes and make sure the last bar of the day closes at 23:50 and the first bar has a 11:00 timestamp.
0
- ago
#28
Cone,

Here is a link to a video with previous quotes:

https://drive.google.com/file/d/1FbDzxzJQuAHUOGYRKgjUuekc_SiHC4uI/view?usp=sharing

I also send new quotes at the link:

https://drive.google.com/file/d/1qei-8Ty4mAeKE7UD-mFgKsdqI56rxMw3/view?usp=sharing
0
Cone8
 ( 6.71% )
- ago
#29
Take a look at my test and let me know if you see something that I'm doing differently...

https://drive.google.com/file/d/1v8krFIp9IGaKF5YIMu8dwDFgrGrqsgLT/view?usp=sharing

And what does the chart data look like? Is the chart symbol plotted correctly for you?
0
- ago
#30
Cone, hello!

I watched your video and did not see any differences in the settings. I don't even know what to do next. I suggest using TeamViewer and then you can see how it works on my computer.
0
- ago
#31
Cone, hello!

Tested after update 38, the problem still remained.
0
Cone8
 ( 6.71% )
- ago
#32
Sure, it remains for you (only) because it's hard, sometimes impossible, to fix an issue we can't see. It won't help for me to see this on your computer (I believe you that it happens there) because it needs to happen in a dev environment to determine *why* it occurs there.
0
Cone8
 ( 6.71% )
- ago
#33
We're going to give it a try on a different machine with Russian settings. It's difficult to imagine why that would cause it, but stranger things have happened!
0
- ago
#34
Cone, hello!

Please let me know if there are any updates on the topic?

I still get this error.
0
Cone8
 ( 6.71% )
- ago
#35
I'm not actively working this because I can't duplicate the problem. Eugene tried too. It works correctly on all of our computers.

On a separate, unrelated ScaleInd note...
We just corrected a caching problem for ScaleInd for Build 40. RIght now, if you use ScaleInd more than once on the same indicator with different parameters, like ScaledInd(SMA.Series(bars.Close, 20)) and ScaledInd(SMA.Series(bars.Close, 30)), it will always return the first indicator's series.
0
- ago
#36
Cone, hello!

I can't move forward without fixing this error. Is there nothing I can do to fix it?
0
Cone8
 ( 6.71% )
- ago
#37
I was going to suggest trying without using ScaleInd, i.e., with TimeSeriesCompressor/Synchronizer. Eugene suggested this long ago, and you said you still got the error with these 2 lines of code:

CODE:
externalSymbol = GetHistory(bars, "RI.RVI_1MIN_150505"); BarHistory CompressedBars = BarHistoryCompressor.ToDaily(externalSymbol);
The problem is that the exception indicated that the error is line line 65.

Try just those 2 lines of code again and nothing else.

Here's the whole script to try. Let's get a baseline with this and then we can move on to the synchronizer.

CODE:
using WealthLab.Backtest; using System; using WealthLab.Core; using WealthLab.Data; using WealthLab.Indicators; using System.Collections.Generic; namespace WealthScript13 { public class MyStrategy : UserStrategyBase { public override void Initialize(BarHistory bars) {          externalSymbol = GetHistory(bars, "RI.RVI_1MIN_150505");          BarHistory CompressedBars = BarHistoryCompressor.ToDaily(externalSymbol); } public override void Execute(BarHistory bars, int idx) { }       BarHistory externalSymbol; } }
Did it run without error?
0
- ago
#38
Cone, hello!

Run the example you sent. The result is in the screenshot below:



Now I need to run the following code:



It throws the same error.
0
Cone8
 ( 6.71% )
- ago
#39
After the ToDaily and ToMinute calls, the stack is showing LogoutIssuer() and ResetIssuer(). These are not methods in WealthLab and must be somewhere in the .NET Framework.

Since no one else is seeing these errors, I'd recommend reinstalling:
.NET Desktop Runtime 6.0.20
https://dotnet.microsoft.com/en-us/download/dotnet/6.0

... and crossing your fingers for luck.
0
- ago
#40
LogoutIssuer() and ResetIssuer() are in WealthLab. Clearly, the stack trace shows LogoutIssuer is a member of BarHistory. ResetIssuer is a member of BarHistoryCompressor.
0
Cone8
 ( 6.71% )
- ago
#41
@paul986, Did you read everything I wrote? Do you really want to argue with me about it?
0
- ago
#42
Cone stated...

QUOTE:
After the ToDaily and ToMinute calls, the stack is showing LogoutIssuer() and ResetIssuer(). These are not methods in WealthLab and must be somewhere in the .NET Framework.


I'm trying to help. In this case, I don't know why you would ask a customer if he is trying to start an argument.
0
Cone8
 ( 6.71% )
- ago
#43
I read the call stack. I even acknowledged the presence of those methods. Imagine my surprise when I couldn't find them in source code that I've worked on.
0
Cone8
 ( 6.71% )
- ago
#44
... however I'm not used to reading the obfuscated stack ... so that explains it.
0
- ago
#45
Hey Denis,

We have a feeling that the issue has to do with named series. Apparently when setting up your DataSet with the Finam export data you've defined some named series. Could you do the following:

1. Click File > "Open WL user data folder", go to DataSets, then find the XML file for the ASCII DataSet and send it to support@wealth-lab.com.

2. Create the DataSet from scratch and this time do NOT select any named series. Re-test.
0
- ago
#46
Eugene, hi!

I do not really understand what named series you are talking about. I am sending you screenshots of character settings and files.



https://drive.google.com/file/d/1lMtPgX_2K6pr1tp87f3nfayOtb-KiHsm/view?usp=sharing

https://drive.google.com/file/d/1qei-8Ty4mAeKE7UD-mFgKsdqI56rxMw3/view?usp=sharing
0
- ago
#47
Cone, hello!

I also reinstalled the .NET Desktop Runtime 6.0.20 library. The result is the same.
0
- ago
#48
QUOTE:
I do not really understand what named series you are talking about.

Named series are defined through adding a "Field" when setting up an ASCII DataSet. First and foremost, it's necessary when importing a futures data that contains Open Interest that can instantly be defined as a custom Field.

But as I see on your screenshot there may be none defined unless you defined Volume as a field. You should have shared the XML file instead to avoid guesswork. Still, the error message may have something to do with a code that deals with named series so we'll keep investigating it. I think we have a clue now.

1. What is the symbol, DataSet and provider you're running the code on (to obtain an external symbol's data)? How is THIS DataSet set up?

2. What benefit do you have from these ASCII DataSets when the data you download from Finam can simply be obtained using native data provider (Finam)?
0
- ago
#49
Eugene,

I do have a Volume field. In the future, I plan to use named series.



https://drive.google.com/file/d/13gi2gUp0Xi3HI-F8JMTo_nlHiEVBkLYY/view?usp=sharing

(For this file: SPFB.RTS_1MIN_20050803)

https://drive.google.com/file/d/1BTjrdnTlS0bJSMd6kSxW1azwsjLw184T/view?usp=sharing

(For this file: RI.RVI_1MIN_150505)
0
- ago
#50
Added some protection logic against this error to B41 but the real cause is still unclear. So let's wait for B41 and see if there's an improvement.
0
Best Answer
- ago
#51
Eugene, hi!

Thanks for the edit!

Part of the problem is gone

CODE:
BarHistory CompressedBars = BarHistoryCompressor.ToDaily(externalSymbol);


This version of the code works correctly.
0

Closed

Bookmark

Sort