Trabalho concluído
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Termos de Referência
'm looking for a trading robot to operate on mt4 to execute buys and sells mainly for GBP/USD but could be used for any forex.
This is automating a system that i have been manually working from for a while.
There is one system for a Bullish Trend and one for a Bearish Trend
The system is as follows.
BULL TRADE
So,
IF, H1 EMA 8 > EMA 21 FOR MORE THAN 5 HOURS (#5 CANDLES)
AND, 5M EMA 8 > EMA 13 > EMA 21 FOR 25 MINS (#5 CANDLES)
AND, PRICE ABOVE EMA 8 (#H1 TIMEFRAME)
AND, PRICE ABOVE EMA 8 (#5M TIMEFRAME)
SET BULL STATUS TO 1
IF, PRICE BELOW EMA 21 (5M TIMEFRAME)
RESET BULL STATUS TO 0
IF, BULL STATUS =1
AND, CROSSES (DOWN) EMA 8 (#5M TIMEFRAME) (#THIS IS CALLED THE TRIGGER CANDLE)
SET ORDER TO BUY @ 3 PIPS ABOVE HIGHEST PRICE OF LAST 25MINS (#5 CANDLES)
SET STOP LOSS @ 5 PIPS LOWER THAN THE LOWEST PRICE OF THE CANDLE AT WHICH THE PRICE CROSSED THE EMA 8 (#TRIGGER CANDLE)
SET TAKE PROFIT 1 OF 50% AT 15 PIPS
SET TAKE PROFIT 2 OF 50% AT 30 PIPS
IF, BULL STATUS = 0
CANCEL BULL TRADE
BEAR TRADE
So,
IF, H1 EMA 8 < EMA 21 FOR MORE THAN 5 HOURS (#5 CANDLES)
AND, 5M EMA 8 < EMA 13 < EMA 21 FOR 25 MINS (#5 CANDLES)
AND, PRICE BELOW EMA 8 (#H1 TIMEFRAME)
AND, PRICE BELOW EMA 8 (#5M TIMEFRAME)
SET BEAR STATUS TO 1
IF, PRICE ABOVE EMA 21 (5M TIMEFRAME)
RESET BEAR STATUS TO 0
IF, BEAR STATUS =1
AND, CROSSES (ABOVE) EMA 8 (#5M TIMEFRAME) (#THIS IS CALLED THE TRIGGER CANDLE)
SET ORDER TO BUY @ 3 PIPS BELOW LOWEST PRICE OF LAST 25MINS (#5 CANDLES)
SET STOP LOSS @ 5 PIPS HIGHER THAN THE HIGHEST PRICE OF THE CANDLE AT WHICH THE PRICE CROSSED THE EMA 8 (#TRIGGER CANDLE)
SET TAKE PROFIT 1 OF 50% AT 15 PIPS
SET TAKE PROFIT 2 OF 50% AT 30 PIPS
IF, BEAR STATUS = 0
CANCEL BEAR TRADE