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
Thank you :) Had do adjust two other things aswell and got it to run without any errors :)
HELLO im having the same issue , unexpected end of programm and this same parenthesis problem
if openParenthese conditions closeParenthese
Don't post pictures of code, they are too hard to read.
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor
'unbalanced parenthese' and 'unexpected end of program' on mql5
this is the code:
Please note that the line ... " #include <Trade\Trade.mqh> " is for MQL5 not MQL4.
Do you know how to code in MQL4?
Also, please edit your post (don't create a new one) and post your code properly ...
TimeHour takes a datetime and returns the hour. Seven (7) is not a dattime.
Be careful with NULL.
You buy at the Ask and sell at the Bid. Pending Buy Stop orders become market orders when hit by the Ask.
Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid / OrderClosePrice reaches it. Using Ask±n, makes your SL shorter and your TP longer, by the spread. Don't you want the specified amount used in either direction?
Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask / OrderClosePrice reaches it. To trigger close at a specific Bid price, add the average spread.
MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25
The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (control+O) → charts → Show ask line.)
Most brokers with variable spreads widen considerably at end of day (5 PM ET) ± 30 minutes.
My GBPJPY shows average spread = 26 points, average maximum spread = 134.
My EURCHF shows average spread = 18 points, average maximum spread = 106.
(your broker will be similar).
Is it reasonable to have such a huge spreads (20 PIP spreads) in EURCHF? - General - MQL5 programming forum (2022)
You posted in the MQL4 section but mention MQL5 — which is it — MQL4 or MQL5?
Except for the include, your code is mostly MQL4 (trade functions), not MQL5.
It is important that you learn to style your code properly and not have so much empty space. Use the built-in code styler in MetaEditor to help you with this.
Pride in making your code look "beautiful" helps to be able to read it more easily and find errors in your code and logic ...
However, now that the missing brace has been fixed, you now have to fix all the other errors ...
Code Error generated by the coded copied into MQL4 editor are as follows..;' - unexpected end of program & unbalanced parentheses - Kindly see assist in fixing this errors - See detail source code below:
<Incorrectly posted code deleted>