Download MetaTrader 5
To add comments, please log in or register
Searching on MQL5.community is performed in all sections. Try it!
John Taylor
25
John Taylor 2016.06.16 03:11 
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:
Alain Verleyen
Moderator
28605
Alain Verleyen 2016.06.16 06:20  

Change line 49 :

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

to

   for(int i=0;i<1;i++) {
Fernando Carreiro
1479
Fernando Carreiro 2016.06.16 09:02  

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!

/
To add comments, please log in or register