Indicator no longer working in Build 971 due to large indicator_minimum and indicator_maximum values

 
Indicator SettingsBuild 971Prior to build 971Hi All,

I have an indicator which worked perfectly up until build 971. It draws a series of trend line objects on the indicator window to represent altered candles. After build 971, it seems that the indicator minimum and maximum are at huge values, though they are not set anywhere in the source code. If I put a small range around the current drawn objects, setting the indicator min and max ranges appropriately (screenshot) they display as expected. It just seems that the min/max of the indicator window has been forced to be these huge values. Any idea on a fix? I am attaching a minimal code version, which displays the current chart in an indicator window, thereby eliminating as far as possible any calculation issues. Note that the min/max values displayed should be the min/max of the series high/low. I also attach screenshots showing the issue.

Best Regards,

John
Files:
 

Change line 49 :

   for(int i=0;i<3;i++) {

to

   for(int i=0;i<1;i++) {
 

That is because the Indicator practices "bad" coding. Here is a version with several "hot fixes" for several points, including your problem too.

Please note that it does not really fix the underlying bad design. I just made "quick" fixes. I am not liable if it still does not work correctly in respect to other problems! Use at your own risk!

Reason: