No bars were received during the hibernation, exactly the same as if there where no ticks. Don't hibernate.
Loosing connection, refreshes history and the missing bars should be processed. Refresh after hibernation.
No bars were received during the hibernation, exactly the same as if there where no ticks. Don't hibernate.
Loosing connection, refreshes history and the missing bars should be processed. Refresh after hibernation.
Thanks! Haven't thought of that..
I'll try on Monday:
... if (TimeCurrent() - lstQts > 60) { // more than 60 sec = 1 min. limit = Bars-myOffSet; RefreshRates(); Print("Re-Calc ALL TC():",TimeToStr(TimeCurrent(),TIME_SECONDS)," lstQts: ",TimeToStr(lstQts,TIME_SECONDS)," Diff: ",TimeCurrent() - lstQts,"s limit: ",limit); } else limit = Bars-counted_bars; lstQts = TimeCurrent(); ...
Programmaticaly refresh chart, please read the whole topic ( https://www.mql5.com/en/forum/140511 )
Thanks onewithzachy, well I'll try this on Monday:
... if (TimeCurrent() - lstQts > 60) { limit = Bars-iIIF(Kama_slow>atr_slow,Kama_slow,atr_slow); PostMessageA(WindowHandle(Symbol (), Period ()), WM_COMMAND, 33324, 0); Print("Re-Calc ALL TC():",TimeToStr(TimeCurrent(),TIME_SECONDS)," lstQts: ",TimeToStr(lstQts,TIME_SECONDS)," Diff: ",TimeCurrent() - lstQts,"s limit: ",limit); s = -1; } else limit = Bars-counted_bars; lstQts = TimeCurrent(); ...
Thanks onewithzachy, well I'll try this on Monday:
Hi gooly,
Come to think again, I think we should let the chart refresh itself.
If you're find a gap between TimeCurrent and Last TimeCurrent() and also the gap between Time [0] and Time [1] is bigger than 1 minute, then the chart is not refreshed yet. If later the gap between Time [0] and Time [1] is a minute, then the chart is refreshed and you can calculate/count that missing bar.
:D
Sigh,
well the problem for me is that another indicator wonderfully draws its mv-avg lines throughout the bars of the time-gap of the hibernation-mode and in the Data Window of this chart all the results of its various calculations are shown and - hopefully - valid.
But the a.m. indicator, where all its IndexBuffers are set to:
SetIndexStyle(0,DRAW_NONE);
SetIndexStyle(1,DRAW_NONE);
SetIndexStyle(2,DRAW_NONE);
nothing happens, no matter what I try neither your hint to refresh by PostMessageA(..) nor the Right-Click on the Chart and Refresh both doesn't help at all!!
"Let the chart refresh itself?" Even after ONE hour the hibernation was ended the missing data aren't cacluated.
Only re-compile or re-start (Indicator List -> myIndi -> edit -> do nothing -> OK) fills the missing data into the fields of the Data Window of the hibernation time.
A work around might be to define a dummy-buffer filled with EMPTY_VALUE. I haven't time to try this at the moment, it has to wait some days.But if this works, it is a strong hint for a bug - no?
Regards

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I wrote a little M1-indicatior (here simplified):
and I got after my notebook was put into hibernation and was woken up again:
as you can see the index should re-calc the whole chart window (limit=66351), the indicator recognizes the sleepuing time of about 30 min (TC()=21:31 <=> lstQts=20:29)
BUT Time[0] = 21:31 (correct) and Time[1] = 20:59 (FALSE) :=> it should be 21:30!!
As a consequence there are no numbers in the fields of the data window of the chart.
I have to either compile that indicator again or edit and close the indicator on that chart to see again the numbers of the bars during the hibernation time.
Most probably that the calc. numbers were not correct??
Any hint what to do that this indicator re-calc correctly after hibernation?
Thanks in advance, Gooly