MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
MQL5.com Wall - 24-Hour News Channel About the Life of the Community

Pivot Point Indicator - need Partial Day data ignored

Back to topics list To post a new topic, please log in or register
avatar
4
Paladin1998 2007.04.16 11: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
Attached files:
  pivotsdaily1.mq4  (5.54 KB)
 
GBPUSD Technical Analysis - Monthly Forecast: Happy Bearish Pound Dollar!
MN price: Chinkou Span line of Ichimoku indicator came to be very near with the price to be ready for crossing it from above to below for good breakdown. If it will be happened so I am expecting it in the beginning of December for example. The nearest support level is 1.6052 and price is going to break this level.
avatar
123
janklimo 2007.09.08 15:54 #
 
Paladin1998 wrote:
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
Attached files:
  pivotflines.mq4  (14.98 KB)
 
avatar
3
Joubert 2008.06.16 13: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
 
avatar
2
sailoratbay 2009.05.22 13: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


Back to topics list  

To add comments, please log in or register