Errors, bugs, questions - page 907

 
x100intraday:

The opposite is true. Under the personal visual control all the history is downloaded at the first start, at the end of the download it is checked with the Home key with going to the beginning of 1994 on M1. Then I manually bypass the timeframes I frequently use, as well as those relevant to the multitemporal indicator, wait for their formation and reload the terminal. That's it.

As far as I understand, all TFs are built on the fly from M1. I.e., by restarting the terminal, you "forget" all previous drawings and when restarting the terminal again needs time for their calculation.

Try before all calculations to insert into your indicator downloading of all necessary history (for all used symbols and TFs), as it is done in this script:

   for(int s=0; s<SymbolsCount; s++)
     {
      for(int p=0; p<PeriodsCount; p++)
        {
          if(!CheckLoadHistory(SymbolsName[s],StringToPeriod(PeriodsName[p]),BarsCount)) return;
         }
     }
sHistoryExport - удобный скрипт для экспорта исторических данных в формате МetaТrader 4
sHistoryExport - удобный скрипт для экспорта исторических данных в формате МetaТrader 4
  • votes: 14
  • 2012.11.12
  • Andrey Khatimlianskii
  • www.mql5.com
Экспорт всех необходимых инструментов и тайм-фреймов одним кликом с загрузкой и проверкой истории.
 
komposter:

As far as I understand, all TFs are built on the fly from M1. I.e. by restarting the terminal you "forget" all previous drawings and at a new start the terminal again needs time to calculate them.

Try before all of the calculations to load all of the necessary history into your indicator (for all of the symbols and the TFs used), as it is done in this script:

I, if anything, am referring to this directory:

C:\Program Files\MetaTrader 5\Bases\MetaQuotes-Demo\history\NZDUSD\cache,

If by "constructions" we mean creation of non-M1 timeframes. But we still will not see them at the initial launch of the terminal and bypass the non-M1 timeframes for their formation and possibility to further work with them, even though the terminal will be completely ready to operate and not only manually. However, after the terminal has been unloaded and also during further runs, the previously generated timeframes can be easily seen in the same directory. But since they do not evaporate with the unloading, but remain and seem to be added during subsequent runs, it is unlikely that the terminal needs time to fully recalculate the requested timeframe.

But when it comes to the indicator - everything is recalculated on the fly at all required depths, I have decided not to bother with saving previous calculations, although I had such an idea.

Your code, as I see it, is nothing more than pre-synchronization of local history with server one? If so, I've been planning it for a long time, but still haven't managed to add such a simple block to my code.

 
komposter, even though I intentionally mentioned that the terminal is ready for full functionality at the first start (after the necessary history has been downloaded and options tuned), I personally take precautions and start reporting the stabilized terminal behavior only from the second start (because of this uncertainty, that non-M1 configured timeframes are reliably saved on disk and do not hang somewhere in RAM and may start to swap awkwardly and heavily at the expense of OS when there is lack of memory, and it may get damaged). So, in theory, the indicator should not fail from the second start of MT5. But for some reason it only stopped on the tenth run, although the other nine runs of MT5 didn't change anything, everything was monotonous.
 
x100intraday:

Your code, as I understand it, is nothing else but pre-synchronization of the local history with the server one? If so, I've been planning it for a long time, but still don't have time to add such a simple block to my code.

Not only synchronization with server, but also building all TFs.

Download the library, insert 3 lines of code in your indicator and see the result.

 

I don't understand why the ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR,0) function returns zero when testing the indicator, whereas visible bars are at least 30

(verified by ChartGetInteger(0,CHART_VISIBLE_BARS,0)

On normal charts - everything is fine, one differs from the other by 1, but when testing, there is this nonsense...

How do I get rid of it?

 
Поясните, почему в данном простом индикаторе с двумя массивами - второй  имеет нулевой размер??

{Код удалил после ответа на вопрос чтобы не занимал место}



 
dimonsky: Explain why in this simple indicator with two arrays - the second has a zero size?
#property indicator_plots 2
 
avoitenko:
Thank you!!!
 
Can I use a second account here? Certainly not for the purpose of racking up credits
 
Zeleniy:

Can I use a second account here? Not for the purpose of racking up credits, of course.
Natural question. Why? ))
Reason: