Roffild's library - page 3

 
Roffild:

Why would I need to make up something complicated?

The example demonstrates not the indicator, but the possibility to output the information from the Expert Advisor as an indicator without the need to create external code.

If ToIndicator_Example.mq5 didn't work, then the code in the Indicators folder\Roffild\ must not have been built when the terminal was running. The log would be helpful.

Of course, we are all used to creating everything from scratch, so no one wants to learn new libraries, but in today's world, using third-party code is a common practice...

The platform developers are systematically improving the system of ranking software modules by functionality, and you and your libraries are going in the opposite direction and want to depersonalise everything again...))
 
Ivan Negreshniy:
The platform developers systematically improve the system of ranking software modules by functionality, and you and your libraries are going in the opposite direction and want to depersonalize everything again...))

To divide into modules, you need a dependency management system. Now there is no such system for MQL and it is unlikely there will be.

In normal development there is no clear division into Expert Advisor, Libraries, Indicator and Script - everything is interconnected. In MQ they decided to separate them. This division is suitable for small projects that flood CodeBase.

The main reason for the absence of this library in CodeBase is the inability to publish all the files in one archive or through version control system. Now you have to add each file individually to the database - but that's nonsense... So there cannot be medium and large projects in CodeBase because of these limitations.

 
Hi, can you code the use of the library for the log(Log4MQL.mqh andLog4MQL_tofile.mqh+ module forLogMX) how to write to the log.
 

Roffild Library

I'm known to the MQL5 programming community as Roffild and this is my open-source library for MQL5. It's an attempt to implement features in MQL5 that became a standard for popular programming languages long ago. One idea is implemented in each file. The library is replenished as new features are needed.

Few people have tried to post the project on Github. There is no unified standard. MetaQuotes does not take into account the use of version control system when creating a project. For some reason, MetaQuotes programmers think that a project must be of one type. For small projects, which are published in CodeBase on MQL5.com, this division is reasonable. For medium and large projects, it is impossible to select one project type.

I've experimented with different structure of project building. I had to move the files outside the standard MetaQuotes folder structure in order to use Git. Creating a link to an intermediate folder (in this library the folder "Roffild") is the best option.

MetaEditor can save code in UTF-16, but UTF-8 encoding with BOM is supported too. To convert source code file you need to use third-party editor (I recommend Notepad++).

The library can be subdivided into interests:

  • common tasks (ArrayList, Log4MQL, ToIndicator, etc.);
  • experiments with AlgLib in machine learning;
  • using Apache Spark with Amazon Web Services (EC2 and EMR), when AlgLib features are not enough.

Documentation

MQL5
Java

References

Roffild.com
Github
MQL5.com: topic for discussion in English
MQL5.com: topic for discussion in Russian


Installing

(Optional)

mklink /j link where - does not require admin rights.

It makes sense to put the %APPDATA%\MetaQuotes folder in the root of a partition or on a larger partition. Windows has a 255 character file path limit. I have a full path to MQL5 folder containing 88 characters. When testing, the terminal copies the history by the number of local agents, which increases the size of this folder by several Gbytes.

  1. Move folder %APPDATA%\MetaQuotes to D:\MQLProjects
  2. mklink /j %APPDATA%\MetaQuotes D:\MQLProjects
  3. mklink /j D:\MQLProjects\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\ D:\MQLProjects\MQL5

(Important)

Run create_links.bat from MQL5\MyProjects\RoffildLibrary folder after cloning the project.

Code style

Google Java Style

Tab = 3 spaces

Column limit = 110

License

Apache License 2.0

 
Библиотека Roffild’a
Библиотека Roffild’a
  • roffild.com
Я известен сообществу программистов на MQL5 под ником Roffild и это моя библиотека с открытым кодом для MQL5. Попытка реализовать возможности на MQL5, которые уже давно стали стандартом для популярных языков программирования. В каждом файле реализована одна идея. Библиотека пополняется по мере необходимости в новых возможностях. Мало кто...
 
There is"Write data to MySQL format file", why is there no reading from this format?
 
Aleksey Vyazmikin:
There is"Write data to MySQL file format", but why no reading from this format?
Because it's easy to write to a text format, but to read from this format you need to use a parser. https://en.wikipedia.org/wiki/Parsing
Parsing - Wikipedia
  • en.wikipedia.org
The term has slightly different meanings in different branches of linguistics and computer science. Traditional sentence parsing is often performed as a method of understanding the exact meaning of a sentence or word, sometimes with the aid of devices such as sentence diagrams. It usually emphasizes the importance of grammatical divisions such...
 
Roffild:
Because it's easy to write to a text format, but you have to use a parser to read from this format. https://en.wikipedia.org/wiki/Parsing

For example, creating 1000 columns using MQL is not easy at all...

 
Aleksey Vyazmikin:

Who can and who can't, for example creating 1000 columns using MQL is not easy at all...

Um... MQL has no columns at all. And MQL != SQL are completely different languages.

It's easier for those who know SQL to sift out the best passes after optimization when their number exceeds 5000 passes. Implemented in TesterSql.mqh