Errors, bugs, questions - page 272

 

When compiling the Expert Advisor the following messages appear in the log (and there are a lot of them)

declaration of 'sl' hides global declaration in file 'Time not waits_2011_00.mq5' at line 20 Trade.mqh 1021 45
declaration of 'tp' hides global declaration in file 'Time not waits_2011_00.mq5' at line 21 Trade.mqh 1021 48

what is this and how to fix it. this was not present in previous builds

 
Trolls:

When compiling the Expert Advisor the following messages appear in the log (and there are a lot of them)

declaration of 'sl' hides global declaration in file 'Time not waits_2011_00.mq5' at line 20 Trade.mqh 1021 45
declaration of 'tp' hides global declaration in file 'Time not waits_2011_00.mq5' at line 21 of Trade.mqh 1021 48

what is this and how to fix it. this was not present in previous builds

This means that you have declared a local and a global variable with the same name. In the local scope, the global variable will be hidden (invisible), which is what the compiler warns you about. The way out is to give different names.
Документация по MQL5: Основы языка / Переменные / Глобальные переменные
Документация по MQL5: Основы языка / Переменные / Глобальные переменные
  • www.mql5.com
Основы языка / Переменные / Глобальные переменные - Документация по MQL5
 
AlexSTAL:
That's a question I've asked myself many times....

I wrote to servicedesk.... they responded quickly!


Not a good one...

 
Jager:

After compilation, the input parameters in the strategy tester are reset to their own parameters. Start, Step, Stop.

Every time after compilation, I have to re-set the required test parameters.

It's very inconvenient.

Can you elaborate on the behaviour?

I tried it. Both on compilation and on restart of the terminal, the settings I've set remain the same.

 

I'm having a problem with initialising the Indicator line account status values.

In brief, the output Print( ) Equity changes when tested on a period of history, while attempts to write the same changing values to the Indicator data buffer are not displayed, although the "capability" of writing to prices has already been tested, and there are no errors and remarks from the tester.

The problem is described in more detail in the last sixth post in the thread: https://www.mql5.com/ru/forum/2963

Осциллятор Equity средствами MQL5
Осциллятор Equity средствами MQL5
  • www.mql5.com
С другой стороны, трудно понять, можно ли менять график осциллятора (а точнее буфер его данных) из кода OnTick эксперта, где метод AccountInfoDouble(ACCOUNT_EQUITY) работает.
 
I didn't need to recompile on 32 bit and didn't need to recompile on 64 bit)
 

What is the correct way to refer to the resource file?

#resource "euro.bmp"
....
....
....
string res=MQL5InfoString(MQL5_PROGRAM_NAME)+"::euro";

Is this correct?

 
In last build some mistake appeared. Function
if(prev_calculated==0)

started to trigger on every tick, and even without ticks. As if it is looped (4 times per second steadily). And the terminal at the same time loads something continuously, although I'm not scrolling the window, and the indicator needs few candlesticks (what's on the screen). At the same time in task manager outputs chart values at maximum on both cores, CPU load also, and MT slows down (in this function I have calculation, if I remove it - no load, but looping remains). If you remove the indicator from the graph, the loading stops after some time. It wasn't like this before - it worked once, as it should. There is a code in front of it:

if(rates_total<0)
      {
         printf("На графике отсутствуют исторические данные");
         return(0);
      }
    
      if(rates_total<DATA_LIMIT)
      {
         printf("Недостаточно исторических данных, необходимое количество: "+string(DATA_LIMIT));
         return(0);
      }

There's enough data, as the messages from the code are not printed. And from.

prev_calculated

Test message is going on continuously.

While writing this post - 20 MBt has downloaded and continues.

Please fix as it was as soon as possible.

If anyone has a not the latest build, please share.

 
-Alexey-:

In the last build, some bug has appeared. Function if(prev_calculated==0) started to trigger on every tick...
Similarly.
 
Kos:

What is the correct way to refer to the resource file?

Is this correct?

"myexp.ex5::euro.bmp"