Job finished
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specification
Basic Trading Requirements/Specs:
The basic premise of this trading system is based off signals that are sent to my email. Once a signal is received the EA will execute trades from the criteria on the signals in the email. I will be running this EA on MT4.
My email address that is receiving these signals is a Yahoo account.
Here is an example of how the signal will be formatted every time.
As you can see it outlines the following information which will be very important for this system:
1. Pair being traded
2. BUY or SELL order
3. Timeframe of the trade (ie M15 in this instance)
4. STOP level & TP level
5. Last spotted price level
Sometimes there are multiple signals sent in one email and I would like to have this EA be able to process all the signals successfully as shown below. This happens very seldom but does occur occasionally.
These signals will all come from the following email address:alerts@ragingfx.com
There will be two different subject lines depending on which system is sending the signals, but these are the only two subject lines that will be associated with a signal and this is how I would like to be able to have the script determine this is a valid signal to input into the MT4:
1. HP3-RagingFX Alert!!!
2. MNR-RagingFX Alert!!!
Once a signal is received, I would like the following to happen:
1. A market order based on the price point mentioned in the LAST column is entered for the pair specified in either a BUY or SELL which will be outlined on the signal. I would like this to be an “if then” function around the LAST price as follows:
a. If the signal is a BUY and the current price is below the LAST price, then a market entry is to be taken otherwise a limit is to be entered at the LAST price mentioned in the signal.
b. If the signal is a SELL and the current price is above the LAST price, then a market entry is to be taken otherwise a limit is to be entered at the LAST price mentioned in the signal.
2. A limit entry is to be entered at the 10-day Exponential Moving Average on PRD specified with the signal - CURRENTLY THIS IS NOT FUNCTIONING PROPERLY
3. The STOP and TP levels are entered based on the criteria specified in the signal.
4. Sizing for each position is to be based upon a max risk of 0.5% from the STOP level of the total account balance – I would also like to be able to adjust this percentage as well depending on market conditions. Can we make this is a variable box which can be adjusted in the EA?
5. In the event a limit order is not triggered due to price action not pulling back enough, I would like the limit order to delete upon the TP level being breached and the market order being closed out as the signal is no longer valid - CURRENTLY THIS IS NOT FUNCTIONING PROPERLY
No trades are to be held over the weekend with this trading model. If a trade is still open on Friday I would like them all to be closed out 1 hour prior to the close of the market at 23:00 GMT-5 on Fridays only. Otherwise, it is okay for trades to run their course as the only means of exiting a trade is either through the TP or STOP being executed or the markets being closed for the weekend.
This company also sends out a daily dashboard at the close of the trading day recapping all the signals and the outcome of each and want to ensure that this EA does not interpret this as new signals. The subject line on the email from them for the dashboard results will read “RagingFX Daily Dashboard”. Anytime a new signal is issued the email will always read “RagingFX Alert!!!”.