Reading indicator buffers set to chart - page 10

 
[Удален]:

Service Desk gave a solution for MT5

For MT4 the question is open.

Here it looks like somehow done (link removed, not advertising, just want to know how it is done, you can search for MT2Binary_Auto.ex4 or MT2Trading_Auto.ex4). It reads the numbers, arrow type of all the arrow buffers of all the indicators on the chart(it's not a problem). And then it signals on the values of these buffers with settings other than default ones! Who knows how they managed to get the values of buffers in MT4? I don't think any dlls are used.

 

To understand which indicators are on the chart you can use templates, there is an example at fxsaver from kodobase. As far as I know, it is still impossible to run an indicator with a large number of parameters via iCustom

 

Yes, through the templates you can understand which indicators are on the chart and what their buffers, parameters and their values are. But how to get the values of buffers? Call iCustom via case depending on the number of parameters?

Sofiia Butenko:

there is an example for fxsaver at kodobase

Example for MT4? I can't find it, can I get a link?

 
Ivan Titov:

Yes, through the templates you can understand which indicators are on the chart and what their buffers, parameters and their values are. But how to get the values of buffers? Call iCustom through case depending on the number of parameters?

Example for MT4? I can't find it, can I get a link?

I have misspelled in my nickname, but you are aware of it. Here is the example I had in mind for Expert Advisors.

In order to call iCustom with different parameters, you need to prescribe all variants (there may be about 60 settings with different types), but there are too many of them and it is not realistic. Perhaps, it is possible to register variants for an indicator with 5-10 parameters, but this is not a universal solution.

Or you may generate a code that can be used as a gasket indicator. But it also can't be installed without dll (move it to required folder, compile it).

Thanks for the instructions of the EA, interesting information.

Expert
Expert
  • www.mql5.com
Все остальные файлы на данной странице описания библиотеки являются ее примерами/сценариями применения и не нужны для работы самой библиотеки. Возможности Примеры К описанию прикреплены примеры/сценарии ее использования. ExpertsRemove.mq5 ExpertsReopen.mq5 ChartsClose.mq5 ExpertLoader_Example.mq5 ExpertsChange_Example.mq5 Это самые...
 
Sofiia Butenko:

In order to call iCustom with different parameters it is necessary or to prescribe all variants (there may be about 60 settings themselves and with different types), and there are a lot of them and it is not realistic.

Yes, I've already made such a pyramid Maya. I can pass all string parameters - it understands. It didn't take so long, taking into account that I can't ask snow from Service Desk in winter, not to mention ChartIndicatorGet and CopyBuffer in MT4.

You won't get more than 60 with the parameters though, I sympathise.

 
Ivan Titov:

Parameters can be all string - it understands.

But not quite correctly - at each call with string parameters the indicator is initialized, unlike if it is called with the corresponding types.

Here is a comparison of the indicator values with different parameters. In the indicator itself there is an alert for initialization and deletion.

int OnInit(){
   
   for(int i=0;i<3 ;i++){
      double b0 =  iCustom(_Symbol, PERIOD_CURRENT, "_test_HMA",  15 , 3 , 0 ,  2.1,  "11", 0, i);  
      double b1 =  iCustom(_Symbol, PERIOD_CURRENT, "_test_HMA", "15","3","0", "2.1", "22", 0, i);  
      Alert(i+" --> "+DoubleToString(b0,_Digits)+" - "+DoubleToString(b1,_Digits));}
      
  return(INIT_FAILED);}

and it works like this


 
Sofiia Butenko:

But not quite correct - each call with string parameters initialises the indicator, unlike if you call with corresponding types.

I didn't know, thank you, you dig deep). Well, as long as the values are correct and the customer doesn't complain about the speed - I won't build the pyramid.

Reason: