[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 245

 

Hello ! Could you please tell me what's going on with the graphical object.

             Время_фрактала=Time[ФрВниз];                                               // Определение места обозначения фрактала по времени
             Цена_рисунка=Low[ФрВниз];                                                  // Определение места обозначения фрактала по цене
             ObjectCreate("ФрВнизрис",OBJ_TEXT,0,Время_фрактала,Цена_рисунка-2*PointX); // Создание надписи исторического Фр вверх
             ObjectSetText("ФрВнизрис","Фривн",14,"Arial",DarkOrange);                  // Задание свойств надписи
             Error=GetLastError();                                                      // Назначение имени функции проверки ошибок
             Print("Error рисунка = ", Error);

A message comes up saying that the name parameter should be string:

(name parameter for ObjectCreate function must be a string

name parameter for ObjectSetText function must be a string )

And what is expected for the parameter string: Error picture = 4062

In the tutorial, in the example(https://book.mql4.com/ru/functions/objects), the name seems to be the same, without string . Or is it wrong there too ?:

//--------------------------------------------------------------------
// grafobjects.mq4
// Предназначен для использования в качестве примера в учебнике MQL4.
//--------------------------------------------------------------------
int start()                            // Спец. функция start
  {
//--------------------------------------------------------------- 1 --
   int Sit;
   double MACD_M_0,MACD_M_1,           // Главная линия, 0 и 1 бар
   MACD_S_0,MACD_S_1;                  // Сигнальная линия, 0 и 1 бар
   string Text[4];                     // Объявление строков. массива
   color  Color[4];                    // Объявление массива цветов
 
   Text[0]= "Открытие Buy";            // Текст для различных ситуаций
   Text[1]= "Открытие Sell";
   Text[2]= "Удерживаем Buy";
   Text[3]= "Удерживаем Sell";
 
   Color[0]= DeepSkyBlue;              // Цвет объекта ..
   Color[1]= LightPink;                // .. для различных ситуаций
   Color[2]= Yellow;
   Color[3]= Yellow;
//--------------------------------------------------------------- 2 --
   ObjectCreate("Label_Obj_MACD", OBJ_LABEL, 0, 0, 0);// Создание объ.
   ObjectSet("Label_Obj_MACD", OBJPROP_CORNER, 1);    // Привязка угол
   ObjectSet("Label_Obj_MACD", OBJPROP_XDISTANCE, 10);// Координата Х
   ObjectSet("Label_Obj_MACD", OBJPROP_YDISTANCE, 15);// Координата Y
//--------------------------------------------------------------- 3 --
   MACD_M_0 =iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);  // 0 бар
   MACD_S_0 =iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);// 0 бар
   MACD_M_1 =iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1);  // 1 бар
   MACD_S_1 =iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,1);// 1 бар
//--------------------------------------------------------------- 4 --
   // Анализ ситуации 
   if(MACD_M_1=MACD_S_0)                      // Персеч. снизу вверх
      Sit=0;
   if(MACD_M_1>MACD_S_1 && MACD_M_0<=MACD_S_0)// Персеч. сверху вниз
      Sit=1;
   if(MACD_M_1>MACD_S_1 && MACD_M_0>MACD_S_0) // Главная выше сигн.
      Sit=2;
   if(MACD_M_1
 
volshebnik:

Hello ! Could you please tell me what's going wrong with setting up a graphical object.

I get a message that the name parameter should be string:

Try English name.
 

Somehow, my friend's tester went down the drain too... What would that mean?

Does anyone else have this problem as well?

 
nemo811:

Somehow, my friend's tester went down the drain too... What would that mean?

Does anyone else have this problem as well?

If swap close and swap open are often written in the transaction history, it means you have to wait until Saturday.
 
Shniperson:
If swap close and swap open are often written in the transaction history, it means that you have to wait until Saturday.
No - there is no such thing. Just a couple of days ago everything was cool. Since yesterday I and he have started having problems (different test results for the same EA on the terminal of the same broker; errors in the log - there were none before and the owl code has not changed; glitches during code execution, which worked before without errors and in the demo gives the expected results).
 
nemo811:
No - there is no such thing. Everything was OK a couple of days ago. Yesterday I started having problems with him and me (different test results of one and the same EA on one and the same broker's terminal; errors in log - there were no such errors before and the code of the owl did not change; glitches in code execution, which worked without errors before and gave expected results on demo).

Magnetic storms...

I guess the broker has a floating spread?

Does your EA provide for the broker to change the STOPLEVEL level?

 

It turns out that in MQL4 you can't pass a variable by reference to dll and assign a value to it (in dll). It is possible to write to dll only to array (I figured it out by Prof. Tychkov's method).

Please show me where it is mentioned in the documentation.

 
MaxZ:

I guess the broker has a floating spread?

Does your EA provide for the broker to change the STOPLEVEL level?

The tactic is not fixated on catching 10 pips, figuratively speaking, so the spread definitely has nothing to do with it.

Changing of the STOPLEVEL also does not explain what is going on (the tests are performed at the same time, on the same pair - the results are different).

 
nemo811:

The tactic is not fixated on catching 10 pips, figuratively speaking, so the spread definitely has nothing to do with it.

Think about your answer... Or do the test results differ by an order of magnitude?
 
joo:

It turns out that in MQL4 you can't pass a variable by reference to a dll and assign a value to it (in the dll). You can write in dll only in array (by Prof. Tychkov's method).

Could someone please show me where it is mentioned in the documentation.

There was a thread where this was discussed. You have to look it up. I remember that before it was possible to pass arrays without reference. Then it was strictly by reference. I may be confused about something...

That's all I got in the reference.

Reason: