Multi timeframe problem - page 2

 
Michael Charles Schefe #:

While @Petra5 is correct; an indicator or ea can be coded to do it.

If you are referring to an indicator that you already have, then I suggest that you chat to the author regarding adding this feature, or fixing this feature on that indicator.

I am the author;))
 
Ivan Stefanov #:
Probably I was not clear. I want a level calculated on 15 min for example to be availableon 5 min and to be updated with the new calculations of the indicator  wihout opening 15 min.
Got this problem with the terminal. Just wondering if this is some limitation of mt5 or not.
I did a similar thing in a indicator. When you want to access the other timeframe (M15) use PERIOD_M15 rather than _Period.
 
Ivan Stefanov #:
I am the author;))
then post your code so that we can suggest how to fix it.
 

Ivan Stefanov:

There is a chapter in the book that deals with the problem to load quotes from different timeframes/symbols: https://www.mql5.com/en/book/applications/indicators_make/indicators_multisymbol

Basically, you have to use

SeriesInfoInteger(symbol, period, SERIES_SYNCHRONIZED)

to check if the quotes that you are going to use in your indicator have been synchronized:
 * if not: exit from OnCalculate() with return(0);
 *else: refresh the chart with ChartSetSymbolPeriod(0, Symbol(), Period()); and set a flag that remembers that you don't need to refresh again at the next OnCalculate() call.

MQL5 Book: Multicurrency and multitimeframe indicators / Creating application programs
MQL5 Book: Multicurrency and multitimeframe indicators / Creating application programs
  • www.mql5.com
Until now, we have considered indicators that work with quotes or ticks of the current chart symbol. However, sometimes it is necessary to analyze...