Can not resolve last compiling error: Unbalanced Parenthesis (HELP PLEASE!!)

 

Hello Forum I am a virtual newbie but have managed to adapt some indicators to work the way I want while I start to learn how to code

They all work nicely when applied to the chart individually but I wanted to simplify and just have my indicator draw arrows when the long or short condition were satisfied.

I attempted this, but

Now I can't even get to the point of seeing how well or badly I have achieved this, because I keep getting a single compiling error relating to unbalanced parenthesis at the end of the program,

and after spending hours trying to work out why I am temporarily defeated and need some help.

Would some kind sole telly me where the "unbalance is occurring" I am out of ideas.

Now I have probably broken lots of rules in the way I have put this together, but I thought it would be easier to have minimal variables initially and then add them later.

I am using parts if the MACD and OSMA etc to give me an entry point..........that is if I get it working

Any help would be appreciated

Regards

Dave

(sorry the file is attached in text form for cutting and pasting, this newbie could open it in metaeditor, but not attach the .mq4 file here, not sure why)

Files:
arrowv8.txt  5 kb
 

When you fix the braces, and by the way [ ] are used for arrays . . . you will end up with . . .

'EMA' - function is not defined pullend.mq4 (67, 13)

What is EMA(Close, 12) ?

Reason: