hab das jetzt hinbekommen, aber wie mach ich das,dass er die hoch und tiefs durch nen zick zick verbindet ?
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_color3 Black
//---- buffers
double v1[];
double v2[];
double v3[];
double val1;
double val2;
double val3;
int i;
int init()
{
IndicatorBuffers(4);
//---- drawing settings
SetIndexArrow(0, 119);
SetIndexArrow(1, 119);
SetIndexArrow(2, 119);
SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1,Green);
SetIndexDrawBegin(0,i-1);
SetIndexBuffer(0, v1);
SetIndexLabel(0,"Widerstand");
SetIndexStyle(1,DRAW_ARROW,STYLE_DASH,1,Blue);
SetIndexDrawBegin(1,i-1);
SetIndexBuffer(1, v2);
SetIndexLabel(1,"Unterstuetzung");
return(0);
}
int start(){
i=Bars;
while(i>=0){
//eine linie 5 kerzen weit zeichnen
val1 = iFractals(NULL, 0, MODE_UPPER,i);
//hoch spitzen raussuchen
if(High[i]>=High[i+1] && High[i]>=High[i-1])
if(High[i]>=High[i+2] && High[i]>=High[i-2]){
v1[i]=High[i];
v3[i]=High[i];
}
//tief spitzen raussuchen
val2 = iFractals(NULL, 0, MODE_LOWER,i);
if(Low[i]<=Low[i+1] && Low[i]<=Low[i-1])
if(Low[i]<=Low[i+2] && Low[i]<=Low[i-2]){
v2[i]=Low[i];
v3[i]=Low[i];
}
i--;
}
return(0);
}
//+------------------------------------------------------------------+
|