CODE:
Please log in to see this code.
I created DataSource from CSV files, which has OHLC and some custom fields, like current market cap "CUR_MKT_CAP". When I run the code above on some index such as (S5TELS, S&P telecome sector index)using "All Data" or some selcted "Date Range" like 9/27/2009 to today" or "Most recent 24 Months", it is fine. However, sometimes it threw out runningtime error "Object reference not set to an instance of an object" when I choose other data range, ex: "Most recent 25 Months" or "10/1/2009 to today". I can't figure out why it is not working on some selected date. I opened the files. All "CUR_MKT_CAP" data has valied value.
Also, the code is always working on SPX INDEX itself.
Any thoughts? Thx.
Size:
Color:
Since you synchronized in SetContext it shouldn't matter, but if you RestoreContext() after assigning SPXMktCap[Bars.Count-1]; does it help? Assuming that it doesn't, we'll need a support ticket with the data, please.
Size:
Color:
how to create a support ticket with data? thx.
Size:
Color:
Send the data files to zip file and attach it to the ticket using the controls at the bottom of the ticket form.
Size:
Color: