Errors, bugs, questions - page 2585

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Where and at what point do you delete the indicator handle?
As soon as it is no longer needed. And before OnDeinit.
As soon as it was no longer needed. And before OnDeinit.
That's the thing, as soon as it's no longer needed, I delete it. How can I tell a program that it's being removed if OnDeinit doesn't work?
That's the thing, as soon as it's no longer needed, I delete it. How can a program know it's being removed if OnDeinit doesn't work?
Give me the actual task.
The real problem is to tell me the real problem.
The real problem was easily solved by simply avoiding getting your own handle, as you don't need your own handle:
just thinking: what if you need your own handle...
there were such problems, but I don't remember them
just thinking: what if you need your own handle...
There were such tasks, but I don't remember them.
Init_Sync has such a need.
post 25786
By randomization method, I've defined a normal copying into mql's string, a string of const wchar_t* type.
With this parameter in memcpy function, mql started to receive even strings, and without leaks.
That is, instead of 2 bytes sizeof(wchar_t), it used 3 bytes.
But interestingly, the self-described literal string is correctly passed with sizeof(wchar_t).The mql string began to correctly take a pointer to the const wchar_t * string.
Is it ok?
Randomly, I defined normal copying to mql string, a string of const wchar_t* type
With such parameter in memcpy function, mql started to receive even strings, and without leaks.
That is, instead of 2 bytes sizeof(wchar_t), it used 3 bytes.
But interestingly, the self-written literal string is correctly passed with sizeof(wchar_t).The mql string began to correctly take a pointer to the const wchar_t* string
Is it normal?
Why is memcpy used instead of normal wcscpy ?
Why use memcpy instead of the normal wcscpy ?
memcpy was used as shown inRenate's examplearticle.
Using other copy functions causes the same problems.
The behaviour with these functions is described in this post and inthis
All possible copy functions have been tried.
void OnInit()
{
datetime first_date;
SeriesInfoInteger(_Symbol,_Period,SERIES_FIRSTDATE,first_date);
int bars=Bars(_Symbol,_Period);
Print("First date ",first_date," - ",bars," bars");
datetime time[];
CopyTime(_Symbol,PERIOD_M15,D'2015.01.01',100000,time);
Print("rows=",100000," =? ",ArraySize(time));
Print("Load data from ",D'2015.01.01'," =? ",time[0]," to ",time[ArraySize(time)-1],", rows=",100000," =? ",ArraySize(time));
//---
}
void OnTick(){
}
reads about 37,000 bars. When running in the terminal it reads all 100000 bars.
Tried adding paging code from server at https://www.mql5.com/ru/docs/series/timeseries_access#synchronized
But nothing changes.
How to read these 100000 bars in the tester?
How do you calculate these 100,000 bars?
Start by reading the article https://www.mql5.com/ru/articles/239