Please help me improve this EA

 

Here is my EA. It does a few standard things, and a few not so standard things. I’m trying to make it as reliable as possible, but I have reached a point where my limited knowledge of programming makes it very hard to realize some of my ideas. I hope you more advanced Traders/Programmers could take a look at this and offer some advice. I’d really appreciate it if you do so.

Standard Features (which you probably find in any EA):

1. It can place both pending orders and market orders according to where the price is.

2. It allows trading in only one direction at any one time.

3. It’s equipped with standard functions to do StopLoss, BreakEven, TakeProfit and TrailingStop.

4. It integrates a money management method that let’s you decide how much risk you want to take.

5. It has a failsafe mechanism that prevents multiple pending orders by the same EA for the same signal.

6. It shows account information and sever settings when initialized.

Not so Standard Features :-)

1. It gets trading signals by opening and reading a text file.

2. It then sends you an eMail to inform you of the signal, AND, it calls your mobile phone to make sure you are informed.

That’s it, that basically covers what my EA does. Its features are probably laughable to professional programmers/traders, but it’s the best I’ve done so far. And I’m proudly sharing it with you . You can do whatever you want with it, as long as you don’t sell it to make a profit. And hopefully, you can help me improve it.

The Features I’d like to have:

1. A function that tracks status of each order, and records infos such as when pending orders are triggered, when StopLosses are hit, when positions are closed out etc. I’d like my EA to know exactly what happened to its orders as soon as it’s logged in.

2. A function that enables me to close out an order after a specified length of time since triggered.

3. If possible, a function that enables this particular EA to work with other EAs. For example, if I have three profitable EAs, but I don’t have enough money to trade all of them, so I decide to take the earliest signal by them. It would work like this: if EA1 gives a buy signal first, I go long, and later EA3 gives a sell signal, I take it to exit EA1’s long position, and go short.

Special thanks to Shimodax. The 1st indicator I made was by copying and pasting your existing work. Without studying your codes I couldn’t have learnt enough to program my own.

Special thanks to Codersguru. I’m the kind of person who couldn’t sit in front of a computer screen for long. Your DLL file saved me from having to suffer that. Because of you, I’m able to trade.

Notes: in order to use the email feature, you must have already correctly configured email settings in your MT4.

Notes: For the phone call to work, please refer to the following instructions:

1. You must go to your Network Connections in the Control Panel to create a custom connection named “my_Mobile”.

2. put the two .bat files from the attachment in your C:\Apps folder.

3. Download “cglib.mq4” by Codersguru from http://www.metatrader.info/node/89, you must put it into your \experts\include folder.

4. Connect a phone line to the modem in your computer. The modem must have been properly installed.

5. If you don’t have a phone line or a modem, you can enable the Skype option to make the phone calls, you need to have Skype installed.

6. Enable the “Allow DLL imports” option in your MT4.

Notes: the EA in the attachment is what I’m using to demo test my method right now. but the Indicator is not. It is just a sample that shows you how to write the signals for the EA, in case you don’t know how.

Notes: Because of the nature of this EA, it won’t work in backtesting. And it has not been proved reliable enough to do real trading. Use it at your own risk.

12.13.06

iPlayGames

Files:
myea.zip  7 kb
Reason: