I fixed the issue by initializing the "indicatorInfo" variable in the variable declaration itself.
This is an excerpt of my original code:
public class myCustomIndicator implements IIndicator {
// other variables...
public IndicatorInfo indicatorInfo;
public void onStart(IIndicatorContext context) {
indicatorInfo = new IndicatorInfo("MYCUST", "myCustomIndicator", "myIndicators", true, false, true, NUMBER_INPUTS, NUMBER_OPTIONAL_INPUTS, NUMBER_OUTPUTS);
// other code...
}
public IndicatorInfo getIndicatorInfo() {
return indicatorInfo;
}
// other IIndicator methods
}
And this is the fixed code I'm using now:
public class myCustomIndicator implements IIndicator {
// other variables...
public IndicatorInfo indicatorInfo = new IndicatorInfo("MYCUST", "myCustomIndicator", "myIndicators", true, false, true, NUMBER_INPUTS, NUMBER_OPTIONAL_INPUTS, NUMBER_OUTPUTS);
public void onStart(IIndicatorContext context) {
//indicatorInfo not initialized dnaymore here...
// other code...
}
public IndicatorInfo getIndicatorInfo() {
return indicatorInfo;
}
// other IIndicator methods
}The problem was not so difficult after all!
Regards,
Paolo