Servicedesk. Complaints, suggestions. - page 6

 
Ilya Malev:
It won't work in one loop anyway, since all indicators have the same thread, whether with or without timer. Or I don't understand your idea.
Let's say there is an indicator1. It calls indicator2. Indicator2 lacks data on some symbols/TF. It sends this data to the indicator1 and it has downloaded required data in the timer. After the confirmation is received that all required data is downloaded, we again try to download data from indicator2 and as soon as all required data is available, we calculate indicator1.
 
Alexey Kozitsyn:

To download and check history, similar to MT5: https://www.mql5.com/ru/docs/series/timeseries_access

I repeat the question, do you know how to get this date by means of old mql4?

I do. Time[Bars-1].
 
Alexey Kozitsyn:

... Transferability of programmes from MT4 to MT5 and back again.

From 4 to 5 - understandable. The other way round - not so much.

 
Alexey Kozitsyn:
Say, there is an indicator1. It calls indicator2. Indicator2 lacks some data on some symbols/TF. It sends this data to the indicator1 and it has downloaded required data in the timer. After the confirmation is received that all required data is downloaded, we again try to download data from indicator2 and as soon as all required data is available, we calculate indicator1.

The memory is allocated 5 times. Under the command address space for the same thing.

What are you crying about aggressive memory release of data address space? At least the extents are present there.

 
Vasyl Nosal:
Waiting for arbitration for a very long time. Third week (they asked me to wait for the 2nd week, okay).
O almighty moderators, please turn your eyes to the problem:)
 
Алексей Тарабанов:
I know. Time[Bars-1].

You are wrong. I have already written below that the construction you gave will give the first date not on the server but on the chart.

Forum on trading, automated trading systems and strategy testing

Service Desk. Complaints, suggestions.

Alexey Kozitsyn, 2015.10.30 16:42

Using iTime( _Symbol, period, Bars( _Symbol, period )-1 ) we can get the time of first available candle on chart.

But to get the time of the first candle on the server I haven't decided which construction to use.

Everything is done simply using SeriesInfoInteger: SeriesInfoInteger( _Symbol, period,SERIES_SERVER_FIRSTDATE);


 
Алексей Тарабанов:

The memory is allocated 5 times. Under the command address space for the same thing.

What are you crying about aggressive memory release of data address space? At least there are extents there.

Do you have anything of substance to say?
 

Generally speaking, there is most likely a normal solution to the iCustom problem I mentioned.

If MT5 has already loaded the handle of the indicator with the parameters specified for this symbol/tf, then, as I understand, when you call it from any other place, the calculation of the same indicator is not performed again, but the existing handle is used.

And since the first "nesting level" before the call of iCustom, the call of OnTimer works, we can wait for a sequential calculation of all indicators, starting from the most basic ones, then those that use them, and so on to any nesting level, creating their handles only when all indicators and timeseries used in them have been calculated. Then the need for the "Refresh" button probably disappears. I wish I'd guessed it a week ago...

P.S. When using OnTimer, note that the indicator buffers will not be displayed on the chart and data window until the OnCalculate, called by the terminal, returns a value different from 0. And the terminal calls OnCalculate only once, right after Inite, when timeseries and indicators have not yet been calculated. When OnCalculate is called from Ontimer, no matter what value it returns, if the very first return is 0, the indicator will not be displayed on the chart until the next tick or press "Refresh".

 
Alexey Kozitsyn:

The second problem is of a similar type. The indicator is on TF MN1. I am trying to receive data through the function SeriesInfoInteger() from the TF M5. The function returns correct values for some time, and then just stops doing it and starts returning zeros

I have just seen your problem in MT5 indicator, without leaving one cycle OnTimer, I check time series on another symbol/period (not current one) - function says that it is built and gives correct number of bars. Immediately after that I call another function to build the indicator - inside this function, called from the same call of OnTimer, the timeseries manages to be unloaded and the SeriesInfoInteger returns zeros. I had to embed an additional cyclic check, so that everything builds itself without incoming ticks.
 
Vasyl Nosal:
O almighty moderators, please look at the problem:)
It will soon be week 4 of the arbitration...to be continued:)))))