Please EDIT your post and use the CODE button (Alt-S) when you insert code in your post.
Thank you.-
double macdLine = iMACD("EURUSD", PERIOD_M1, 12, 26, 9, PRICE_CLOSE, MODE_MAIN, 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. -
Do not post code that will not even compile.
void OnTick(void) { double macdLine; double signalLine; double macdHist; 0 <<<<<<<<<<<<<<<<<<<< OnTick not closed. int start() {
-
Use the modern event calls. Do not mix them.
Event Handling Functions - MQL4 Reference
How to do your lookbacks correctly - MQL4 programming forum #9-14 & #19 (2016)
-
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. -
Do not post code that will not even compile.
-
Use the modern event calls. Do not mix them.
Event Handling Functions - MQL4 Reference
How to do your lookbacks correctly - MQL4 programming forum #9-14 & #19 (2016)
Hi William,
Thanks for the reply.
I am new to all this and don't know the reason it is not compiling.
Just wanted help to fix the code I posted above.
Thanks
I get unexpected end of program and unbalanced parentheses on the below code
Can someone help with this?
void OnTick(void) { double macdLine; double signalLine; double macdHist; } int start() { macdLine = iMACD("EURUSD", PERIOD_M1, 12, 26, 9, PRICE_CLOSE, MODE_MAIN, 0); signalLine = iMACD("EURUSD", PERIOD_M1, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, 0); macdHist = iMACD("EURUSD", PERIOD_M1, 12, 26, 9, PRICE_CLOSE, MODE_HIST, 0); if(macdLine > signalLine + 0.0008) { OrderSend(Symbol(), OP_BUY, 1.0, Ask, 3, Bid - (40 * Point), Bid + (macdLine - signalLine), NULL); } else if(macdLine < signalLine - 0.0008) { OrderSend(Symbol(), OP_SELL, 1.0, Bid, 3, Ask + (40 * Point), Ask - (signalLine - macdLine), NULL); } return(0); }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I get unexpected end of program and unbalanced parentheses on the below code
Can someone help with this?