Hi
i am trying to code a very simple EA but i'm not a programmer and i've never made an EA before.
I took the MACD Sample from MT4 and edited some parts and deleted all the rest that i thought i don't need.
I'm sure my code is really horrible
I would like the EA to work like this:
My custom indicator ELine has two lines that move in steps. Sometimes one is higher than the other, sometimes they are the same.
When one line crosses the other i would like the EA to enter a long position or a short position, depending on which line crosses up.
There is always an open position, except on start of the EA.
When i try to compile it it says "if" - semicolon expected (20,7)
Then in the next step it should always close an already existing position when it opens a new one but i couldn't code this so far.
Could somebody please correct the errors in my code and maybe tell me how i can close the positions any time the EA enters a new one?
Thanks a lot!