- Error message: 'close' - invalid array access & 'ticket' - variable already defined
- New MetaTrader 5 build 3620: Web Terminal improvements, ONNX support and fast matrix multiplications in MQL5
- help - Have the EA check if there is a position opened or not
Learn to use the </> tool to insert your code please.
-
double fast_ma = iMA(Symbol(), PERIOD_M1, fast_ma_period, 0, MODE_EMA, PRICE_CLOSE, 0);
Why did you post your MT4 question in the MT5 General section 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. The moderators will likely move this thread there soon. -
Please use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
Forum rules and recommendations - General - MQL5 programming forum (2023)
Messages Editor - Brendan van der Merwe: help me with this code it has 2 errors in line 73 and 23Your trade function does not have a closing brace.
void trade() { ⋮ // Check if the conditions for a short trade are met if (fast_ma < slow_ma && rsi < 50 && Bid > lower_band) { <<<< Start of short trade ⋮ bool result = OrderSend(…); if (result) {…} } <<<< End of short trade <<<<<< No end of function.
- OrderSend does not return a bool.
- You have no event handlers

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