Errors, bugs, questions - page 852

 
Yedelkin:
In other words, do you want the moving averages to be calculated not from the EURUSD H1 chart data, but from the data from which the bars of the technical/user indicator are drawn?
yes, that is correct
 
ilunga: yes, exactly so

Well, then it turns out that we must anyway pass to the technical indicator iMa the values of the indicator buffer of the predecessor indicator. If the predecessor indicator has several indicator buffers(for drawing bars), then, to specify a specific buffer, we must obtain its handle using iCustom. No other ideas yet.

 
Yedelkin:

Well, then it turns out that we must anyway pass to the technical indicator iMa the values of the indicator buffer of the predecessor indicator. If the predecessor indicator has several indicator buffers(for drawing bars), then, to specify a specific buffer, we must obtain its handle using iCustom. No other ideas yet.

I will implement it this way for now. There is an option "use data of the previous indicator" in the settings, I hoped to automate it
 
ilunga: For now, I will implement it this way. There is an option "use data of the previous indicator" in the settings, I was hoping to automate it

I can't immediately find the information in the Reference Manual, but it was said somewhere that "using the previous indicator's data" only transfers the data of the very first indicator buffer. That is, by specifying a handle, we are actually only pointing to the first buffer. It doesn't always suit...But, if the predecessor indicator has only one buffer (or if there is no need to specify other buffers), then, theoretically, we can try. Unfortunately, I never worked with technical (standard) indicators, therefore I can only guess.

 

I don't get it. I decided to make an analogue of Sleep() in indicator and solder it to Label (by pressing it to have a visual effect of pressing)

void InitClick(string Name)
{
   long CLR;
   uint mSecs=GetTickCount();
   uint Delay=100;
   CLR=ObjectGetInteger(0,Name,OBJPROP_COLOR);
   ObjectSetInteger(0,Name,OBJPROP_COLOR,clrSilver);
   //Comment("");
   do
   while (GetTickCount()-mSecs<Delay);
   //Comment("");
   ObjectSetInteger(0,Name,OBJPROP_COLOR,CLR);
}

It doesn't work at any value of Delay, so I have no option to change it very quickly.

If I uncomment strings, everything works. What's the problem?

 
FiftyStars:

But if you uncomment the lines, everything works. What's the problem?

ChartRedraw needs
 
sergeev:
ChartRedraw needed
Thank you
 
Doobjects like OBJPROP_COLOR have numeric equivalents (this was the case in MQL4, but it was in the help, not here)? (I would like to do enumeration in a loop)
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Свойства объектов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Свойства объектов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы объектов / Свойства объектов - Документация по MQL5
 
another question: can I connect external libraries in MQL5 ? if so, is there any information about it?
 
FiftyStars:
Another question: can I connect external DLLs to MQL5? If so, is there any information about it?

How to write a DLL for MQL5 in 10 minutes and exchange data? https://www.mql5.com/ru/articles/18

Delphi DLL Writing Guide for MQL5 https://www.mql5.com/ru/articles/96

Как за 10 минут написать DLL библиотеку для MQL5 и обмениваться данными?
Как за 10 минут написать DLL библиотеку для MQL5 и обмениваться данными?
  • 2010.01.27
  • MetaQuotes Software Corp.
  • www.mql5.com
Так уж сложилось, что сейчас мало кто из разработчиков помнит, как написать простую DLL библиотеку и в чем особенности связывания разнородных систем. Я постараюсь за 10 минут на примерах продемонстрировать весь процесс создания простых DLL библиотек и раскрою некоторые технические детали нашей реализации связывания. Покажу пошаговый процесс создания DLL библиотеки в Visual Studio с примерами передачи разных типов переменных (числа, массивы, строки и т.д.) и защиту клиентского терминала от падений в пользовательских DLL.
Reason: