Hi,
I'm using IChartObjectFactory to draw rectangles on the chart.
In "visual mode" everything is fine, but if I backtest in normal mode or through
the optimizer, I have a java.lang.NullPointerException.
I presume I have the same issue by running in Remote mode because my
strategy doesn't take any trade (because of the exception I think, but
I can't check this since we can't access the log yet).
I use the following code :
myChartObject = chart.getChartObjectFactory().createRectangle();
myChartObject.setTime(0, creationTime);
myChartObject.setTime(1, __time2);
myChartObject.setPrice(0, __price1);
myChartObject.setPrice(1, __price2);
myChartObject.setAttrColor(IChartObject.ATTR_COLOR.COLOR, __color);
chart.addToMainChart(myChartObject);
Did I do something wrong ? I have this issue since a long time so I use
a boolean to disable chart drawing when I'm not running in visual mode.
But this is just a manual "Turn around"...
Thanks