Anyone who wanted to see charts without missing bars - here =) - page 4

 
Haven't tried it, haven't met it )
 
komposter, I have a problem whose solution I think would be of interest to more than just me.
InterbankFX broker has Sunday bars (a couple of hours of trading at the end of Sunday). I use D1 period for analysis (I build regression channels). And those couple of hours of 10-20 pips sluggish trades on the daily chart look like "neither here nor there", giving only 20% unnecessary distortion of technical picture (1 Sunday bar / 5 full bars on weekdays). I would very much like to have an Expert Advisor that would simply delete these unwanted Sunday bars on D1 charts. I thought that this problem could be solved using your Expert Advisor from the article https://www.mql5.com/en/articles/mt4
I tried to run the script AllMinutes_Step1.mq4
It has a parameter that is set on startup:

//---- Allow/disallow drawing bars on weekends
//---- If == true, outputs will be left blank
//---- If == false, outputs will be filled with bars O=H=L=C
extern bool SkipWeekEnd = true;

Based on this description, I thought that if it was set to true, then the Sunday bars should automatically be eliminated.
I ran the script on EURUSD D1 chart. And this is what it shows:

03:45:00 AllMinutes_Step1 EURUSDm,Daily: loaded successfully
03:45:00 AllMinutes_Step1 EURUSDm,Daily: < - - - EURUSDm1440: were 2000 bars, added 1 bar - - - >
03:45:00 AllMinutes_Step1 EURUSDm,Daily: < - - - - To see results, open "ALLEURUSDm1440" chart - - >
03:45:00 AllMinutes_Step1 EURUSDm,Daily: removed

So the script did not add anything - 1 bar can be attributed to some technical inconsistencies. But I thought it would also remove Sunday's unnecessary bars.
I want to ask if you may correct this script (or better yet the Expert Advisor that updates charts according to currency list) so that it deletes Sunday bars on D1 timeframe?
I think it will be VERY useful Expert Advisor for many traders working on D1 period at brokers with similar problems! Thanks in advance!

PS: By the way, this problem has already been mentioned to the broker before and half a year ago InterbankFX even seriously intended to change the server time for 2 hours by sending a notice about changing the server time, but then they started getting complaints from other traders who have already adapted to this technical problem and the broker was afraid to solve this problem with Sunday bars once and for all, and left everything as it was with Sunday bars.
 
SkipWeekEnd is responsible for filling the output bars O=H=L=C.

Re:
I think a nicer option would be to "change the timezone" of the chart.
Although just deleting the Sunday bar would be fine too ;)

Try to describe the task in detail, so that you don't have to finish it 20 times.
Just delete everything that appeared on Sunday? ;)
 
komposter писал (а):
SkipWeekEnd is responsible for filling the output bars O=H=L=C.

Re:
I think a nicer option would be to "change the timezone" of the chart.
Although just deleting the Sunday bar would be fine too ;)

Try to describe the task in detail, so that you don't have to finish it 20 times.
Just delete everything that appeared on Sunday? ;)


Changing the timezone can be quite problematic. I'm using 2000 D1 bars for my analysis, which covers the period from 1999 to today. Firstly, it is the optimal load for the processor in large-scale calculation, and secondly, too old history data may contain the information about "another" market. Although in principle it is not so important for solving this technical problem. So, if you change the timezone, in order to form a new D1 history for such a long period, you should have the history of smaller periods at the broker. For example, it is necessary to have M30 (or H1) history for that period of time. Usually brokers have a history of M30 (H1) till about 2003 at best.

In general I see the following 2 variants of required idea realization:
1. The Sunday D1 bars are simply merged with the Monday ones according to the standard period converter. The remaining bars in the morning, Wed, Thu, Friday are moved to the new history of quotes without any changes.
2. The Sunday D1 bars are simply deleted and the Mo, Sun, Wed, Thu, Fri bars are moved to the new quote history without any changes. I would like very much if this second variant would work on all other timeframes as well. For now I am interested only in M30, but it would be better to make a universal variant, so we will not have to discuss it again.

It would be nice to implement both variants in multicurrency EA that can be selected through the EA's external variable.
 
solandr:
Changing the time zone can be quite problematic. I am using 2000 D1 bars for my analysis, which covers the period from 1999 to today. First, this is optimal loading of a processor in large-scale calculations, and second, too old history data may contain information about "another" market. Although in principle it is not so important for solving this technical problem. So, if you change the timezone, in order to form a new D1 history for such a long period, you should have the history of smaller periods at the broker. For example, it is necessary to have M30 (or H1) history for that period of time. Usually brokers have a history of M30 (H1) up to about 2003 at best.

It could be simpler - move the D1 history somewhere and then import it with a time shift ;)
Although I haven't tried it.

In general, I see the following 2 options for the implementation of the required idea:
1. The Sunday D1 bars are simply merged with the Monday bars according to the standard period converter. The remaining bars in the morning, Wed, Thu, Friday are moved to the new history of quotes without any changes.
2. The Sunday D1 bars are simply deleted and the Mo, Sun, Wed, Thu, Fri bars are moved to the new quote history without any changes. I would like very much if this second variant would work on all other timeframes as well. For now I am interested only in M30, but it would be better to make a universal variant, so we will not have to discuss it again.

It would be useful to implement both of these options in a multicurrency EA that can be selected through the EA's external variable.

That's a bit more specific ;)
If the previous option doesn't work, I'll do it.
 
komposter писал (а):
It could be simpler - transfer D1 history somewhere and then import it with a time shift ;)
I haven't tried it though.


Honestly I don't understand what is meant by that. If we have ONLY already formed D1 bars, how can we remove the Sunday bars via a time shift?
 
solandr:
I honestly don't understand what is meant by that. If we have ONLY D1 bars already formed, how can we remove the Sunday bars via a time shift?
The Sunday bar starts at 22:00. Friday's ends at 22:00 too.
If you move the story forward by 2 hours, Sunday bar will become Monday's bar (at 00:00) and Friday bar will close at 24:00.
At least, it should.)
 

It still doesn't make sense. In the history of D1 quotes provided by the broker we have bars:

1. Sunday OHLC (small bar with 10-20 pips spread. opening at 22:00, closing at 23:59)
2. Monday OHLC (full-size bar. open 00:00, close 11:59 p.m.)
3. Tuesday OHLC (full size. opening 00:00, closing 23:59)
4. Wednesday OHLC (full size. opening 00:00, closing 23:59)
5. Thursday OHLC (full size. opening 00:00:00, closing 23:59)
6. Friday OHLC (full size. opening 00:00, closing 22:00)

How can we recalculate the daily bars using the 2-hour shifts, if the broker has at the server the quotes of the D1 OHLC bars exactly as they are (D1 bar opens at 00:00 every day server time) and no additional intermediate values of the D1 bar, which he received for example at 22:00 every day, the broker does not store anywhere specially and certainly does not allow to download from the server? Where can we get this intermediate information, if the broker does not have any history of smaller timeframe (H1) for the year 1999?

 
solandr:

How can we recalculate the daily bars using the 2-hour shift, if the broker has at the server the quotations of D1 OHLC bars exactly as they are (D1 bar opens at 00:00 every day server time) and no additional intermediate values of D1 bars, which he took for example at 22:00 every day, the broker does not specially store anywhere and certainly does not allow to download from the server? Where can we get this intermediate information, if the broker does not have any history of smaller timeframe (H1) for the year 1999?


Yeah, didn't think of that =)
Without smaller TFs it won't work...

Now I will try to revise the Expert Advisor...
 
komposter писал (а):

I'm going to try and re-do the expert now...

I'll be waiting. Thanks in advance for your help!