Forcing History download for non-current symbols - MT5 - page 2

To add comments, please log in or register
Torinex
90
Torinex  
Alain Verleyen:

No.

There is not even an attempt to use CheckLoadHistory() in your code ? No need to open all charts, use the function and check the returned code. Act accordingly.


Ok. Thanks.


BTW: I found this a little better for my purposes as it is set-up as an include file. shttps://www.mql5.com/en/code/1251


cheer

CheckHistory - Check and load history function
CheckHistory - Check and load history function
  • votes: 31
  • 2012.12.19
  • Andrey Khatimlianskii
  • www.mql5.com
Slightly modified history load function from MetaQuotes.
Elia Burstein
433
Elia Burstein  
Alain Verleyen:

No.

There is not even an attempt to use CheckLoadHistory() in your code ? No need to open all charts, use the function and check the returned code. Act accordingly.

I checked the CheckLoadHistory() function in the documentation and it seems unsuitable for indicators, because of all the Sleep() functions.

As far as I know Sleep() functions do nothing in indicators and a while loop using them will just bump the cpu to 100% utilization and hang the client.


So. It seems it should be modified for indicator use. But thanks for the info, this function contains all the necessary info to do just that.

fbcjr
109
fbcjr  
Torinex:

HI all.


Just recently converted to MT5 to use multi-pair strategies. Currently trying to write a currency strength meter indicator that looks at 28 pairs.

At present, the only way I can make Bars("XXXYYY",PERIOD_CURRENT) work across all 28 pairs is to open all the relevant charts using  ChartOpen(SymbolIndex_Array[i],PERIOD_CURRENT).

If the a relevant chart is not open, Bars("XXXYYY",PERIOD_CURRENT)  returns a zero value, eve though the relevant symbol is available in the MarketWatch (using  SymbolSelect function).


Does anyone have any suggestions apart from opening all the other 27 windows......??


thanks


Hi Torinex,


Currently this signal open positions for EURUSD, GBPUSD, EURGBP, USDCAD, USDJPY, NZDUSD and XAUUSD.

Just make sure they are available in the Market Watch and it should work.


Thanks,

Francisco

12
To add comments, please log in or register