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
Oooh, thank you very much, with so much information you can get so much done...
I'm just about to leave on a business trip, so I'm thinking of going deeper into the materials I've been given, but the coding... I could do it on a sheet of paper too, it would be a good training tool...
Regards, Roman
This is a tiny fraction of what you need to know, a grain of sand in the sea of program code. But it's not enough to know what to use, where to use it and when to use it!
If we proceed from the name of the subject"Robot Creation", then you need to have a break-even (profitable, or whatever you want to call it) trading strategy, and only then study the MQL5 programming language.
By the way, the MetaEditor of the MT5 terminal has the MQL5 Wizard, with the help of which you can easily get the code of the ready-made Expert Advisor using the modules of trading signals, which were created on the basis of popular indicators, without any knowledge of the programming language. With the help of the MQL5 Wizard, you can quickly build an Expert Advisor and test your strategy, if it is based on indicators only. Here is the link to the article about building a trading robot using MQL5 Wizard: https://www.mql5.com/ru/articles/171.
Sincerely, Vladimir.
57 and a bit. And the answer to your question about the way is already known, and I quote:
"Roman Zhilin:No, there is no process in freelancing, which you can develop on your own as you need. And the only one to blame for my mistakes will be myself, not a third-party programmer. So, you will have to learn, learn, code, stumble, improve your strategies, and learn again".
Sincerely, Vladimir.
A good selection, thank you.
Reminds me of Lenin's will :) But it's right, it's never too late to learn.
In order to understand what kind of Expert Advisor you need, you should begin to work on it in the first place.
Added two more buttons to close a position
... I still don't understand the meaning of the constant phrase that begins with the word"Returns".
Who returns, who does it return to, where does it return to, why does it return it? I still can't figure it out...
Perhaps I can explain.
Suppose that you have a symbol (symbol, e.g. EUR/USD) that is oscillating on the screen and a program/advisor/robot is running in the terminal. The robot is executing the code that you have filled into it. And this code has these strings:
"orderSelect" is a trade function, it selects an already open order for further work with it.//In this example, if order selection fails (...==false), further execution of " if " function is interrupted by "break" command.
Next. We have selected the order using the OrderSelect trade function. Now we work with it, with a specific order. For simplicity, we will take a condition that we have only two orders open.
Next, we enter a variable OpenPrice [double type] and assign to it the value of price at which the order we have selected was opened (code section OpenPrice=OrderOpenPrice(); )
HERE is an explanation for you what the RETURN of a parameter means. The OrderOpenPrice function returns the value of the current instrument price. That is, after the program requested the current price from the server, it returned the value of that price to you and assigned that value to a variable.
Added MACD Indicator
Added MACD indicator
The basics are there - now it's all up to you
I might be able to explain.
Let's say that you currently have a symbol (e.g. EUR/USD) fluctuating on your screen and a program/advisor/robot running in the terminal. The robot is executing the code that you have filled into it. And this code has these strings:
"orderSelect" is a trade function, it selects an already open order for further work with it.//In this example, if order selection fails (...==false), further execution of " if " function is interrupted by "break" command.
Next. We have selected the order using the OrderSelect trade function. Now we work with it, with a specific order. For simplicity, we will take a condition that we have only two orders open.
Next, we enter a variable OpenPrice [double type] and assign to it the value of price at which the order we have selected was opened (code section OpenPrice=OrderOpenPrice(); )
HERE is an explanation for you what the RETURN of a parameter means. The OrderOpenPrice function returns the value of the current instrument price. That is, after the program has requested the current price from the server, it has returned the value of that price to you and assigned that value to a variable.
Thank you for your clarification. I hope it will also help Roman in mastering the programming language.
Regards, Vladimir.
Hello! Well, maybe someone can help me...
Currently dealing with order opening/closing mechanisms and have run into a problem with closing open positions.
The code is simple. The idea of the algorithm is to draw the MA (moving average) with a period of 100 on the chart. If the previous candle [1] opened above the MA, and closed below the MA, then the next candle [0] opens a SELL orderto sell.
//(The conditions to buy are reversed. I am not explaining them)
For closing of the order the following conditions - the current price has passed from the price of opening of the order the set value of points, for example 40.
Example: A lot is opened at Bid= 1.20045, it should close at Ask= 1.20005.
The code of opening and closing is packed into 2 corresponding functions which in their turn are called with OnTick() function. In fact, with every tick the closing condition should be checked, but in fact the price may fall below the specified level (closing level) but the order won't close. Screenshots and code are attached.
Hello! Well, maybe someone can help me too...
Currently dealing with order opening/closing mechanisms and have run into a problem with closing open positions.
The code is simple. The idea of the algorithm is to draw the MA (moving average) with a period of 100 on the chart. If the previous candle [1] opened above the MA, and closed below the MA, then the next candle [0] opens a SELL orderto sell.
//(The conditions to buy are reversed. I am not explaining them)
For closing of the order the following conditions - the current price has passed from the price of opening of the order the set value of points, for example 40.
Example: A lot is opened at Bid= 1.20045, it should close at Ask= 1.20005.
The code of opening and closing is packed into 2 corresponding functions which in their turn are called with OnTick() function. In fact, with every tick the closing condition should be checked, but in fact the price may fall below the specified level (closing level) but the order won't close. I am attaching the screenshots and the code.
There is a forum thread at https://www.mql5.com/ru/forum/160683/page767#comment_10725713
You might get help there faster.
Sincerely, Vladimir.