Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1495

 
MrBrooklin #:


Thanks, I'll have a look)

 
If you minimise the tester for a while, the work speeds up.
 
Ivan Ivanov #:
If you minimise the tester for a while, the work speeds up.

It's always been that way.

 
Help , in the indicator if it is started in the tester does not work
void OnDeinit(const int Reason)

Is there any other way to know from the indicator that testing is completed?

 
EgorKim #:
Please, if the indicator is running in the tester, it does not work
.

Is there any other way to know from the indicator that testing is completed?

Not normally, no. Not standard, it is easier to see visually. The log file of the tester should stop growing, it is still a task to track. The date of test completion is not easy to find out either.
 
Valeriy Yastremskiy #:
Not normally. Not standard, it is easier to see visually. The log file of the tester should stop growing, it is a challenge to track it. It's not easy to find the test end date either.

Tick arrival?

 
Artyom Trishkin #:

Ticking incoming?

time is emulated)))) and how to control?, the work of the tester ends! tester in 5ka for me thing as it is)))) and of course not call ondeinit in indicators just sadness.

 

Meta Editor generates the error'ArrayMinimum' - constant cannot be modified and 'ArrayMaximum' - constant cannot be modified, as well as '=' - illegal operation use on assigning the PrevClose variable in the following code:

ulong copied = CopyTicksRange(Symbol(), ticks, COPY_TICKS_INFO, t0, t1); 
ArrayResize(ticks, copied, 100000);
double PrevClose = ticks[copied-1]; // Получаем последний элемент массива как значение PrevClose
double highestHigh = ArrayMaximum(ticks, 0, copied - 1); // Находим максимальное значение в массиве ticks
double lowestLow = ArrayMinimum(ticks, 0, copied - 1); // Находим минимальное значение в массиве ticks
 
maxvoronin74 'ArrayMinimum' - constant cannot be modified and 'ArrayMaximum' - constant cannot be modified, as well as '=' - illegal operation use on assigning the PrevClose variable in the following code:

"Find the maximum value in the ticks array"- the maximum value of what are we finding?

ticks[copied-1].bid or ticks[copied-1].flags

Just kidding)))))


Most likely you have confused CopyTicks with CopyRates, although there you also have an array of structures and specify which element of the structure you need.

double PrevClose = rates[copied-1].close;

You have an extra line in your code.

ArrayResize(ticks, copied, 100000);
You don't need it because CopyTicks and CopyRates, when copying, distribute the array size by itself.
 
Aleksandr Slavskii #:

"Find the maximum value in the ticks array"-the maximum value of what are we finding?

ticks[copied-1].bid or ticks[copied-1].flags

Just kidding)))))


Most likely you have confused CopyTicks with CopyRates, although there you also have an array of structures and specify which element of the structure you need.

double PrevClose = rates[copied-1].close;

You have an extra line in your code.

You don't need it because CopyTicks and CopyRates allocate the array size itself when copying.

Thank you for the hint. I didn't know. I am inserting this line just in case.

Do I understand your joke correctly that in rates all prices are averaged and take into account the bar, while in ticks they do not? That's why I took tick to use an arbitrary time interval, not bar prices. CopyRates in my similar formula filled the copied variable with the maximum value of ulong type for the hour interval. I could not solve this problem either.

Reason: