Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1530
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 see. Thank you. Anybody else have any tips?
I learned with you, too.
Just don't be surprised when it stops workingor worksintermittently.
For what reason? Why don't you write down what's wrong?
For what reason? Why don't you tell me what's wrong?
What's with all the harassment?
What's with the hit-and-run?
I see.
Can anyone else tell me what's wrong with it, and the reason it stops working, if indeed something is wrong?
I see.
Maybe someone else can tell me what's wrong there, and what's the reason it stops working if there's really something wrong?
Forum on trading, automated trading systems and strategy testing
Any questions from newbies on MQL4 and MQL5, help and discussion of algorithms and codes
Igor Makanu, 2021.07.05 14:16.
because the indicator is not yet calculated.
https://www.mql5.com/ru/docs/series/barscalculated
the OnInit() section is not the best place to get the terminal environment, I think it works logically and correctlyHere's the answer.
Thank you.
I need it to do the history calculations immediately on startup. I'm doing it in the inite because I need it that way.
I added a pause in the init, before calculations. If so, are there still some pitfalls?
It is necessary to make calculations on the history at the startup. I do it in the inite because I need it that way.
I added a pause in the inite, before calculations. If so, there are still some pitfalls?
It is easier and more reliable to put the first start flag in OnTick()
Guys, who is not busy and can look. sketched out an EA on yesterday's indicator but something is not working right. It seems to open trades not based on signals. I've tried to add close orders on the opposite signal but deals are closed then not. I think I have a really good feedback.
For what reason? Why don't you write what's wrong?
Because the developers have written that OnInit() is intended for initialization, not for something else
What will happen - you made a pause to get the indicator values in OnInit() - what will happen if the user switches the TF at the same time?
SZZY: And how would your code behave if you run an EA, then close the terminal and reopen the terminal with an already running EA?