Features of the mql5 language, subtleties and tricks - page 267

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
In MM calculations, consider this possibility.
Do you think they give loans to everyone?
Do you think they give loans to everyone?
And if they do? But it is not accounted for...
Then in the topic about MQL5 language peculiarities you should simply inform that the credit is not included in the balance and when writing code according to the order you should consider the total balance as the sum of balance and credit. And not with such a picture.
Then in the topic about MQL5 language peculiarities you should simply inform that the credit is not included in the balance and when writing code by order you should consider the total balance as the sum of balance and credit. And not with such a picture.
Why not a picture?
It leads to exactly this conclusion: "credit is not included in the balance and when writing the code you should consider the total balance as the sum of balance and credit".
Why not a picture?
It leads to exactly this conclusion: "credit is not included in the balance and when writing the code, we should consider the total balance as the sum of balance and credit".
Because many people, like me, do not immediately pay attention to the credit. How can the equity be greater than zero if the balance is 0? I looked, closed the topic without understanding anything. And only after a couple of minutes I opened it again in an attempt to understand. And someone may not even try to understand, but just stupidly claim, referring to the authority of fxsaber`a, that it happens. Unfortunately, there are a lot of such people.
Because many people, like me, do not immediately pay attention to the credit. How can the equity be greater than zero if the balance is 0? I looked, closed the topic without understanding anything. And only after a couple of minutes I opened it again in an attempt to understand. And someone may not even try to understand, but just stupidly claim, referring to the authority of fxsaber`a, that it happens. Unfortunately, there are a lot of such people.
Logical. But not convincing. After all, there are those who read diagonally too ;)
A programmer who reads diagonally is a shit coder. That's my opinion. Code and code discussion are not "The Three Musketeers", you should get into such a text and understand what is written.
That's all. Artem, sorry, let's not clog the topic with unnecessary arguments.
A programmer who reads diagonally is a shit coder.
And the one who looks past it?
let's not clog the topic with unnecessary arguments.
Good
Forum on trading, automated trading systems and testing trading strategies
Errors, bugs, questions
fxsaber, 2024.09.23 19:07
Let's say you open a position by the Q key.
To prevent this from happening, solutions have been given.
The problem of ignoring random ChartEvent events. It has been solved.
Simulation of the problem.
Forum on trading, automated trading systems and testing trading strategies.
Bugs, bugs, questions
fxsaber, 2024.09.23 09:13 AM
This Expert Advisor does calculations at the press of a key. How can I modify the Expert Advisor so that repeated keystrokes during calculations will not cause repeated calculations?
This is the log when I pressed the key twice (without interruption). You can see that the second calculation was started after the calculation.
Solution1.
Forum on trading, automated trading systems and testing trading strategies.
Errors, bugs, questions
fxsaber, 2024.09.23 09:35 PM
Unfortunately, this is the only solution that came to mind.
Solution2.
Forum on trading, automated trading systems and testing trading strategies
Errors, bugs, questions
Aleksandr Slavskii, 2024.09.23 11:00 AM
Yes, according to your hint, it seems to work))))
Task simulation.
Solution1.
Solution2.
The second time the button will be pressed at the time when the instructions after the call will be executed
but before the exit from the current OnChartEvent call (the same Print will not even start executing yet), and, by the law of meanness, it is then that all the conditions for the most unfavourable scenario)))) will be created. Bingo!!! It will be an epic and instructive fiasco))))))
Question: who will be to blame?
Answer: the one who uses asynchronousness in the combat code, poorly realising the depth of possible depths and the pain that lives there.
This is so that everyone can understand how it will be (click the copka after Calculated appears):
Somehow this is how it should be: