Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 328

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
Hello, I want to get an expiry date for futures
EXPIRATION=(datetime)SymbolInfoInteger(Symbol(),SYMBOL_EXPIRATION_TIME);
It gives out 1970 01 01 00 00
Hello, Can someone please advise how to make an EA open an order at a certain point of the chart when you click on a certain point? When you install a script or an EA, the function NormalizeDouble(WindowPriceOnDropped(),Digits); defines the point when you click the mouse. But the question is that this can be done at any time from a running EA. Is there such a possibility.
I see a function ChartGetInteger(0,CHART_EVENT_MOUSE_MOVE,0,1) I don't know how to use it yet, is it possible to determine where (to which point) the mouse pointer was directed?
Hello, Can someone please advise how to make an EA open an order at a certain point of the chart when you click on a certain point? When you install a script or an EA, the function NormalizeDouble(WindowPriceOnDropped(),Digits); defines the point when you click the mouse. But the question is that this can be done at any time from a running EA. Is there such a possibility.
I see a function ChartGetInteger(0,CHART_EVENT_MOUSE_MOVE,0,1) But I haven't figured out how to use it yet. Is it possible to determine where (to which point) the mouse pointer has been directed?
Use the "CHARTEVENT_CLICK" event
You can get parts of the code from here
Use the "CHARTEVENT_CLICK" click event
You can get the code snippets from here
Thank you very much !!!
One more question : I moved the functions to the library from the EA, when I run the EA, it immediately crashes and the messages shows that the terminal can not load the library Cannot call 'ATP_funkcii.mq4::DrawLABEL', 'ATP_funkcii.mq4' is not loaded
How do I fix this problem?
I noticed one thing! The editor of the EA and the library can be seen, but on the computer, I don't see them in the program files for some reason. Only the Expert Advisor file.
Hello, Could you please tell me how knowing the index of an array element to know the index of the next element of the array?
The index of any array always starts with zero. I.e., if the size of the array is 1, the index of this cell will be 0.
How do you know the number 5 to know the number 6?
Knowing the digit 6, how do I know the digit 7, knowing that there are only 8 digits?
Knowing index 7, how do you know the next index, knowing that array size = 8 ?
The index of any array always starts with zero. That is, if the array size is 1, then the index of that cell will be 0.
How do you know the number 5 to know the number 6?
How do you know the digit 6 to know the digit 7, knowing that there are only 8 digits?
How, knowing index 7, how can we find out the next index, knowing that array size = 8 ?
Thanks for the detailed explanation )))) So it would be correct to write
Can you tell me please?
Thanks for the detailed explanation)))) So it would be correct to write
Can you tell me please?
There is no need to sort the array after each addition of an array element. It would be better to move the sorting
From the help.
Return value
Returns index of the first found element. If the sought value is not found, it returns the index of the closest lesser of the elements between which the sought value is located.
Mas[Blizko2] is the closest smaller value in the array.