Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 621
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
The goal must justify the means. If you have the source code of all the necessary components, it is easier to combine everything in one EA. If this is not possible, it is necessary to organize the communication between the modules of all the components, but this is not a task for beginners.
The primary task for beginners is to learn how to write the "sources of all the necessary components". Otherwise, newbies will gather so much ... that we will be accused of hacking the brains of Martians.
The primary task for beginners, is to learn how to write the "sources of all required components". Otherwise, beginners will gather so much ... that we will be accused of hacking brains of Martians.
That's right! In general, if you want to learn how to program, you should start with simple programs, gradually moving to more complex ones. Then there will not be questions such as I want something that I do not even know.
I tried to do it on https://www.mql5.com/ru/articles/1572
I want to try it but i can not get it to work properly.
I found a complete algorithm, but I don't understand where to put it
Good afternoon, have the source code of an EA, please ask for help to add a protection there that it would only work on a certain specified account.
Tried to do according to https://www.mql5.com/ru/articles/1572
I want to use it as a reference but i am not sure i can help.
I found a complete algorithm, but I don't understand where to put it
Forum on trading, automated trading systems and trading strategy testing
FXwin, 2018.09.14 11:48
Really... What was the original task? I don't remember either...:)))))))))))
What are you children doing, really, stirring up the waters?
Just go into the MetaEditor, and type in the command: File->Create...
This will bring up a form with different dummy files.
In particular, it will be dummy files:
- Expert Advisor
- Custom indicator
- Script
- Library, etc.
We are interested in the first three items: Expert Advisor, Custom Indicator and Script.
Let's compare these dummies:
In Expert Advisor we have events:
-OnInit(), OnDeinit(), OnTick(), OnTimer, OnChartEvent() ... everything, no more.
In the script we have the events:
- OnStart() ... that's it, no more.
in the indicator we have events:
- OnInit(), OnCalculate(), OnTimer, OnChartEvent() ... everything, no more.
The natural question here is how to make the connection between these objects.
It turns out that there is and can be no connection between them in MQL, because the data streams between these objects are completely separated and there is no connection between them.
Moreover, I am surprised by the fact that the creators of MQL give us this fact as a "good".
And if, for example, in C++ I can easily call the BASIC translator, or Javascript or any other translator, and go, for example, to Android programming environment,
in the framework of MQL, I can't even create a so-called "script" in "indicator" environment, because indicator environment doesn't accept OnStart() command.
What kind of freak is this?
And there are more than enough of such ugly things in MQL.
They are at every step.
I read the description of MQL - and I'm surprised, because there's nothing else to do.
All the while the creators of MQL loudly proclaim that MQL is a descendant of C++.
Of course, I'm sorry, but I want to ask MQL creators: - Heir to what? - In its ugliness?
I unintentionally compare MQL with the famous 1C programming environment. They also claim to be the heirs of C++.
But everything is done there in a much more decent way.
And the graphical objects, and communication between modules and much more.
And what's there in MQL?
No built-in classes, no thread-related objects... and nothing at all.
And I haven't said anything about the mathematical shell of the terminal!!!
That's a whole separate topic for surprises!!!
What are you children doing, really, stirring up the waters?
Just go into the MetaEditor, and type in the command: File->Create...
This will bring up a form with different dummy files.
...
That's a whole separate topic for surprises!!!
Nothing prevents you from writingOnStart() inOnCalculate(), as in the script
Nothing prevents you from writingOnStart() inOnCalculate(), as in the script
https://www.mql5.com/ru/code/19220
Indicator as an example of working with objects.
Please show us an example of a working code to build an ellipse or other object in an indicator environment, for example.
Indicators are the right place to build graph objects of any kind.
https://www.mql5.com/ru/code/19220
Indicator as an example of working with objects.
We are not children, we are perfectly sane individuals.
Let's not try to whisper, and deceive each other.
Once again I repeat my question:
Please give me a simple code of the indicator, in which some scripted object (OnStart(), for example, an ellipse) is built.
The procedure is as follows:
You enter the MetaEditor. Click File->Create....
Click on Indicator.
And in this environment you enter the code of script object (OnStart(), for example, ellipse).
It's so simple !!!
Good luck !!!
That is, you want not just throw the object on the form, or create an object independent of anything, as in your example, but introduce this object in the computational environment of the indicator .
In other words, the indicator data flow changes - the graphical object also changes.
Not like in your example, it is just a dummy on the chart that doesn't depend on anything.