Hi, ich habe da ein seltsames Problem. Seit heute funktioniert der Indikator nur auf EURUSD nicht, auf allen anderen Paaren geht es. Das gleiche Problem habe ich bei anderen Indikatoren. Ist doch unlogisch irgendwie oder? Kann das mal jemand bei Alpari testen?
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Green
double low_Buffer[];
double high_Buffer[];
int init()
{
SetIndexBuffer(0,low_Buffer);
SetIndexBuffer(1,high_Buffer);
SetIndexStyle(0,DRAW_LINE,0,2);
SetIndexStyle(1,DRAW_LINE,0,2);
SetIndexLabel(0,"pw_low");
SetIndexLabel(1,"pw_high");
return(0);
}
int deinit()
{
ObjectDelete("pw_low");
ObjectDelete("pw_high");
return(0);
}
int start()
{
int i,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--;
int limit=Bars-counted_bars;
if(Period()>PERIOD_H4) return(-1);
double last_week_low,last_week_high;
for(i=limit-1; i>=0; i--)
{
// 1sts Days of Week
if(TimeDayOfWeek(Time[i])<=2 && TimeDayOfWeek(Time[i+1])>=4)
{
//we are at the first bar of the week, means nearest bar in W1 is this weeks bar
int shift= iBarShift(Symbol(),PERIOD_W1,Time[i],false);
last_week_low=iLow(Symbol(),PERIOD_W1,shift+1);
last_week_high= iHigh(Symbol(),PERIOD_W1,shift+1);
}
low_Buffer[i]=last_week_low;
high_Buffer[i]=last_week_high;
}
//----
return(0);
}
Hi, ich habe da ein seltsames Problem. Seit heute funktioniert der Indikator nur auf EURUSD nicht, auf allen anderen Paaren geht es. Das gleiche Problem habe ich bei anderen Indikatoren. Ist doch unlogisch irgendwie oder? Kann das mal jemand bei Alpari testen?
#property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Green double low_Buffer[]; double high_Buffer[]; int init() { SetIndexBuffer(0,low_Buffer); SetIndexBuffer(1,high_Buffer); SetIndexStyle(0,DRAW_LINE,0,2); SetIndexStyle(1,DRAW_LINE,0,2); SetIndexLabel(0,"pw_low"); SetIndexLabel(1,"pw_high"); return(0); } int deinit() { ObjectDelete("pw_low"); ObjectDelete("pw_high"); return(0); } int start() { int i,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--; int limit=Bars-counted_bars; if(Period()>PERIOD_H4) return(-1); double last_week_low,last_week_high; for(i=limit-1; i>=0; i--) { // 1sts Days of Week if(TimeDayOfWeek(Time[i])<=2 && TimeDayOfWeek(Time[i+1])>=4) { //we are at the first bar of the week, means nearest bar in W1 is this weeks bar int shift= iBarShift(Symbol(),PERIOD_W1,Time[i],false); last_week_low=iLow(Symbol(),PERIOD_W1,shift+1); last_week_high= iHigh(Symbol(),PERIOD_W1,shift+1); } low_Buffer[i]=last_week_low; high_Buffer[i]=last_week_high; } //---- return(0); }