Download MetaTrader 5
To add comments, please log in or register
How to launch your trading signal and become a provider
David Lewis
15
David Lewis 2007.04.16 09:37 
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
Files:
Jan Klimo
116
Jan Klimo 2007.09.08 13:54  
Paladin1998:
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
Hi Paladin1998,

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
Files:
Joubert
8
Joubert 2008.06.16 11:48  
Jan, Thank you for your program on daily pivots. I used the same pivot calculator as you but had to enter the data into a spreadsheet each moring and then adjust the horisontal lines each morning - a very cumbersome task indead. This is my first MQL4 program download that work by accident or good programming. Do you perhaps have a program whereby one could set alerts on indicators - for example if stochastic and rsi are both above 80? Kind regards, Joubert Smit joubertsmit@gmail.com
Francois
3
Francois 2009.05.22 11:02  

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

/
To add comments, please log in or register