Pivot Point Indicator - need Partial Day data ignored
Hi everyone!
Have enclosed .mq4 file for a plotting Pivot Points.
It has one serious problem in that on Monday it plots the pivots just based on the partial days data from Sunday evening when the forex markets reopen. This invariably means that the Pivots on your chart on Monday are effectrively worthless as they are all scrunched together!
Can anyone adjust the code so that for Monday the Pivots plotted ignore the partial days data from Sunday evening? i.e. effectively for plotting Mondays pivots it needs to capture the data from Fridays data BUT then including the partial days(Sunday) data too, like Friday is effectively just a longer day.
Cheers for your help!
Dave
I had the very same problem you describe here, so I made a little adjustment to the Pivot Lines indicator I had been using. I am sending you the modified version. See the IgnoreSunday option in the inputs. It basically checks what day it is before getting yesterday's data and if it is Monday, it gets data from Friday.
Take care,
Jan
Hi Dave,
I use this in my daily pivot code to bypass this problem :
for(int i=0; i<limit; i++) {
time = iTime(NULL,0,i);
d = iBarShift(NULL,PERIOD_D1,time,false);
if (TimeDayOfWeek(time) == 1) d+=2;
else d++;
bufferS3[i]= (iLow(NULL,PERIOD_D1,d)+iHigh(NULL,PERIOD_D1,d)+iClose(NULL,PERIOD_D1,d))/3.0;
}
Works quite well. Hope it can help you,
Bye,
François
Have enclosed .mq4 file for a plotting Pivot Points.
It has one serious problem in that on Monday it plots the pivots just based on the partial days data from Sunday evening when the forex markets reopen. This invariably means that the Pivots on your chart on Monday are effectrively worthless as they are all scrunched together!
Can anyone adjust the code so that for Monday the Pivots plotted ignore the partial days data from Sunday evening? i.e. effectively for plotting Mondays pivots it needs to capture the data from Fridays data BUT then including the partial days(Sunday) data too, like Friday is effectively just a longer day.
Cheers for your help!
Dave