mt4 , how to change
//+------------------------------------------------------------------+
//| MrBean.mq4 |
//| Copyright ?2004, Fourway Software Corp. |
//| http://www.fourway.com |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2004, Fourway Software Corp."
#property link "http://www.fourway.com"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DarkSalmon
#property indicator_color2 CornflowerBlue
//---- input parameters
extern int ExtParam1=5;
extern int ExtParam2=13;
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexDrawBegin(1,ExtParam1);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexDrawBegin(1,ExtParam2);
SetIndexBuffer(1,ExtMapBuffer2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//----
for(int i=0; i