useful article
I understand that a trading session differs from a quotation session in that you can already place orders.
but quotations are not going on yet, i.e. trading is not taking place, but orders can be placed.
Well, it is clear that quotations are going on, which means that trades on this instrument are taking place.
correct me if I'm wrong
In the trading session you can trade, in the quote session prices come in as in the trading session, but you cannot trade.
//--- get the character limit on volume double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_LIMIT);
Theold variant was like this and it should not be used anymore:
//--- get the character limit on volume double max_volume=AccountInfoDouble(ACCOUNT_LIMIT_VOLUME);
The article has been corrected and the new code of Check_Order_And_Volume_Limits.mq5 Expert Advisor has been attached.

- www.mql5.com
Due to changes in MQL5, now the maximal overall volume allowed for one symbol can be obtained as following:
//--- get symbol limitation for volume double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_LIMIT);
Do not use the old variant! It was like this:
//--- get symbol limitation for volume double max_volume=AccountInfoDouble(ACCOUNT_LIMIT_VOLUME);The article has been corrected and the new Check_Order_And_Volume_Limits.mq5 expert code has been attached to it.
(build 306)
void OnStart()
{
double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_LIMIT);
}
compile errors:
'SYMBOL_VOLUME_LIMIT' - undeclared identifier test.mq5 4 46
'SymbolInfoDouble' - no one of the overloads can be applied to the function call test.mq5 4 20
Quote from the article:"To get the opening time of the last bar you can use the SeriesInfoInteger() function, which needs to be given the symbol name, timeframe and the SERIES_LASTBAR_DATE property".
In an earlier version of the reference book there was an example of getting the last bar open time using the CopyTime function, roughly like this:
datetime lastbar_time[1]; CopyTime(Symbol(),0,0,1,lastbar_time);
Question: which of these two options for getting the last bar open time is preferable in terms of speed of information retrieval and efficiency of use?
Quote from the article:"To get the last bar open time, you can use the SeriesInfoInteger() function, which needs to be given the symbol name, timeframe and SERIES_LASTBAR_DATE property."
In an earlier version of the Reference Manual there was an example of getting the last bar opening time using the CopyTime function, like this:
Question: which of these two options for getting the last bar open time is preferable in terms of speed of information retrieval and efficiency of use?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Limitations and Verifications in Expert Advisors is published:
Is it allowed to trade this symbol on Monday? Is there enough money to open position? How big is the loss if Stop Loss triggers? How to limit the number of pending orders? Was the trade operation executed at the current bar or at the previous one? If a trade robot cannot perform this kind of verifications, then any trade strategy can turn into a losing one. This article shows the examples of verifications that are useful in any Expert Advisor.
Author: MetaQuotes