Not sure if this is a bug or I'm just doing something wrong.
When applied to chart the indicator generates message: SEHException (0x80004005): External component has thrown an exception.
Please see the attached image to see the full exception message.
I use MC.NET Starter Edition x64. The symbol I'm trying to download the data for is one of two symbols I have in the Quote Manager.
The code which generates the exception is as follows:
Code: Select all
using System.Collections.Generic;
namespace PowerLanguage.Indicator{
public class Test6_DataLoader : IndicatorObject {
public Test6_DataLoader(object _ctx):base(_ctx){}
private List<Bar> m_StockP = new List<Bar>();
protected override void Create() {}
protected override void StartCalc()
{
var dataReq = new DataRequest {RequestType = DataRequestType.BarsBack, Count = Bars.FullSymbolData.Count};
var req = Bars.Request;
req.Range = dataReq;
req.Symbol = "P";
DataLoader.BeginLoadData(req, OnData, null); //EXCEPTION ON THIS LINE
}
protected override void CalcBar() {}
private void OnData(IDataLoaderResult Result) {}
}
}