View Single Post
  #1 (permalink)  
Old 01-12-2006, 10:39 AM
eric79 eric79 is offline
Senior Member
 
Join Date: Dec 2005
Posts: 217
eric79 is on a distinguished road
Need help with coding an EA

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!
Attached Files
File Type: mq4 EL1.mq4 (1.4 KB, 31 views)
Reply With Quote