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

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
+ several orders explicitly missed their opening price if they were tested by ticks. I attached a screenshot which shows
Try
Removed everything unnecessary...seems to be working as it should
Checked, both on ticks and opening price... RA-BO-TA-ET!!!!
MakarFX, thank you so much!!! It's been 2 weeks since I've been messing around with this puzzle, all to no avail until today. Thank you so much, once again! I have literally a few clarifications left, and I won't keep you any longer, and so much of your time has been spent. Actually, here's what I'm interested in:
1. As far as I understand it, if I want to change the number of "confirmation candlesticks", then I just have to change one number to another in the constant, and that's it?
2. When I run the Expert Advisor, the first SELL order is opened on the first candlestick, even though there were no signals. This means that this very first order is redundant, and the EA should not open a deal immediately at the first order, just because the EA has just been started. How could this be fixed? I have an idea that Init is responsible for this and I should just change it to "false", or delete this Init altogether?
And lastly, if I leave it like this and run it to trade on several currency pairs at once, will it work as it should? Or I have to prescribe something else in the code, so that there would not be any bugs and so on. Especially, if this EA will work on several currency pairs at once?
Actually, that's all I am interested in, but anyway - thanks a lot again! If I would have done it myself, I don't know how much time it would have taken)
Checked, both on ticks and opening price... RA-BO-TA-ET!!!!
MakarFX, thank you so much!!! It's been 2 weeks since I've been messing around with this puzzle, all to no avail until today. Thank you so much, once again! I have literally a few clarifications left, and I won't keep you any longer, and so much of your time has been spent. Actually, here's what I'm interested in:
1. As far as I understand it, if I want to change the number of "confirmation candlesticks", then I just need to change one number to another in the constant, and that's it?
2. When I run the Expert Advisor, the first SELL order is opened on the first candlestick, even though there were no signals. This means that this very first order is redundant, and the EA should not open a deal immediately at the first order, just because the EA has just been started. How could this be fixed? I have an idea that Init is responsible for this and I should just change it to "false", or delete this Init altogether?
And lastly, if I leave it like this and run it to trade on several currency pairs at once, will it work as it should? Or I have to prescribe something else in the code, so that there would not be any bugs and so on. Especially, if this EA will work on several currency pairs at once?
Actually, that's all I am interested in, but anyway - thanks a lot again! If I had tried it myself, I don't know how much time it would take)
1) Yes, these are the values of the number of "confirmation candles" .
2) No, on the first one does not open, only after a given number of "confirmation candles"
3) Change the magik and put it on any pair
It is better to make the magik an external variable
Can you tell me if there is a way to delimit EA settings strings in the terminal so that they cannot be erased? If you write extern string in the code, it allows you to edit the string, and if you accidentally delete it, you have to press "reset" to restore it, but then all the settings are reset. They can, of course, be preserved in a set file, but I'm just curious if it's possible to make a "stone tableau")
Do the ENUM
I'll give it a try, thank you.
I'll give it a try, thank you.