Hello.
In the indicator (5 min TF), I try to get data from another indicator (1 hour TF). The system returns error 4806 – “The requested data was not found”. However, if the second indicator (with a larger TF) is running on a parallel chart, then my indicator works. How do I get the indicator to work without opening the second chart?
For example, I made an indicator that I run for 5 min. TF. It also tries to get the data of the ATR indicator from the watchmaker.
Returns an error:
But it doesn’t give out like this:
Help me figure out how to properly run my indicator on a smaller timeframe.
savinkins
Bars () returns -1. As far as I understand, synchronization is needed when the information does not have time to load. And here it does not go at all.
ich_hub
Try to solve the problem using non-standard methods. For example, so:
komposter
The Expert Advisor is easier to synchronize. If you do not need visualization on another TF, do not bother, but connect the indicator from the desired TF to the Expert Advisor.
alexeyvik
The problem is not only well-known, but also well-known
Forum on trading, automated trading systems and testing of trading strategies
The requested data was not found.
Alexey Viktorov, 2017.07.08 10:39
The question was raised back in September 2016, but nothing was fixed or I could not find a solution to the problem?
For some reason, this problem does not occur in the Expert Advisor, and in the indicator it is not possible to request the data of the period indicator that does not correspond to the current one. And the answer to this post also could not be found for a reason… I’d rather not say anything.
Please help me. Maybe someone knows where there is an answer, or they will answer more specifically
Task: to get the values of the fractals of the period H1 when the indicator is launched on the period M5.
int hadle;
double arr[];
/**************Custom indicator initialization function**************/
int OnInit()
{
hadle = iFractals(_Symbol, PERIOD_H1);
int size = CopyBuffer(hadle, 0, 0, 1000, arr);
if(size < 0)
{
Print("CopyBuffer error", GetLastError());
}
return(INIT_SUCCEEDED);
}/*******************************************************************/
And it absolutely does not matter where to place CopyBuffer () in OnInit () or in OnCalculate()
I even tried opening a new chart window with the specified period H1
long idChart = ChartOpen(_Symbol, PERIOD_H1);
add an indicator to it, or apply a template with an indicator to update this chart
ChartIndicatorAdd(idChart, 0, hadle);
nothing helps, the result isChartRedraw(idChart);
ERR_INDICATOR_DATA_NOT_FOUND
4806
The requested data was not found
there are also links to other topics.
savinkins
I thought that the problem is known, so they will tell you. But thanks for the advice. Here is the file.
-aleks-
I recommend that you attach the indicator as a file to start with – few people will work with the picture…