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

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
Hi. Can you explain to a sucker how to initialise a structure array? For a normal array, it's simple
int HiddenFunc[3,2] = {1,2,3,4,5,6};
But what about the array of structures? Initialize an array with this structure, for example
struct MODE_KEY {string Key; bool Act;};
just like classes:
https://www.mql5.com/ru/docs/basis/types/classes
or arrays)
Hello.
testing owls. (the code is attached below).
owl uses martingale based on previous order history (if loss, then multiply the lot by the martin coefficient...).
the previous order was closed by a stop with e.g. 0.2 lot at (Martin = 2...). then I switch off "auto-trading" in the MT4 terminal, or switch off the terminal completely and the owl stops trading.
Then when I switch on the "auto-trading" button - Then the owl switches on and opens the next lot with a volume of 0.4.
So, how to correct the code, so that when you turn off "auto-trading", turn off the terminal and then turn it on, the owl starts the next trading session with the starting lot,
specified in the settings (e.g. 0.01) rather than multiplying the last closed one in the history?
Hello.
testing owls. (the code is attached below).
owl uses martingale based on previous order history (if loss, then multiply the lot by the martin coefficient...).
the previous order was closed by a stop with e.g. 0.2 lot at (martin =2...) then I switch off "auto-trading" in the MT4 terminal or switch off the terminal completely and the owl stops trading.
Then when I switch on the "auto-trading" button - Then the owl switches on and opens the next lot with a volume of 0.4.
So, how to correct the code, so that when you turn off "auto-trading", turn off the terminal and then turn it on, the owl starts the next trading session with the starting lot,
specified in the settings (e.g. 0.01) rather than multiplying the last closed one in the history?
You create a global variable
and then if there are no open/closed orders later "Start"
You create a global variable
and then if there are no open/closed orders later "Start".
Thank you.
I'm not good at this yet. I already have a datetime OpenTime; - should it be replaced withdatetime Start or in addition?
"If there are no open/closed orders later than "Start "Lots=Lot;" - is it not clear where to put it?
Thank you.
I'm not good at this yet. I already have datetime OpenTime; - should it be replaced withdatetime Start or in addition?
"and then if there are no open/closed orders later "Start "Lots=Lot; " - it's not at all clear where to refer to?
Describe in a nutshell what you want from this EA (the logic of its work),
I think you have a lot of unnecessary things in your code or I don't understand something.
Good afternoon. Help with the EA. According to the strategy, if a stop triggered, then the EA should add (the number of points) to the next set takeaway
from the history by ID, but it does not do it for some reason.
What is wrong with the code?
Good afternoon. Help with the EA. According to the strategy, if a stop triggered, then the EA should add (the number of points) to the next set takeaway
from the history by ID, but it does not do it for some reason.
What is wrong with the code?