Add MOEX real tick history for tester on Metaquotes-Demo.
Is the code presented in the sections "Getting properties of a financial instrument and working with a trading account" applicable for programming Expert Advisors in MT4 ? If not, where can I read about it only for MT 4?
Yes, in this part MQL4 and MQL5 languages are completely the same. The only difference is in trading operations and working with indicators.
What is the difference ?
- www.mql5.com
We're on it.
Almost all examples from this article will not work if you select a symbol with a tick size different from 1 and set stops/prices that are not multiples of this size.
And for beginners it will be very difficult to figure out why orders are not placed....
Almost all examples from this article will not work if you select a symbol with a tick size different from 1 and set stops/prices that are not multiples of this size.
And for beginners it will be very difficult to understand why orders are not placed....
there are a lot of unanswered questions here, for example,
nobody can answer the meaning of time intervals given by this function:
SymbolInfoSessionTrade(...)
This function outputs the value of fields of the contract specification "trading session",
but how do these time intervals correlate with the trading schedule on the exchange ?
silence...
there are a lot of unanswered questions here, for example,
no one can answer the meaning of time intervals given by this function:
SymbolInfoSessionTrade(...)
This function outputs the value of fields of the contract specification "trading session",
but how do these time intervals correlate with the trading schedule on the exchange ?
silence...
The function outputs exactly what is specified on the trade server in the contract specification.
//+------------------------------------------------------------------+ //|Check_SymbolInfoSessionTrade.mq5 | //| Copyright 2016, MetaQuotes Software Corp. | | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2016, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" //+------------------------------------------------------------------+ //| Script programme start function| //+------------------------------------------------------------------+ void OnStart() { //--- ENUM_DAY_OF_WEEK weekday=MONDAY; PrintDaySession(weekday); weekday=FRIDAY; PrintDaySession(weekday); } //+------------------------------------------------------------------+ //|| //+------------------------------------------------------------------+ void PrintDaySession(ENUM_DAY_OF_WEEK day) { //--- int session_index=0; datetime from,to; //--- while(SymbolInfoSessionTrade(_Symbol,day,session_index,from,to) && !IsStopped()) { string s_to=TimeToString(to,TIME_MINUTES); if(s_to=="00:00") s_to="24:00"; session_index++; Print(EnumToString(day)," Trade session #",session_index,": ",TimeToString(from,TIME_MINUTES)," - ",s_to); } session_index=0; while(SymbolInfoSessionQuote(_Symbol,day,session_index,from,to) && !IsStopped()) { string s_to=TimeToString(to,TIME_MINUTES); if(s_to=="00:00") s_to="24:00"; session_index++; Print(EnumToString(day)," Quote session #",session_index,": ",TimeToString(from,TIME_MINUTES)," - ",s_to); } } //+------------------------------------------------------------------+
- 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 Creating a trading robot for Moscow Exchange. Where to start? has been published:
Many traders on Moscow Exchange would like to automate their trading algorithms, but they do not know where to start. The MQL5 language offers a huge range of trading functions, and it additionally provides ready classes that help users to make their first steps in algo trading.
In this article we'll show you how to program buying and selling in MQL5, and we will demonstrate how to work with a trading account and symbol properties. The below figure shows the principle of using BUY STOP, SELL STOP and BUY LIMIT, SELL LIMIT, as well as it suggests how to place these order from Market Depth.
Author: MetaQuotes Software Corp.