My script successfully compiles without any errors but won't submit a trade in the strategy tester, and my print function doesn't return a value. - page 2

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
This is a messy mixture of MQL5 and MQL4 code. It certainly looks like horribly generated code.
Did I not say not to ask for help with A.I. generated code?
It is a total mess. It cannot be fixed. It has to be properly written from scratch.
Either learn to code MQL5 properly, or hire someone to code it for you.
What elements of it are MQL4 in your opinion? I did follow instructions from a tutorial from Rene Balke, "Master MQL5 Programming (Complete all in one guide)" on YouTube.
Here are a few examples of a complete mix of MQL4, MQL5, and others that make no logical sense ...
All of the i???() Indicator functions in MQL5 return Indicator handles that should then be used with CopyBuffer(). They do not return buffer values directly as they do in MQL4.
Please refer to the MQL5 documentation of these Technical Indicator functions. I highly recommend you also read the MQL5 programming for traders - Book on MQL5.com
What elements of it are MQL4 in your opinion? I did follow instructions from a tutorial from Rene Balke, "Master MQL5 Programming (Complete all in one guide)" on YouTube.
you're very lucky to get, even that response from a moderator -- HAHAHA
...and if you learnt to code that from someone, then, that trainer does not know more about coding than you do; OR, you did not listen and watch very much; and need to go watch the video more closely.
youtube is good for learning trading and even finding good strategies; but for learning to code, use the mql4/5 online help and online documents, as well as the help files in metaeditor.
Download many indicators and eas on codebase and learn what each line does by searching for code/words on this website, and then, you will be able to modify your own, or even create your own.
you're very lucky to get, even that response from a moderator -- HAHAHA
that's true, and these topics with AI code were getting deleted straight away before
Forum on trading, automated trading systems and testing trading strategies
Deleted topic "4804 Error code for Momentum, CCI, RSI and moving average indicators"
Your code is still riddled with errors and you are still calling the indicator functions as if they would return buffer values (which they don't). There are just too many errors and incorrect logic for us to offer you any specific guidance.
You need to seriously make the effort to study MQL5 properly. Read the MQL5 programming for traders - Book on MQL5.com, and study code examples in the CodeBase. Start with a small simple project and slowly build on it.
And if you are not willing to do that, then hire someone in the Freelance section to code it for you.
Your code is still riddled with errors and you are still calling the indicator functions as if they would return buffer values (which they don't). There are just too many errors and incorrect logic for us to offer you any specific guidance.
You need to seriously make the effort to study MQL5 properly. Read the MQL5 programming for traders - Book on MQL5.com, and study code examples in the CodeBase. Start with a small simple project and slowly build on it.
And if you are not willing to do that, then hire someone in the Freelance section to code it for you.
Do you really think that programming is that easy? Just because it compiles, you think it is all correct?
Are you not here asking for help because it still does not work, even after it compiles?
I repeat ...
You need to go back to start, and begin with the basics. Start with a very small and simple program.
Study the examples in the CodeBase, and read the MQL5 book already mentioned, while referencing the documentation.
Do you really think that programming is that easy? Just because it compiles, you think it is all correct?
Are you not here asking for help because it still does not work, even after it compiles?
I repeat ...
You need to go back to start, and begin with the basics. Start with a very small and simple program.
Study the examples in the CodeBase, and read the MQL5 book already mentioned, while referencing the documentation.