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

 
solandr:
I'll be waiting. Thank you in advance for your help!
Here, try ;)
Files:
 

Very similar to what I was dreaming of!!! :o) There's just some mistake with the calculation of the number of bars.
I have it set to show 2000 bars in the terminal window, that is really 2000 bars in the chart window. This is what the Expert Advisor writes when I run it on EURUSD chart:

01:20:32 WithoutSunday_m EURUSDm,Daily: < - - - - 12 correct charts found. - - >
01:20:32 WithoutSunday_m EURUSDm,Daily: < - - - - EURUSDm1440: were 1896 bars, added 0 bars, deleted 103 bars - - - >
01:20:32 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_EURUSDm1440" - - >
01:20:33 WithoutSunday_m EURUSDm,Daily: < - - - - USDCHFm1440: were 3792 bars, added 0 bars, deleted 206 bars - - - >
01:20:33 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_USDCHFm1440" - - >
01:20:33 WithoutSunday_m EURUSDm,Daily: < - - - - CHFJPYm1440: had 4710 bars, added 0 bars, deleted 309 bars - - - >
01:20:33 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_CHFJPYm1440" - - - >
01:20:33 WithoutSunday_m EURUSDm,Daily: < - - - - - GBPUSDm1440: was 6606 bars, added 0 bars, deleted 412 bars - - - >
01:20:33 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_GBPUSDm1440" - - - >
01:20:34 WithoutSunday_m EURUSDm,Daily: < - - - - USDCADm1440: was 8502 bars, added 0 bars, deleted 515 bars - - - >
01:20:34 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_USDCADm1440" - - >
01:20:34 WithoutSunday_m EURUSDm,Daily: < - - - - USDJPYm1440: were 10398 bars, added 0 bars, deleted 618 bars - - - >
01:20:34 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_USDJPYm1440" - - >
01:20:35 WithoutSunday_m EURUSDm,Daily: < - - - - EURGBPm1440: were 12294 bars, added 0 bars, deleted 721 bars - - - >
01:20:35 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_EURGBPm1440" - - >
01:20:35 WithoutSunday_m EURUSDm,Daily: < - - - - AUDUSDm1440: were 14190 bars, added 0 bars, deleted 824 bars - - - >
01:20:35 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_AUDUSDm1440" - - >
01:20:35 WithoutSunday_m EURUSDm,Daily: < - - - - EURCHFm1440: were 16086 bars, added 0 bars, deleted 927 bars - - - >
01:20:35 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_EURCHFm1440" - - >
01:20:36 WithoutSunday_m EURUSDm,Daily: < - - - - EURJPYm1440: were 17982 bars, added 0 bars, deleted 1030 bars - - - >
01:20:36 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_EURJPYm1440" - - - >
01:20:36 WithoutSunday_m EURUSDm,Daily: < - - - - NZDUSDm1440: was 18719 bars, added 0 bars, deleted 1134 bars - - - >
01:20:36 WithoutSunday_m EURUSDm,Daily: < - - - - To view results, open chart "WS_NZDUSDm1440" - - - >
01:20:36 WithoutSunday_m EURUSDm,Daily: < - - - - AUDJPYm1440: were 19485 bars, added 0 bars, deleted 1237 bars - - - >
01:20:20:36 WithoutSunday_m EURUSDm,Daily: < - - - - To see the results, open the chart "WS_AUDJPYm1440" - - >
01:20:36 WithoutSunday_m EURUSDm,Daily: < - - - - - Chart WS_EURUSDm1440 found! - - >

In this regard, there are 2 questions:
1. Why does the Expert Advisor detect only 1896 bars in the chart of EURUSDm1440, although the history of quotes (F2) clearly shows the number 2000? Apparently, we should not write 1896, but LAST 1896(~2000-103) on the new chart? Am I right?
2. Probably the counter is not zeroed somewhere, which causes the addition of the sum of bars on the chart. (AUDJPYm1440: it was 19485 bars - that's 60 years!!!)

could you sort out these issues?

I take it you just delete the Sunday bars without combining them with the Monday bars in any way? In principle I'm fine with that as well. Just if it's not too complicated, I would like to have in my options the option of merging Sunday bars with Monday bars as well. That is, the final Monday bar would be equal:
O_new=O_sunday
H_new=Highest(High_sunday, High_monday)
L_new=Lowest(Low_sunday, Low_monday)
C_new=C_monday

 
solandr wrote (a):

Could you deal with these questions?

Yes, indeed the counters didn't reset =)
Thanks for pointing out the error.

Try the corrected version ;)
Files:
 
