Hello,
I got 3 errors by programming an indikator, but I couldnīt find the mistakes.
I hope a more experience trader can help me. Here is the code:
//+------------------------------------------------------------------+
#property copyright ""
#property link ""
#property indicator_chart_window
#property indicator_buffers1
#property indicator_color1 Red
#property indicator_width1 3
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
double ExtMapBuffer1[];
double R[];
//+------------------------------------------------------------------+
int init(){
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,135);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(0,DRAW_ARROW);
SetIndexEmptyValue(0,0.0);
return(0);
}
//+------------------------------------------------------------------+
int start(){
int i,j,pos;
for(i=Bars-IndicatorCounted()-1;i>=0;i--){
double Range = ((iHighest(NULL,0,MODE_HIGH,i+10,i))-(iLowest(NULL,0,MODE_LOW,i+10,i)))
R[i]=Range ;
for(j=1;j<=20;j++){
if (R[i] > R[i+j] )
break;
if (j==20)
{ExtMapBuffer1[i] = High[i] + (High[i] - Low[i])/2;}
}
}
return(0);
}
And here are the errors:
'R' - an operator expected (87, 2)
'=' - assignment expected (85, 14)
'R' - semicolon expected (87, 2)
I got 3 errors by programming an indikator, but I couldnīt find the mistakes.
I hope a more experience trader can help me. Here is the code:
//+------------------------------------------------------------------+
#property copyright ""
#property link ""
#property indicator_chart_window
#property indicator_buffers1
#property indicator_color1 Red
#property indicator_width1 3
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
double ExtMapBuffer1[];
double R[];
//+------------------------------------------------------------------+
int init(){
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,135);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(0,DRAW_ARROW);
SetIndexEmptyValue(0,0.0);
return(0);
}
//+------------------------------------------------------------------+
int start(){
int i,j,pos;
for(i=Bars-IndicatorCounted()-1;i>=0;i--){
double Range = ((iHighest(NULL,0,MODE_HIGH,i+10,i))-(iLowest(NULL,0,MODE_LOW,i+10,i)))
R[i]=Range ;
for(j=1;j<=20;j++){
if (R[i] > R[i+j] )
break;
if (j==20)
{ExtMapBuffer1[i] = High[i] + (High[i] - Low[i])/2;}
}
}
return(0);
}
And here are the errors:
'R' - an operator expected (87, 2)
'=' - assignment expected (85, 14)
'R' - semicolon expected (87, 2)