Learning and writing together in MQL5 - page 28

 
You don't have to. It's just that your product won't be popular with this attitude. The point is that this thread is called"We study and write together in MQL5". In fact, it's not an appropriate name at all. I was so excited by new features of MQL5... But the result is "wipe your headlights off" and get lost. The code is too complicated for a child to figure out. I thought they would rub my nose in inaccuracies and everything would be OK. Well, I'll do it myself.
 
Khomtchenko:
You do not have to. Your product simply will not be popular with such an attitude.

There is no need to translate your own self-deception to others. You are really too lazy to do a post-production analysis and understand what the issue is.

I recommend you to read a lot of articles in the corresponding section - this is not the first year we deal with mass (hundreds of thousands of traders all over the world) education of traders in the field of automated trading. That is why we have created multilingual MQL4.community and MQL5.community where we collect/create a lot of free material and give opportunity to learn.

Unfortunately, you will find standard and quite simple trading mistakes that no novice trader can pass. In vain you ignore the repeatedly given instructions on what exactly should be checked.

Accurate advice has been given. You need to understand that no one will understand the standard and simple mistakes that have been made for you.

 
In MT4, the report is very clear. In MT5 even the transaction history does not reflect the profit margins of the trades. When testing, the reports are also so unclear, that it is not clear what was the lot, what was the profit, etc. I will try to analyze it. I am reading the articles. I think the programmers who have created mql5 have created a language that is much easier to use for creating tetris rather than a complex Expert Advisor.
 
Khomtchenko:
In MT4 the report is very clear. In MT5 even the deal history does not show the profit value of trades. When testing, the reports are also so cloudy that it is not clear what was the deal's lot, what was the profit, etc. I will try to analyze it. I am reading the articles. I think the programmers who have created mql5 have created a language that is much easier to use for creating tetris rather than a complex Expert Advisor.

Do you work as an electrician in Belgorod? If not, it's not proper for a scientist husband to complain about a stool that he built with his own hands.

Catch the bug, and then ask what may be the cause of this bug.

I advised you to set the slippage to the level of spread, it may vary from 15 to 30 points for a five-digit EA.

If you set it to 10, 80% of orders may be unfilled and that is quite important for total distortion of statistics.

I don't know if it is the reason but it's worth checking. I don't know your system better than you, there are plenty of people who do, and to motivate you to help, you need at least some visibility from your side that you're trying to do something.

Again, the code shows that you're trying to understand the programming, not to write an EA. The standard class library has classes in which the trading functions have already been implemented. Many have already passed this stage and moved on, using guaranteed working codes and not worrying about how and what works there. That's why nobody is interested in how OrderSend works or how to fill out the request structure.

If you don't know how to fill in the structure of request, you simply should consult the standard library (the last column in the manual).

 
falkov:

In the latest build, constructors with parameters have appeared. Thanks a lot to the developers!

Ahhhh!!! It's here! :)
 

I set the slip to SymbolInfoInteger(spred, SYMBOL_SPREAD). Nothing has changed.

Everything is clear. I will work on my errors. Everybody is smart, all the programmers - I'm nowhere near you. I don't want to use a function I don't know how it works and understand nothing about. I don't find errors in the one I have. If it is a problem to look into the code of my functions, well, this is understandable. I sometimes forget what country I live in and I want a lot from people. I will figure it out on my own - I don't know where I am going.

Maybe I'm wrong, but the context shows some dissatisfaction with their high position of many "helpers". The impression is that they know how to program, but cannot make money on Forex. So they snort at upstarts like me. Maybe I'm very much mistaken. Maybe you have a different problem.

I am not an electrician, but a process engineer, PhD, assistant professor, inventor. But not a programmer.

Electricians, by the way, are quite resourceful people. I mean electricians with higher education. I teach classes to both programmers and electricians at university.

 
Khomtchenko:
In MT4, the report is very clear. In MT5 even the transaction history does not reflect the profit margins of the trades. When testing, the reports are also so murky that it is not clear what was the lot of the deal, what was the profit, etc.
You are out of your depth! I'm speechless! In columns Type, Direction, Volume, Profit 'History of trades' all perfectly clear. You should at least start by reading the service manual (help for the terminal), may be it will become clear in your head.
 

I had a tick there for orders, not trades. I can see that now.

I've got it all figured out, by the way. There really are no problems. It's just the different stats that require me to fine-tune the parameters to suit the new conditions.

But thanks for the support.

 
antt:

1)"stacks in a common queue" is a mistake in the documentation. There are actually many queues. At the moment, each mql5 program and each chart has its own queues. The sizes of the queues are different and are not small in general, overflow of the queue is unlikely for a correctly written program. We will not document the exact size of each queue, their number, or any other detailed description of the internal implementation. The reason here is quite obvious - the internal implementation can change.

OK. I see what about the multiple queues. Let me clarify a question: what is the depth of queue of events specifically for mql5-expert, that uses only two functions in its work - OnTrade() and OnChartEvent()? As of today. Without documentation in the Handbook.
 
Khomtchenko:
No need for that. Your product simply will not be popular with such an attitude. The thing is that the subject is called"We study and write together in MQL5". In fact, the name is not appropriate at all. I was so excited by new features of MQL5... But the result is "wipe your headlights off" and get lost. The code is too complicated for a child to figure out. I thought they would rub my nose in inaccuracies and everything would be OK. Well, I'll do it myself.

To begin with, you need to understand the following things:

1. "Locked" accounting (MT4) and a system using "netting" (MT5) are two big differences. In some respects (for certain trades) the results will be quite different.

2. You need to figure out what exactly you need - an EA for MQL5 trading profitably, an EA that trades exactly like the EA on MQL4 or something else?

If you need an EA that trades profitably, it is an easy task for any beginner, including you (sorry if I'm being biased).

However, if you need an EA that trades exactly like the one on MQL4, there are a lot of nuances and probably only you will be interested in it. As an addition I'll give my opinion in this matter - In this situation you're on the wrong side of the tracks and digging in the wrong place (but even if you start digging in the right place the initiative is punished as always)...

3. The most important thing in this matter is to understand that there is no spoon. But this is a separate topic :).

Khomtchenko:
The report is very clear in MT4. In MT5 even the transaction history doesn't show the profit of the trades. When I test it, the reports are also so unclear what was the deal volume, profit, etc. I will try to analyze it. I am reading the articles. I think the programmers who have created mql5 have created a language that is much easier to use for creating tetris rather than a complex Expert Advisor.
It is very easy to create trading systems in MQL5. So is Tetris :)