Errors, bugs, questions - page 2574
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
Banal if you print the results of these functions in ontick then it is for the time 1970.01.01 for price 0
Maybe you have a bug in your computer? I've got this code in build 1220.
prints
If you print the results of these functions in ontick, it is for the time 1970.01.01 for price 0.
What isthe error code?
What are the test parameters?
Are the data for weeks and months loaded? How many are there in total?
What isthe error code?
What are the test parameters?
Is the data by weeks and months uploaded? How many are there in total?
I rechecked and everything is working now.
I downloaded the story.
Thank you.
Memory observation.
I have CopyRates executed about a thousand times in my code.
Then the array of quotes is somehow processed, and at the end of this I call:
ArrayRemove(ArrayQuotes,0,ArraySize);
ArrayFree(ArrayQuotes);
ArrayResize(ArrayQuotes,0);
ArrayFree(ArrayQuotes);
ZeroMemory(ArrayQuotes);
(just experimented differently)
Result - memory still grows geometrically and gets clogged, along with it load on processors - i7 processor gets clogged by 80% in total on all logical cores, memory is more than Giga.
So far I've managed to limit resource consumption with a third-party program - CPU not more than 15% and memory not more than Giga.
Question - is this a bug or a feature of the platform?
By the way, strange meta-editor behaviour, should be corrected:
fn_call();/////////////////////
double-clicking on the slashes highlights the slashes with the previous character (if it's not a number/letter there).
Why inconvenient? Made a temporary edit in the code, highlighted the space this way, then need to quickly highlight and delete single slashes.
Still back to the question of passing strings from dll, wchar_t* as a pointer.
From Renat'sarticle on working with strings in dll, it is clear that mql type string takes a pointer to string wchar_t* from external dll.
In other words, we sendwchar_t* to the dll and receive it as string & in mql.
But the C function
does not work correctly, i.e. a pointer to the stringwchar_t* dest is received in mql, but fails and comes in and out.
Sometimes the terminal crashes and the program is terminated.
With the function
The terminal doesn't crash, but the strings arrive intermittently too.
Please correct in the next build.
ZS. I forgot to mention that thewchar_t* pointer is passed from another thread.
I.e. wcscpy_s or wcscpy function is called in a separate thread.
Still back to the question of passing strings from the dll, wichar_t* as a pointer.
From Renat'sarticle about working with strings in dll, it is clear that mql type string takes a pointer to string wichar_t* from external dll.
In other words, we send wichar_t* to the dll and receive it as string & in mql.
But for some reason, the C function
does not work correctly, i.e. a pointer to the stringwichar_t* dest is received in mql but fails and comes in and out.
Sometimes the terminal crashes and the program is terminated.
With the function
The terminal doesn't crash, but the strings arrive intermittently too.
Please correct in the next build.
ZS. I forgot to mention that the wichar_t* pointer is passed from another thread.
I.e. wcscpy_s or wcscpy function is called in a separate thread.
And who will allocate the memory for string dest?
The memory is allocated in the mql code as
out and passed as a pointer to the allocated memory, because string in mql is wchar_t* in dll
Func("Task", out);