- 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
315
22 Replies

Reply

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
 ( 43.04% )
- 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
 ( 43.04% )
- 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
 ( 43.04% )
- ago
#14
Not yet!
0
Cone8
 ( 43.04% )
- 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
 ( 43.04% )
- 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
 ( 43.04% )
- 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
 ( 43.04% )
- 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
 ( 43.04% )
- 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

Reply

Bookmark

Sort