Hello guys. I am having a problem compiling this code. When I leave out the closing parenthesis I get only two errors. But when I include it I get 26 errors. Could you please help me by going through it and highlight for me anything that I may have missed? thanks! PS. "Createtline" is a function to create trendlines.

Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
- www.mql5.com
//| Expert initialization function | //| Expert deinitialization function | //| Expert tick function | //| test1 |...
- Coding Help Please ! EA with TakeProfit needs to be on middle BB.
- ObjectSetInteger ERROR in MQL5..any advice please?
- how to solve ',' - open parenthesis expected error in MQL5 ?
The Createline() Function is missing.
Your missing one parenthesis to close OnTick() Function.

Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
- www.mql5.com
//| Expert initialization function | //| Expert deinitialization function | //| Expert tick function | //| test1 |...
Marco vd Heijden:
The Createline() Function is missing.
Your missing one parenthesis to close OnTick() Function.
The Createtline function is at the top of the EA in an include file.
Without the closing parenthesis, I get only two errors, as in the first picture below.
With the closing parenthesis, I get the errors as in the second picture.
Files:
the_second_picture.png
46 kb
You have to close the OnTick() function.
Use the styler.
//+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void OnTick() { Anotherbar PlusOne; bool onenewbar=false; onenewbar=PlusOne.checknewbar(_Symbol, _Period); if (onenewbar==true) { //For the upper sqrts double onedayago = rates[1].high; double highfactor=onedayago+(MathSqrt(MathSqrt(onedayago))); string Trend="Higher root. Actual high= ("+rates[2].high+")"; double twodaysago=(rates[2].high)+MathSqrt(MathSqrt(rates[2].high)); Createtline(Trend,rates[2].time,twodaysago,rates[1].time,onedayago); //For the lower sqrts double yesterperiod = rates[1].low; double lowfactor=yesterperiod+(MathSqrt(MathSqrt(yesterperiod))); string Trendname="Lower root. Actual low= ("+rates[2].low+")"; double yesterperiodbutone=(rates[2].low)+MathSqrt(MathSqrt(rates[2].low)); Createtline(Trendname,rates[2].time,yesterperiodbutone,rates[1].time,yesterperiod); } } //+------------------------------------------------------------------+

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