FORTS Please help - page 2

 
Dima_S:
Have you tried mine?

You posted the same code.

Try the one I corrected.

 
Mikalas:

You posted the same code.

Try the one I corrected.

Then you haven't tried it)) I advise you to do it after all. What you corrected won't change anything radically.
 
Dima_S:
So you haven't tried it)) I still advise you to do it. What you have corrected will not radically change anything.

SeriesInfoInteger

Returns information about the status of historical data. There are 2 versions of the function.

SERIES_BARS_COUNT

Number of bars per period-character at the moment

long

2015.03.26 16:42:23.725 Test_dima (MIX-6.15,M1) Get Bars failed RTS-6.15 Last error = 4401
2015.03.26 16:42:23.725 Test_dima (MIX-6.15,M1) Get Bars failed RTS-6.15 Last error = 4401
2015.03.26 16:42:23.725 Test_dima (MIX-6.15,M1) Sorry! Get Bars failed.
2015.03.26 16:42:30.970 Test_dima (MIX-6.15,M1) Get Bars failed RTS-6.15 Last error = 4401
2015.03.26 16:42:30.970 Test_dima (MIX-6.15,M1) Sorry! Get Bars failed.
 

Dimitri, I have rewritten the code at the beginning of the thread again

Try it again and post the results here.

 
In order to retrieve data, and especially from another tool, you must ensure that this data is available in the terminal. If the data is not available, ensure that the data is swapped out. Organising data access
 

Those with symbols already selected in the marketwatch, and even with charts open, naturally get bingo.

However, do not expect to receive data on a newly selected symbol, and request this data in the indicator once at initialisation.

 
barabashkakvn:
To get data, and especially from another tool, you need to ensure that this data is available in the terminal. If there is no data, then ensure that this data is paged in. Organising data access

You constantly misunderstand the situation!

The SeriesInfoInteger function with identifier SERIES_BARS_COUNT just returns the amount of data at the moment.

 
Mikalas:

You constantly misunderstand the situation!

The SeriesInfoInteger function with the identifier SERIES_BARS_COUNT is exactly what returns the amount of data at the moment.

You should read the manual after all. And another thing: it is not correct to try to get something in the indicator in OnInit(). The correct way to start your actions in OnCalculate()- when it is guaranteed that the environment is loaded.
 

If the "referral" to the reference manual has started, then perhaps

the reason should probably be explained.

If there is data in the history or in the terminal, using all kinds of checks, we will eventually get it.

But if the data is ACTUALLY missing, what then?

An endless loop?

There should be a function that returns the data in the terminal (or not) AT ONCE.

 
Mikalas:

As soon as the "dispatches" to the reference manual have started, perhaps

the reason should probably be explained.

If there is data in the history or in the terminal, we will eventually get it by using all sorts of checks.

But if the data is ACTUALLY missing, what then?

An endless loop?

There must be a function, which returns data presence (or absence of it) IMMEDIATELY.

Especially for indicators. Some functions work differently in indicator and in scripts/experts.

For example the Copy... in the indicator the function returns an error immediately in the absence of data (but initiate data download), in the scripts/experts they try to wait for the availability of data and only then they report an error, if the data was not obtained. Many such nuances are indeed reflected in the help.

Reason: