Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1248
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good afternoon !
I'm trying to figure out the code of the indicator. Stuck on one line.
What does the last line mean and how can it be rewritten in a simpler (clearer) way ?
It's described normally in the documentation.
It is written much more simply than any other construction. It's called: the ternary operator
I've shown you the code conditionally, I hope you'll get the hang of itThank you for the clarification.
Hello all!
I am continuing to study MQL5 programming language. My idea of functions, commands, variables, arrays and all the like described above has gradually turned from Chinese hieroglyphs into Chinese characters, and I have some idea what they are for, but I have not mastered their use yet.
At this stage I have made a detailed requirements for writing a simple Expert Advisor. Using the MQL5 Wizard I created an EA template and started to fill it gradually with code. I commented on each line of the code so that it was gradually saved in my memory.
Today I have faced one problem: I have created a csv file in the local folder of the client terminal \Terminal\Common\Files. In cell A1 of this file I manually wrote down the word "buy". Then, according to the technical requirements, the Expert Advisor needs to somehow indicate that it should read this word, convert it to something digestible and understandable in the form of programming code, understand what it needs and only then open theBUY position.
I cannot find and write such keywords in search engine of MQL5 site to get links to necessary articles or examples.
Please, help me, not with some ready-made code, because I'll never understand the MQL5 language, but with keywords for search! What to write, how to formulate a request for a search engine?
Regards, Vladimir.
Hello all!
I am continuing to study MQL5 programming language. My idea of functions, commands, variables, arrays and all the like described above has gradually turned from Chinese hieroglyphs into Chinese characters, and I have some idea what they are for, but I have not mastered their use yet.
At this stage I have made a detailed requirements for writing a simple Expert Advisor. Using the MQL5 Wizard I created an EA template and started to fill it gradually with code. I commented on each line of the code so that it was gradually saved in my memory.
Today I have faced one problem: I have created a csv file in the local folder of the client terminal \Terminal\Common\Files. In cell A1 of this file I manually wrote down the word "buy". Then, according to the technical requirements, the Expert Advisor needs to somehow indicate that it should read this word, convert it to something digestible and understandable in the form of programming code, understand what it needs and only then open theBUY position.
I cannot find and write such keywords in search engine of MQL5 site to get links to necessary articles or examples.
Please, help me, not with some ready-made code, because I'll never understand the MQL5 language, but with keywords for search! What to write, how to formulate a request for a search engine?
Sincerely, Vladimir.
You have to read the orders from the trading file) it's not a simple one from the very beginning. Search work with files first article. And the third, but it's more complicated.
Working with files
Straight from the trading orders file) it's not a simple one already initially. Search work with files is the first article. And the third, but it's more complicated.
Working with files
Thanks, Valery, for the tip, but it turned out for some reason in a truncated form: search for "Working with files" is the first article, then "bang!" and immediately the third. And what should be the second article and the third - what is it actually about? Could you elaborate?
I'm already studying the "Working with files" article.
Regards, Vladimir.
Thank you, Valery, for the advice, but for some reason it came out in a truncated form: searching for "Working with files" is the first article, then "bang!" and immediately the third. And what should be the second article and the third - what is it actually about? Could you elaborate?
I'm already studying the "Working with files" article.
Sincerely, Vladimir.
You may search not only by article but also by forum, kodobase and blogs. I do not know how to rank them. Both articles and forum threads with a search query appear in the search results. Now apparently work on the site and it often behaves inadequately. I have
https://www.mql5.com/ru/articles/2720 the first article of 2016 by Dmitry Fedoseyev. It should be read.
https://www.mql5.com/ru/articles/1382 The third article is from 2006 on MT4, about working with files and graphical objects, and it's not superfluous to read the logic.
The second one is about optimization management, it's frankly still early days.
Not only articles are searched, but also forums, kodobase and blogs. The ranking does not know how. Both articles and forum threads with a search query appear in the search results. Now apparently work on the site and it often behaves inadequately. I have
https://www.mql5.com/ru/articles/2720 the first article of 2016 by Dmitry Fedoseyev. It should be read.
https://www.mql5.com/ru/articles/1382 The third article is from 2006 on MT4, about working with files and graphical objects, and it's not superfluous to read the logic.
The second one is about optimization management, it's frankly still early.
Thanks, Valery! I am already studying the first article of 2016 by Dmitry Fedoseyev. The third article is for MT4, while I have MT5, but I'll read it anyway. Everything is clear with the second article.
Regards, Vladimir.
Good day everyone!
I'm continuing my study of MQL5. I tried to build an EA that would read from cell A1 in EUR_USD.csv the word"buy" and open BUY position. The compiler shows no errors, which is good for me. When being launched, the Expert Advisor refers to the file, that's for sure. But it does not open a position. I understand that the problem lies exactly in this part of the code. I have blocked one line because I do not know whether it is necessary or not. However, the Expert Advisor opens no BUY position both with or without it.
Please give my advice on what I am doing wrong, not through code but by pointing in the direction of what I should add or correct. Maybe, I have mistranslated something in the comments, causing me confusion?
Sincerely, Vladimir.
How can the software determine which version of windows is installed?
Why and why Windows and not another system?