Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 304
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I want to getthe opening price of the year, not by specifying a particular date, but by passing an index, as if there is a bar of 1 year in the terminal. Last month has index 1, also make last year index 1.Help to implement this?
Thank you, please forgive me, I have formulated the thought incorrectly.
I want to getthe opening price of the year, not by specifying a specific date, but by passing an index, as if there is a 1 year bar in the terminal. Last month has index 1, same way to make last year index 1.Help to implement this?
Very simple.
And it doesn't depend on working/non-working day in any way. PERIOD_MN1 is always the first day of the month, also PERIOD_W1 is always Sunday.
Guys!
One of the clients is complaining that EAs are dropping when the price moves sharply. This has happened with different brokerage companies.
There is nothing in their code that can cause deletion. I have never faced this problem myself.
What may be the problem?
Guys!
One of the clients is complaining that EAs are dropping when the price moves sharply. This has happened with different brokerage companies.
There is nothing in their code that can cause deletion. I have never faced this problem myself.
What may be the problem?
You do not see anything in the logs? Not even about unloading?
Is there nothing straightforward in the logs? Not even about the unloading?
2017.08.08 23:31:29.035 Expert DEBUT 3.0 GBPUSD,M1: removed
2017.08.08 23:31:29.035 Expert DEBUT 3.0 GBPUSD,M1: removed
If expert doesn't use patterns - reopens itself on its chart, then I have no hypotheses...
If the expert doesn't use patterns - reopens on its chart itself, then I have no hypotheses...
2017.08.08 23:31:29.035 Expert DEBUT 3.0 GBPUSD,M1: removed
Is there enough free memory? Expert does not clog the RAM with anything?
Good evening.
Please tell me whyOrderSelect(Ticket,SELECT_BY_TICKET,MODE_TRADES) function doesn't work.
It returns an error: expression could not be evaluated. Ticket - value is filled.
I cannot understand anything ((((
Thank you.
Good evening.
Please tell me why OrderSelect(Ticket,SELECT_BY_TICKET,MODE_TRADES) function doesn't work.
It returns an error: expression could not be evaluated. Ticket - value is filled.
I cannot understand anything ((((
Thank you.
When selecting an order by ticket, we don't need to specify pool - MODE_TRADES is redundant here - this parameter is ignored when selecting by ticket and the order is selected from one of the two lists - from the list of closed or from the list of market positions - depending on whether the position is closed or not yet.
After the successful selection of an order based on the ticket, in order to understand which of the two lists the order is selected from, it is necessary to check the position closing time - if it is higher than zero, then the order has already been closed and was selected from the list of historical orders, otherwise - the order is still in the market.
But in order to understand what your error is, you need to attach the code - give more information, because in this line, in principle, there is no error (except that you do not check the return result of the function, you use a modifier which is ignored in this case and there is no ";" after the closing bracket).
Thank you, but it returns zero for me. What could be the reason?