As a demonstration, a single line of code can be added to OnBarUpdate():
protected override void OnBarUpdate()
{
// demonstrate drawing a trend line
if (CurrentBar >= 10) Draw.Line(this, "Test", 10, Close[10], 0, Close[0], Brushes.Blue);
}
This will keep a trend line from the close ten bars ago to the current bar close and works fine when run from the source code on a test NT8 installation.
However, if you export this indicator as a compiled assembly (or a protected assembly) and then install that assembly onto the same or any other NT8 installation, the trend line does not appear.
This is true for compiled assemblies as well as for protected assemblies.
Plots do not seem to be affected, nor are calculations - the indicator never gives an exception or any log message and all of the calculated values are correct - the only difference is that drawing objects, including trend lines, rays, horizontal and vertical lines, and regions, simply do not appear on the chart in the compiled (or protected) version as they do in the source version. A copy of the demonstration indicator is attached.
Thank you for your attention to this! Without a platform fix it means other display methods and not drawing objects must be used for any compiled work.
Comment