- ago
Hi, I just downloaded some COT data (from iqfeed) and would like to show it now together with the approriate Futures in a chart.

But when I do this, I get an error message
CODE:
public class MyStrategy : UserStrategyBase {     string _cot_com = "CF_C_CN"; BarHistory cot_com_bar;     TimeSeries cot_com; public override void Initialize(BarHistory bars) {               cot_com_bar = GetHistory(bars, _cot_com);              cot_com = cot_com_bar.Close;


QUOTE:
Initialize Exception (&ZC_CCB) Line 34 - Object reference not set to an instance of an object.
at WealthScript1.MyStrategy.Initialize(BarHistory bars) in :line 34
at WealthLab.Backtest.UserStrategyExecutor.ForgotPolicy(List`1 symbols)


The data manager says the scale of the COT-data is daily (which is obviously not true, but I am not able to change that). Furthermore, I get the error even when I use itself (the ticker CF_C_CN, which is Commercials Corn Futures Net) instead of the Corn Futures chart...?

Any ideas?

Thank you
0
532
Solved
7 Replies

Reply

Bookmark

Sort
- ago
#1
There's nothing wrong with your WL code. But when I try to pull up a BarHistory for CF_C_CN I get the error below on the Chart. Are you getting the same error?


It sounds to me you need an additional subscription on your DTN account before IQFeed will return a BarHistory for this instrument. I would call DTN for pricing and what additional subscriptions you require, or whether you're using the wrong ticker symbol for this instrument. You can use your DTN accounts login page to authorize/manage the additional subscriptions.

This is either a DTN data subscription issue or ticker symbol spelling issue, not a WealthLab issue. When it's set right, a Chart should be able to pull up the instrument of interest successfully.
0
- ago
#2
@superticker
QUOTE:
This is either a DTN data subscription issue or ticker symbol spelling issue, not a WealthLab issue.

btw, this is not a ticker symbol spelling issue because CF_C_CN appears to be a valid symbol for FUTURE CORN CBOT COMMERCIAL NET at https://ws1.dtn.com/IQ/Search/

@Musashi1970
QUOTE:
The data manager says the scale of the COT-data is daily (which is obviously not true, but I am not able to change that).

If you're requesting the data on Daily scale then obviously the COT data is daily. Despite it's weekly by nature. But it's not important in this context. Like superticker suggested, try plotting your data first to see if WL is able to request it.
0
- ago
#3
@superticker and @eugene

thx for your feedbacks.

and sorry that I did not make myself clear enough. I subscribed to the service and I receive the data:



But when I do want to show it as an additional timeseries in another chart of the belonging futures, the above error comes.
0
- ago
#4
Is IQFeed checked in the Data Manager > Historical Providers? Apparently not.
0
Best Answer
Cone8
 ( 6.24% )
- ago
#5
Seems unlikely that an IQFeed customer wouldn't have that checked.

Could it be that the data isn't available for the range requested?

What exactly is at line 34 in your Strategy and a few lines before that?
0
- ago
#6
Yes, I had also noticed that your error message does not match the code in the title post:
QUOTE:
Initialize Exception (&ZC_CCB) Line 34 - Object reference not set to an instance of an object.

There must be more lines given the standard template.

@Cone
QUOTE:
Could it be that the data isn't available for the range requested?

Apparently the data goes back to 1986.
0
- ago
#7
@Eugene @Cone

Thank you both for the quick tries to solve this.

As a matter of act, IQFeed was not checked in the Data Manager/Historical Providers. Checking it seemed to solve the problem.

I was not aware of that need (can't even remember that I did that with Norgate). I have to read about that in the manual.

Thx again
0

Reply

Bookmark

Sort