FORTS Please help - page 3

 

All required charts open, history uploaded as much as there is:

2015.03.26 18:08:21.025 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

2015.03.26 18:08:20.807 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

2015.03.26 18:08:20.745 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

2015.03.26 18:08:17.812 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

2015.03.26 18:08:15.269 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

2015.03.26 18:08:14.271 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

2015.03.26 18:08:14.255 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

2015.03.26 18:08:10.043 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

2015.03.26 18:08:09.060 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

2015.03.26 18:08:09.060 Test-Mihail (MIX-6.15,H1) Sorry! Get Bars failed.

code from the first post

 

The first post has the wrong code too.

Try removing the indicator from the chart and re-setting it.

 
alexvd:

The first post has the wrong code too.

Try removing the indicator from the chart and re-setting it.

Removed and re-started several times, result is the same as shown above.
 

The picture shows that the data for the RTS-6.15 symbol is present in the terminal.

So why, using:

if ( SymbolSelect( "RTS-6.15", true ) )
{
        long total_bars = long( SeriesInfoInteger( "RTS-6.15", PERIOD_M1, SERIES_BARS_COUNT ) );
        if ( total_bars > 0 )
        {
           Print("OK");
        }
        else
        {
          is_failed = true;
          Print( "Get Bars failed RTS-6.15 Last error = ", string(GetLastError() ) );
        }
      } 
else
{
  Print( "Symbol RTS-6.15 not selected" );
}
Я получаю ошибку?
2015.03.26 16:52:24.383	tmp6 (MIX-6.15,M1)	Get Bars failed RTS-6.15 Last error = 4401

4401 - Запрашиваемая история не найдена


 
Mikalas:

The picture shows that the data for the RTS-6.15 symbol is present in the terminal.

So why, using:


At least because the chart is open on the hour, and you request minutes - these data need to be built to give you. Are you requesting the same in the indicator?
 
alexvd:
If only because the chart is open on the hour, and you request minutes - these data need to be built to give it to you. Are you requesting the same in the indicator?

Hello there!

All the time Renat kept saying that MT5 only has minutiae and the rest is built from them, but it turns out that this is not true.

 
Contender:

Hello there!

All the time Renat kept saying that MT5 only has minutes and the rest is built from them, but it turns out that this is not true.

This does not contradict Renat's words in any way.

Minutes also need to be subtracted from the disk and caches need to be built. In the script\expert you will most likely get this data at once. In the indicator, if there is no chart with minutes open or it was closed quite a long time ago, you will get no data, but this data is not available NOW, on the next tick it may be ready.

 
alexvd:
If only because the chart is open on the hour and you ask for minutes - this data needs to be built to give it to you. Do you request the same in the indicator?
The picture is as an example, and when I drop the indicator, the chart is in minutes
 
Mikalas:
The picture is as an example, and when I drop the indicator, the graph is in minutes
You were given the source code in servicedesk. Try putting your last code into the Test() function.
 
Mikalas:

The picture shows that the data for the RTS-6.15 symbol is present in the terminal.

So why, using:


Michael, I don't understand your stubbornness. Or you have problems with copy/paste)) Try my code - you will be pleasantly surprised.
Reason: