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

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 was just giving an example, there are a lot of other algorithms that would be good to have on this button, spread widened, the button was pressed, a text message came to my phone saying that the robot is stopped or there are 4 robots trading on the account, the 5th one controls the account margin, when the margin drops to the set value, we cut off auto-trading and all robots suck until I come and see what and where is going into a 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've seen a solution for mql5 somewhere, but I can't find it.
That's what I said - it's a radical solution. The correct solution is to change the code of the Expert Advisor so that in the case of certain circumstances, it will not perform trading actions and everything connected with them. For example, spread control is elementary:
Well, the AutoTrade button can be pressed/unpressed by emulating Ctrl+E. But, as I said, this is with the help of WinAPI:
Well, the AutoTrade button can be pressed/unpressed by emulating Ctrl+E. But, as I said, this is already using WinAPI:
Thank you! And how can you make a smiley face sad?)
Well, the AutoTrade button can be pressed/unpressed by emulating Ctrl+E. But, as I said, this is with WinAPI:
Exactly, and I thought it's a painfully simple method and I forgot about this library. Thanks, now we can do what we want
Made MQL4 script (code below) that draws rectangles (pic below), but here's the problem. For dashed line STYLE_DOT only width 1 works, and with 2 or more a solid line is drawn. Can you tell me where my mistake is or is there something being hidden from us?
Made MQL4 script (code below) that draws rectangles (pic below), but here's the problem. For dashed line STYLE_DOT only width 1 works, and with 2 or more a solid line is drawn. Can you tell me where my mistake is or is there something being hidden from us?
Have you tried manually drawing and changing the style and thickness? And what conclusion can be drawn from these experiments?
I think I've found the answer. It says here that "Line style. It is only used when line thickness is 0 or 1". This must be the reason why lines of width 2 and more do not work with lines other than solid.
I think I've found the answer. It says here that "Line style. Only used when line thickness is 0 or 1". This must be the reason why lines other than solid lines don't work with a thickness of 2 or thicker.
Exactly right. I've been there too.
Gentlemen, please advise, I took a function from Kim which returns the bar number of the last position opened or -1.
I call this function and write a condition
I have looked through Print and see that this function return -1, at first I thought there was no order but after a while the order reappeared and on the same bar a deal was opened after the stop.