Download MetaTrader 5

Some indicators don't work with Build 315

To add comments, please log in or register
Having a great idea? Share it on the traders' Forum!
Micky
58
Micky 2010.08.27 05:38 

If you compile a indicator and if the compiler print out a warning like this:

"No indicator plot defined for indicator"

this indicator doesn't work with Build 315.
The indicator is listed in Indicators List, but OnInit() function isn't called.

Is this a new specification?

I made a simple test indicator

//+------------------------------------------------------------------+
//|                                                   testNoPlot.mq5 |
//+------------------------------------------------------------------+
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   Print("OnInit() is called.");
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime& time[],
                const double& open[],
                const double& high[],
                const double& low[],
                const double& close[],
                const long& tick_volume[],
                const long& volume[],
                const int& spread[])
  {
//---
   Print("OnCalculate() is called.");
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
No message is printed on Build 315...
Vladimir Batrudinov
4926
Vladimir Batrudinov 2010.08.27 08:44  
Micky:

If you compile a indicator and if the compiler print out a warning like this:

"No indicator plot defined for indicator"

this indicator doesn't work with Build 315.
The indicator is listed in Indicators List, but OnInit() function isn't called.

Is this a new specification?

I made a simple test indicator. 

No message is printed on Build 315...

This warning will be displayed in the absence of information for display on of the chart.

In the example need add array or several arrays (on perforce) to store information and calculate their values.

You should also define additional parameters of the new indicator.


Example

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_plots   1
#property indicator_type1   DRAW_ARROW
#property indicator_color1  Red 
#property indicator_label1  "Comment"


Franco
374
Franco 2010.08.27 09:31  
Interesting:

This warning will be displayed in the absence of information for display on of the chart.

In the example need add array or several arrays (on perforce) to store information and calculate their values.

You should also define additional parameters of the new indicator.


Example


Thanks, I struggled for an hour to figure out what is wrong with my indi that worked before the new update, if I had not read this I would have gone out of my mind.  Thanks!
Vladimir Batrudinov
4926
Vladimir Batrudinov 2010.08.27 10:39  
Saidar:
Thanks, I struggled for an hour to figure out what is wrong with my indi that worked before the new update, if I had not read this I would have gone out of my mind.  Thanks!
The developers know about this error and pledged to fix it in the new version of the terminal.
Ilyas
1206
Ilyas 2010.08.27 10:41  

Unfortunately, in this build due to extra checks do not work indicators, which do not have buffers.
This behavior will be fixed in the next build. To use this indicators in this build you should specify the presence of buffer by command

# property indicator_buffers 1

Micky
58
Micky 2010.08.27 10:59  

Thank you for your replies.

I'll be waiting for the next build. 

Vladimir Batrudinov
4926
Vladimir Batrudinov 2010.08.27 14:58  
mql5:

Unfortunately, in this build due to extra checks do not work indicators, which do not have buffers.
This behavior will be fixed in the next build. To use this indicators in this build you should specify the presence of buffer by command

# property indicator_buffers 1

Example for build 315

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_plots   1
To add comments, please log in or register