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

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
Good afternoon.
The Expert Advisor is supposed to check the conditions and open orders when a new bar appears.
I got the error "function declarations are allowed on global, namespace or class scope only". Translated it into "function declarations are allowed on global, namespace or class scope only".
I still don't understand it, I am too dumb. Please tell me or tell me where to read. Thanks in advance).
First of all, make sure you place the code correctly so it's readable.
There's a function for posting code like this, it's easier for everyone to read your code to help.
Buba_rus:
Still don't understand anything, dumbass. Please tell me or tell me where to read it. Thanks in advance!
Where did this piece of code come from? I need the whole code to see the error.
First of all, make sure the code is properly posted so it's readable.
There's a function for posting code like this, making it easier for everyone to read your code to help.
Where are you getting it from?
It's not all code again... it's up to you.
here are the errors
Where is this piece of code from? You need all the code to see the error
I did not immediately see and did not understand that I had to discard the entire Expert Advisor.
I did not immediately see and did not understand that I had to discard the entire Expert Advisor.
I highlighted what was wrong
yellow highlighted unnecessary, you can delete
the function highlighted in green must be outside of OnStart(),
where you need to define a new bar , use the highlighted brown
Hello. Happy holidays to everyone and good luck in the new year.
The Expert Advisor trades on DeMark points, using a simple indicator on these points. I would like to ensure that the data on the points would be saved when the terminal is shut down. And on startup, the Expert Advisor could use the saved data and then work according to the program. Is it possible? I understand that this can be done using a function like FileOpen(). I have never done it. Please advise how to do it correctly. Here are a couple of functions to calculate the price of two points. The others are similar. How to save the data of these functions.
Hello. Happy holidays to everyone and good luck in the new year.
The Expert Advisor trades on DeMark points, using a simple indicator on these points. I would like to ensure that the data on the points would be saved when the terminal is shut down. And on startup, the Expert Advisor could use the saved data and then work according to the program. Is it possible? I understand that this can be done using a function like FileOpen(). I have never done it. Please advise how to do it correctly. Here are a couple of functions to calculate the price of two points. The others are similar. How to save the data of these functions.
I would add to the Expert Advisor the creation of objects on DeMark points and use these objects for trading
I would add to the Expert Advisor to create objects according to DeMark points and trade on these objects
Thank you for your reply. But if I'm not mistaken, your tip concerns MQL5. My EA is based on MQL4.
I'm not a programmer, an amateur, for myself.Thank you for your reply. But if I'm not mistaken, your advice concerns MQL5. My EA is in MQL4.
I am not a programmer, amateur, for myself.mql4 is also possible here