My indicator code looks like this:
Code: Select all
protected override void CalcBar(){
// indicator logic
if (<my conditions are met>)
{
ChartPoint top = new ChartPoint(Bars.TimeValue, Bars.HighValue);
if (top != null)
{
ITextObject txtObj = DrwText.Create(top, "PT");
txtObj.VStyle = ETextStyleV.Above;
}
}
Strangely, this works when I first load VisualStudio then run the solution which then starts Multicharts. But I get an exception when I load Multicharts first.
Any ideas?