The indicator that I tried to move had
- no custom plot
- had draw objects plotted on the chart (Draw.Text)
- had active paint bars (uses BarBrushes[] in the code)
- had the plot colored according to the trend (uses PlotBrushes[] in the code)
(1) When paint bars were activated, the transferred indicator would not show any paint bars. After deactivating paint bars via the indicator dialogue box and then reactivating them, the paint bars would show. It seems that the paint bars were not linked to the new bars object after the transfer.
(2) Whether paint bars were activated or not (actually I have removed the paint bars entirely from the code for evaluating this error) the use of PlotBrushes[] lead to the following error message:
2016-11-14 19:00:07:368 ERROR: Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: Die Ressource wurde auf dem falschen Renderziel erkannt. '
(3) I have also tried to move indicators with complex custom plots from one chart to another. Those indicators were well behaved.
(4) The transfer of Draw.Text objects also worked as expected.
In my opinion all problems are related to
-> BarBrushes
-> PlotBrushes
which are not being properly redirected to the new chart.
Comment