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
Most likely they are. I have half of my code tied to a timer too, now I have to wait for a new build or come up with crutches :(
Exactly, just changed OnTimer to OnTick and everything went as before, but optimization by cores is performed one by one, not simultaneously. It seems to me that developers will fix such obvious errors quickly (I hope).
This code does not trigger the timer
But this one does.
Exactly, just changed OnTimer to OnTick and everything went as before, but optimization by cores is performed one by one, not simultaneously. It seems to me that developers will fix such obvious errors quickly (I hope).
In my case, it didn't help.
There must be some peculiarities.
I tried it on Win 2003 Server SP2 x32 (AMD 2600+, one core). And I may say it was done on an "empty" Expert Advisor. Only two variables and a couple of functions were added (those defining timer state and catching the first start).
Where did code 10005 go and what does it mean ?
Something in between a requote (10004) and "request rejected" (10006) ?
In the Championship 2010 discussion https://championship.mql5.com/2010/ru/users/capr, a participant posted his EA code. Tried to compile it (build 355). The compilation results show several warnings. I am interested in the following fragment. There is such a fragment in the code:
Of two constructions of the same type if(ticket= ... the compiler generates the "expression is not boolean" warning only for the last one (i.e. it "masks" a similar previous warning). If you comment out the if statement in the warning (for the purpose of checking the compiler!), the warning is generated for a similar construct which hasn't been changed but was absent in the protocol during the previous compilation.
Is this a feature or a bug?
Errors, MetaTrader 5 MQL, Opened, Started: 2010.11.06 11:32, #25823
Give me an answer
I don't know if it's supposed to be that way, but when writing to a file
I sometimes get non-normalized prices:
81.42
81.41
81.41
81.40000000000001
81.40000000000001
81.40000000000001
81.40000000000001
81.41
81.40000000000001
81.41
81.41
why?
and for some reason couldn't write to file using FileWriteStruct( file_handle,data, sizeof(data));
and for some reason could not write to the file using FileWriteStruct( file_handle,data, sizeof(data));
I need to write into a binary file - https://www.mql5.com/ru/docs/files/filewritearray
FileWriteArray
Writes arrays of any type to a BIN type file, except for string arrays (can be an array of structures not containing strings and dynamic arrays).
intFileWriteArray(
intfile_handle,//file handle
voidarray[],// array
intstart_item=0,// initial index in the array
intitems_count=WHOLE_ARRAY// number of elements
);
For example (the code should be updated to avoid overwriting existing records):
You need to write to a binary file - https://www.mql5.com/ru/docs/files/filewritearray
For example (the code needs to be improved, so it doesn't overwrite already existing records):
OK, thank you very much, I was just writing to a text file for testing, I was beginning to doubt how MqlTick is essentially a structure :)
ZS: not bad - basically restored my class and code ;) - i am sorry, that you don't want to create your own offline charts in MT5 - i am writing for MT4+MT5, i got addicted to non-standard TF