Hello everyone!!! Please tell me how can I copy values from an array into the database? Here is the code from the example of working with the database and when I try to insert data from the array into the database in the SALARY field, I get an error when running the script. And another question, and if for example I have an array with the data of orders and there are quite a lot of them, how can I move all this array into a table in the database?
The robot has two filters: Stochastic and RSI, each with a set of parameters. Only one filter should be used. I.e. if Stochastic is on, RSI should be off and vice versa.
Now I have done this:
I made input variables for Stochastic and RSI, enabling and disabling their work.
In the OnInit block I check, if Stochastic and RSI are on at the same time, the error INIT_PARAMETERS_INCORRECT.
In the OnInit block I check if Stochastic is switched off, then all its parameters must be zero, otherwise the error INIT_PARAMETERS_INCORRECT/ Similarly with RSI.
Objective:
Not to waste time when optimising for incompatible choices. For example, so that if RSI is selected, Stochastic parameters (size of overbought/oversold zones, K, D periods, deceleration, smoothing method, price) are not searched.
It turns out that my option doesn't work. During optimisation these variants seem to be over-optimised anyway, which affects the final result of the optimisation.
Please advise how to make the optimiser not to search Stochastic parameters when RSI is enabled and vice versa.
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.
Hello everyone,
I'm new so I hope I'm writing in the right place: I'm looking to code an EA that could help me with my money management, like :
"close all trades when past losses+current drawdown are below x%" + "close all trades immediately until end of session/day".
If anyone knows how to do this or can help me it would be great to get in touch.
Thanks, trade well ;)
Hello,
Try searching the market for ready-made solutions - https://www.mql5.com/fr/search#!keyword=money%20management&module=mql5_module_market
You can also order a customised solution from Freelance - https://www.mql5.com/fr/job
Try doing it this way, for example.
Instead of
write
This is not the only way.
Try doing it like this, for example.
Instead of
write
It's not the only way.
Thank you! It works. Where can I read about it? And other ways?
I need to change it so that it creates not just one character, but several characters that are written in the script.
For example, three AB AC AD, in the future any number of this principle.
Cycle with substitution of the next symbol name from the list each time.
Something like:
I did this before, thought I had done it and deleted my post.
When I refreshed the page I saw that you had replied. Yes, the error handling is more correct. Thanks!
ArraySize(arr)It would be more correct to define in ushort outside the loop
it would be more correct to define in uint outside the loop
I often do this, but I still want to believe that the compiler can optimise such standard things.
The robot has two filters: Stochastic and RSI, each with a set of parameters. Only one filter should be used. I.e. if Stochastic is on, RSI should be off and vice versa.
Now I have done this:
Objective:
Please advise how to make the optimiser not to search Stochastic parameters when RSI is enabled and vice versa.
Just in case, it is easier to write them in one line, as I have shown, than an array of separate lines.