Errors, bugs, questions - page 584

 

Trying to create a simple array of type string

void OnStart()

{

string mas[3] = {"a", "b", "c"}

}

The system gives an error like variable is not used... please explain what's wrong?

Документация по MQL5: Основы языка / Типы данных / Тип string
Документация по MQL5: Основы языка / Типы данных / Тип string
  • www.mql5.com
Основы языка / Типы данных / Тип string - Документация по MQL5
 
IlshatG:

Trying to create a simple array of type string

void OnStart()

{

string mas[3] = {"a", "b", "c"}

}

The system gives an error like variable is not used... please explain what's wrong?

It's just a worning. It says that a variable (an array in your case) is declared but not used anywhere.

This is not an error but a warning.

 
papaklass:
Yes, 540. Windows 7, 32 bit.

Tested 64 and in 32 bits - no playback. No additional castings required.

Does the error occur in the terminal or in the tester? Let's go to servicedesk with details.

 
IlshatG:

Trying to create a simple array of type string

void OnStart()

{

string mas[3] = {"a", "b", "c"}

}

The system gives an error like variable is not used... please explain what's wrong?

alexvd, thanks for the reply. I'm confused by the fact that in the integer variation of this code the warning does not occur:

void OnStart()

{

int mas[3] = {1,2,3}

}

 
Urain:

In a foursome, it starts from zero. And the rest of the enumeration starts from zero too. It was easy to assume that this one starts from zero too, but no.

In general, the problem occurs if you do not know this feature, and only when you use numbers instead of names (which is sometimes necessary in loops), in other cases, you should write the name of the desired value.

1. There were no enumerators in four.

2. It is not a given that the next renumber value differs from the previous one by 1. So, you cannot use renumbers directly in loops

3. Write your own recoding function for loops

 
papaklass:

to stringo

Stanislav, what parameters did you ask for in your previous application?

Symbol, period, test dates, tick simulation mode, initial deposit, input parameter values.

 
papaklass:

It's all sorted out. It was my fault, I didn't kill the set-file and didn't reload the tester after changing the input parameters in the code. In the original version, my input parameters, which were written in the set-file, were not correct. That was my fault.

Wishful thinking:

When changing input parameters in the code, it would be desirable to have the set-file rewritten automatically.

What application are we talking about? We are talking about a fall in the visualiser. For some reason you didn't ask the question in the service desk, but here. We're talking about my question in the previous application
 

alexvd:
А файловый кэш создался? Он как раз для этого и создавался и должен использоваться при повторных расчетах. 

Where do I find it and how do I download it? I have the optimisation starting from the beginning.

 

Custom indicators are not rendered in the tester visualiser, although the window appears and the calculation is performed.

The ATR indicator from the MT5 set is rendered.

I can't find it on the website, if this question has already arisen, please give me a link to it.

Переход на новые рельсы: пользовательские индикаторы в MQL5
Переход на новые рельсы: пользовательские индикаторы в MQL5
  • 2009.11.23
  • Андрей
  • www.mql5.com
Я не буду перечислять все новые возможности и особенности нового терминала и языка. Их действительно много, и некоторые новинки вполне достойны освещения в отдельной статье. Вы не увидите здесь кода, написанного по принципам объектно-ориентированного программирования — это слишком серьезная тема для того, чтобы просто быть упомянутой в контексте как дополнительная вкусность для кодописателей. В этой статье остановимся подробней на индикаторах, их строении, отображении, видах, а также особенностях их написания по сравнению с MQL4.
 
Retsam:

Custom indicators are not rendered in the tester visualiser, although the window appears and the calculation is performed.

The ATR indicator from MT5 is rendered.

I'm sorry I couldn't find it on the website, if this question has already arisen, please give me a link to it.

There will be a fix in the next build
Reason: