Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 499

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
I didn't open it on the demo.
What's in your EA's log? Did it make an attemptto open a position?
Guys, tell me how to implement the following for example
Guys, tell me how to implement the following point for example
This will not be a pure MQL4. We will need permission to use function calls from DLL. Wouldn't it be better to limit trading in the EA(s) itself under this condition?
I'm addressing you here because I couldn't find an answer on the Internet... pardon the pun.
I started to study ...
I downloaded tradingexpert.mq4 Expert Advisor from the tutorial https://book.mql4.com/ru, I wanted to try and feel it
I have noticed that orders are opened on almost every bar, not on the MA crossing condition
Or am I wrong?
If i'm right, how to make the order open on the current bar (and close the opposite one) only when the previous bar has a crossover in comparison with the one preceding it
====
if such a discussion has already taken place, please kick me in the right direction
This will no longer be pure MQL4. It will require permission to use function calls from the DLL. Isn't it better to limit trading in the Expert Advisor(s) itself under this condition?
I want the button to be released, for example, the robot closed the series at stop loss, the button was released and the robot does not trade anymore, I came home and looked at it, but there was no problem.
I would like the button to be pressed, for example, the robot closed the series at stop loss, the button was pressed and the robot no longer trades, I came home and looked, but there was no problem, I estimated, analyzed the market, pressed the button again and the robot started trading again
The robot will not trade if you prohibit it from doing so in the code. The release of the Automated Trading button is nothing but firing a cannon over a bird's eye. If you really want to make a drastic decision, delete the robot from the chart using ExpertRemove() function.
The robot will not trade if it is forbidden to do so in the code. To uncheck the AutoTrade button is to shoot with a cannon over a sparrow. If you really want a radical solution - remove the robot from the chart, function ExpertRemove().
If I wanted to trade as an example, there are many other algorithms that would work well with this button, spread widened, the button is pressed, I get a message on my phone that the robot is stopped or 4 robots are trading on the account, the 5th one controls the account margin, as the margin falls to the set value, we cut off auto-trading and all robots suck until I come and look what and where is going down in drawdown .But the removal of a robot from the chart is a cannon against a rabbit... The button is a complex solution that allows you to kill all the robots by a predetermined algorithm.
I saw a solution for mql5 somewhere, but can't find it
Guys, advise how to implement the following point for example
I also need to disable auto-trading when an EA is running. in my case, if user presses "NO"
What about in your EA's log? Did it try toopen a position?
I forgot to look in the log, it did not try to open an order