Forum

Problem in changing the spread in the strategy tester of MT5

Hi, I want to test my expert advisor in the strategy tester of MT5. However, when backtesting on any Forex instruments, I always get a fixed spread of 50. I tried to change the spread of the symbol but it seems that the strategy tester always uses a spread of 50. Do you know what is wrong? Thanks

How to set user agent property in WebRequest

Hi, I am using the following MQL5 code to fetch data from a web service: string cookie=NULL,headers; char post[],result[]; string referer = NULL; string url= "http://www.test.com" ; int res=WebRequest( "GET" ,url,cookie,referer, 500 ,post, 0 ,result,headers); However, I need to specify

How to get the market value of a symbol in stock market using MQL5 code?

Hi, How can we get the market value of a symbol in stock market using MQL5 code? My broker is Mofid Securities (mofidsecurities-server). Or how can we can the number of shares of a symbol in the stock market. Thank you

How to get the volume of buyers and sellers separately in MQL5?

Hi, Is it possible to get the volume of buyers and sellers separately in MQL5 for stock and securities

How to check we are connected to an access server in MQL5?

Hi, How can we check whether MT5 is already connected to a access server, and is able to receive data from it using MQL5 code

Running MT5 in the background (stealth mode)

Hi, I want to run MT5 from the command line in the background (i.e. MT5 window is minimized or hidden), and save the data calculated by a custom indicator/expert into a file. Is that possible? For example, suppose that we have an expert that saves the number of bars of a specific symbol. I want to

SeriesInfoInteger and CopyTime halt!

Hi, Sometimes, when I use SeriesInfoInteger and CopyTime in MQL5 for a symbol, my code halts for ever, and does not respond. How can I set a timeout so that if the program halts, for example, for 10 second, the task or the calling function is terminated? The symbol is included in the market watch