solandr:

I take it you just delete the Sunday bars without combining them with the Monday bars? That's fine with me in principle. Just if it is not difficult, I would like to have in the options the option of combining Sunday bars with Monday bars as well. That is, the final Monday bar would be equal:
O_new=O_sunday
H_new=Highest(High_sunday, High_monday)
L_new=Lowest(Low_sunday, Low_monday)
C_new=C_monday

Adding is more difficult.
Let me try ;)
 
komposter:
It's harder to add.
I'll give it a try ;)
Tried it =)
Files:
 
Here is an explanation of how important the lack of a Sunday bar is to me.
Below are three pictures.
1. Channel calculation on Alpari which has exactly 5 D1 bars per week.
2. Calculation of channels at InterBankFX in the original quote feed - 6 bars per week.
3. Calculation of channels at InterBankFX using the new chart without Sunday bars.

Picture 3 is the same as picture 1. This is exactly what I wanted!!!!!
Thanks a lot!!!!!!!!!!!!!!!! :o)

PS: time of refresh of chart is 30 seconds (extern int RefreshLuft = 30000;). It is quite enough for me ;o). Anyway, recalculation of the picture is performed once in half an hour.





 
komposter писал (а):
komposter wrote (a):
It's harder to add.
I'll give it a try ;)
Tried it =)

Checked it out. The bars are glued together perfectly (Sunday + Monday). thanks!!!

I would also like to clarify one small technical detail.
In archive of quotes it is written that we have 2000 bars EURUSDm.
But the Expert Advisor gives 1 bar less value:
02:11:56 WithoutSunday_2m EURUSDm,Daily: < - - - - EURUSDm1440: was 1999 bars, deleted 103 bars - - - >
The question is why?
Probably the report line does not include the zero bar or something like that, as it has not yet been formed and it is not counted by the bar count? Or is there some other meaning behind it?

PS: I think that after some testing on the real of this script it would be possible to put it in the CodeBase of this site. The script will be just extremely useful for those who work on D1 period at brokers, such as InterBankFX.
 
solandr писал (а):
Picture 3 is the same as picture 1. This is exactly what I wanted!!!!!

Yes, you can see the difference)
I put it in CodeBase.
 
solandr:
I would also like to clarify one small technical detail.
The quote archive says that we have 2000 bars of EURUSDm.
The Expert Advisor has 1 bar less:
02:11:56 WithoutSunday_2m EURUSDm,Daily: < - - - - EURUSDm1440: was 1999 bars, deleted 103 bars - - - >
The question is why?
Probably the report line does not include the zero bar or something like that, as it has not yet been formed and it is not counted by the bar count? Or is there some other meaning behind it?
Yes, the 0th bar is entered into the database after it is generated.
 
I would also like to know about the following occasional errors that pop up when the terminal is switched on:

1 error:
02:10:24 WithoutSunday_1m: FileOpen - too many opened files
02:10:24 WithoutSunday_1m EURUSDm,Daily: Alert: FileOpenHistory("WS_EURCHFm1440. hst", FILE_BIN | FILE_WRITE ) - Error #4102

It clearly says "too many files are opened". Is there any way to eliminate it when using Expert Advisor with 12 currency pairs? Maybe to pause for several seconds between consecutive processing of history files or something else?

2 error:
02:11:06 HistoryBase: 273 errors in 'WS_USDCHFm1440'
This error causes quotes to flatten vertically, i.e. a large pinhole appears on the chart. But I didn't look for it and didn't make a screenshot.
Is it because the terminal was shut down at a bad time (at the moment of rewriting a history file) or something else?
Is there anything that can be done to prevent this, because when running an EA for automated real-time trading, I want to be protected against such surprises. Maybe, the alert window can alert the user, for example, when the terminal can or cannot be disabled?
Reason: