Codes

CSV file reader for MQL5 for MetaTrader 5

This class was developed to exchange data between MetaTrader 5 and CSV files. It converts the strings read from the CSV file to double and integer values depending of the type of the columns. Two producers of CSV files are most important for me. The most important producer are spreadsheet programs

Forum

How-to use CSortetedMap<int,int>.CopyTo() to an array of CKeyValuePair<int,int>

I use Standard Library Generic Data Collection CSortedMap. To get the values out of the object I like to use CopyTo with an array of CKeyValuePair. //+------------------------------------------------------------------+ //| Script tryCopyTo.mq5 |

Does MT5 deliver option values for CFD on options at some brokers?

I trade CFD on index options on MT5 build 1940. The real option ODAX contract would be to big for my account. I assume some of the fields relevant for options will never be filled. But I am interested if it is my broker not maintaining the info for this symbols or is it MT not capable to deliver

What is wrong with my RegEx?

I start to use the RegEx library https://www.mql5.com/en/code/15242 and get memory leaks and errors in the debbuger. I do not see the difference of my first try ex02(). I copied from Test.mqh Example1_1(). Example1_1() works fine. enum enum_example { Example1_1= 0 , ex02= 1 , }; input

Handling of WinAPI strings in MQL5 with MQL Standard Library

To get back a string or a list of strings from a Windows API functions , you pass in a pointer to a buffer. I like to use the wide character functions like GetPrivateProfileSectionNamesW(), see https://docs.microsoft.com/en-gb/windows/desktop/api/winbase/nf-winbase-getprivateprofilesectionnamesw

How to make Indicator containing spread?

I have a account at a market maker. The spread sometimes widens extremely. So I like to program an indicator to show the spread. I adopted the excellent „Clock_v1_3” indicator from „Jerome to show the current spread besides the different time zones. I am new to programming indicators so I do not

Could a class call a system function when it has a member function with equal name?

I like to create a file handling class. It would be nice if some member functions could have the same names like the normal file handling functions, i.e. FileWrite, FileRead. But a class would always call the member functions with that name and it would not be possible to call the normal functions

Is it possible to convert a simple structure to an uchar array?

I am using MQL4 v.840. I made a simple struct (without stings, without dynamic arrays). I can write this structure to a file with FileWriteStruct(). This implies the content of the struct is converted to a sequence of uchar. I it be possible to convert a structure to an uchar array in MQL4 without

MQL4 Object definition with initialization possible?

P { margin-bottom: 0.21cm; } I am using MT 4 Version 4.00 Build 840. I programmed a class with 2 different constructors in its own file. The default constructor (without parameters ) is private and the public constructor (with parameters) is public. So far everything works OK. It makes no sense to