Add the const specifier to the function parameter where you pass the close[] array
void FindPattern(const double &close[]) { }
[EDIT]
Forum on trading, automated trading systems and testing trading strategies
solve '*' - open parenthesis expected error
Vladislav Boyko, 2024.09.11 23:46
Sorry, but I can't fix the code you generated using AI.
-
//| patornes.mq4 |
Why did you post your MT4 question in the MT5 General section (a miscellaneous catch-all category) instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. I have moved this thread. - Gustavo Adolfo Ortega Osorio: ?. I cant find run it.. show error 'close' - constant variable cannot be passed as referenceYou passed it, which you do not show. Your function does not take a const array.
int OnCalculate(…, const double &close[],…) FindPattern(close, 0, len, currentPattern);

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
Someone can fix this code please?. I cant find run it.. show error 'close' - constant variable cannot be passed as reference
Thanks