Please advise how to write it nicely. So as not to duplicate code arrays. The Expert Advisor uses 2 indicators. and conditions for order opening look like this now:
But I would like to add filter Use or not use 1 or 2 indicators Only I don't know how to implement it more correctly. It would look like this:
That I can disable 1 indicator or a second indicator in the settings. Can't figure out how to do it without copying a lot of code.....
One disadvantage - if all indicators are disabled, the signals always exist. If it is important, you can make check in inite and prohibit start of expert. But more often there is one indicator that is not disabled, so there are no problems.
One disadvantage - if all indicators are disabled, there are always signals. If it is important, you can do a check in the inite and disable the EA. But more often there is one indicator that is not disabled, so there are no problems.
It is solved by initialisation of variables buy1, sell1, buy2, sell2
First you have to have a successful trading system, and then, if you don't have anything to do, you can make it nice and tidy ... if you want to...
How many attempts will be made - thousands, tens of thousands, as luck would have it...
But it is far from certain that it will happen.
That is why "nice" brain load at the initial stage of developing a trading system is of no use at all.
And eloquent comments, without any successful trading, on the subject of "do as I do" or "look how I can program" are nothing more than flirting that has absolutely no value in the financial market.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Please advise how to write it nicely. So as not to duplicate code arrays.
The Expert Advisor uses 2 indicators.
and conditions for order opening look like this now:
But I would like to add filter
That I can disable 1 indicator or a second indicator in the settings.Use or not use 1 or 2 indicators
Only I don't know how to implement it more correctly.
It would look like this:
Can't figure out how to do it without copying a lot of code.....
One disadvantage - if all indicators are disabled, the signals always exist. If it is important, you can make check in inite and prohibit start of expert. But more often there is one indicator that is not disabled, so there are no problems.
One disadvantage - if all indicators are disabled, there are always signals. If it is important, you can do a check in the inite and disable the EA. But more often there is one indicator that is not disabled, so there are no problems.
It is solved by initialisation of variables buy1, sell1, buy2, sell2
This is all a kind of eloquence.
First you have to have a successful trading system, and then, if you don't have anything to do, you can make it nice and tidy ... if you want to...
How many attempts will be made - thousands, tens of thousands, as luck would have it...
But it is far from certain that it will happen.
That is why "nice" brain load at the initial stage of developing a trading system is of no use at all.
And eloquent comments, without any successful trading, on the subject of "do as I do" or "look how I can program" are nothing more than flirting that has absolutely no value in the financial market.
;)