Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1786

 

Greetings. Could you please tell me how to set RSI levels for tester?

Trying to get parameters like this when debugging with real data seems to be ok, but when debugging with history there is a 4014 error (System function is not allowed to be called)



 
Andrey Sokolov #:

Greetings. Could you please tell me how to set RSI levels for tester?

Trying to get parameters like this when debugging with real data seems to be ok, but when debugging with history there is a 4014 error (System function not allowed to be called)


Then, in the test mode you can add two OBJ_HLINE objects. And in other modes use normal way.

 
Can you tell me what can be used to call another expert or indicator? OK, there is iCustom() for indicator. Is that all? Is there any other way to transfer something from one EA to another?
 
leonerd #:
Can you tell me what can be used to call another expert or indicator? OK, there is iCustom() for indicator. Is that all? Is there another way to pass something from one EA to another EA or indicator?
EventChartCustom
//+------------------------------------------------------------------+ 
//| послать широковещательное сообщение всем открытым графикам       | 
//+------------------------------------------------------------------+ 
void BroadcastEvent(long lparam,double dparam,string sparam) 
  { 
   int eventID=broadcastEventID-CHARTEVENT_CUSTOM; 
   long currChart=ChartFirst(); 
   int i=0; 
   while(i<CHARTS_MAX)                // у нас наверняка не больше CHARTS_MAX открытых графиков 
     { 
      EventChartCustom(currChart,eventID,lparam,dparam,sparam); 
      currChart=ChartNext(currChart); // на основании предыдущего получим новый график 
      if(currChart==-1) break;        // достигли конца списка графиков 
      i++;                            // не забудем увеличить счетчик 
     } 
  } 
//+------------------------------------------------------------------+
 
Mihail Matkovskij #:

Then, in test mode, you can add two OBJ_HLINE objects. And in other modes use the usual way.

Specifically, is it possible to set levels?

 
Andrey Sokolov #:

Is it possible to set the levels exactly?

You said yourself, on real data everything works, but in the tester the levels don't show. I said, then create two lines in the indicator window when it is running in the tester. When running on real data, let everything stay as it is. And how is that not a solution to your problem, and the horizontal lines created in the oscillator are not levels?

 
leonerd #:
Can you tell me what can be used to call another EA or indicator? OK, there is iCustom() for an indicator. Is this all? Is there any other way to transfer something from one EA to another?

You need to save the template with the expert and call it up withChartApplyTemplate.

Документация по MQL5: Операции с графиками / ChartApplyTemplate
Документация по MQL5: Операции с графиками / ChartApplyTemplate
  • www.mql5.com
ChartApplyTemplate - Операции с графиками - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Mihail Matkovskij #:

You said yourself, on real data everything works, but in the tester the levels don't show up. I said, then create two lines in the indicator window when it is running in the tester. When running on real data, let everything stay as it is. And how is that not a solution to your problem, and the horizontal lines created in the oscillator are not levels?

The levels are displayed in the tester, but I cannot find how to set the required ones.

I read it the first time, thanks for the response.

What, who, and why is needed is another matter.

 
Документация по MQL5: Пользовательские индикаторы / IndicatorSetInteger
Документация по MQL5: Пользовательские индикаторы / IndicatorSetInteger
  • www.mql5.com
IndicatorSetInteger - Пользовательские индикаторы - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Alexey Viktorov #:

On this resource, naming a broker is tantamount to discussion. And the lullaby does not sleep and threatens reprisals. So look for yourself...

I apologize very much gentlemen I would not like to interfere in such an interesting and highly intellectual conversation but I have a very difficult problem: I keep getting a wrong username in my personal account, how to change it without the help of the broker?
Reason: