MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Update to MetaTrader 4 build 735 and Test the VPS for Free

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)
 
Forecasting Financial Time-Series
Forecasting financial time-series is a required element of any investing activity. The concept of investing itself - put up money now to gain profits in future - is based on the concept of predicting the future. Therefore, forecasting financial time-series underlies the activities of the whole investing industry - all organized exchanges and other securities trading systems.
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