Trabalho concluído
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Termos de Referência
SMA20: Simple Moving Average 20 periods, line type
SMA10: Simple Moving Average 10 periods, line type
[edit]: SMA200: Simple Moving Average 200 periods, line type
Gan Hi Lo Activator 10: Gann High Low Activator 10 periods, colored red for down and green for up. (I don´t have the code)
These rules must be applied to the 15M and 5M timeframes at the same time. If one of the timeframes does not agree with these rules at the same time, the trade will not be taken.
[edit]: the buy/sell order should be made at least 40 points ahead of the CLOSE price that triggered our entry, to make sure our order gets fullfilled by the market. This one I want to be able to input as a parameter.
Buy rules:
- SMA20 must be higher than last candle SMA20 = [ SMA20(0) > SMA20(-1) ]
- SMA10 must be higher than last candle SMA10 = [ SMA10(0) > SMA10(-1) ]
- SMA10 must be higher than SMA20 = [ SMA10(0) > SMA20(0) ]
- CLOSE of actual 5M candle must be higher than CLOSE of last candle = [ CLOSE(0) > CLOSE(-1) ]
- CLOSE of actual 5M candle must be higher than the last 15M Candle CLOSE = [ 5MCLOSE(0) > 15MCLOSE(-1) ]
- Gann Hi Lo Activator of 10 periods going UP
Sell Rules:(opposite of buy rules)
- SMA20 must be lower than last candle SMA20 = [ SMA20(0) < SMA20(-1) ]
- SMA10 must be lower than last candle SMA10 = [ SMA10(0) < SMA10(-1) ]
- SMA10 must be lower than SMA20 = [ SMA10(0) < SMA20(0) ]
- CLOSE of actual candle must be lower than CLOSE of last candle = [ CLOSE(0) < CLOSE(-1) ]
- CLOSE of actual 5M candle must be lower than the last 15M Candle CLOSE = [ 5MCLOSE(0) < 15MCLOSE(-1) ]
- Gann Hi Lo Activator of 10 periods going DOWN
Exit rules:
The default exit for both rules will be when the CLOSING price of the 5M candle is bellow the Hi Lo of the last candle.
Need to be able to input and optimize the periods parameters of the SMA20, SMA10 and HiLo10.
Need to input time of trading interval (default will be 9:05 to 17:30).
Need to input a Stop Gain in points, default will be 100 points.
[edit]: the Stop Gain will start counting from the candle CLOSE that triggered the entry. For example: the CLOSE price that triggered our entry was 50100, but our sell order was fullfilled at 50090. Our Stop Gain should be put at 50000, not 49090.
Need to input if there´s gonna be a Stop Loss and how many points will it be.
[edit]: will be trading futures. Need to be able to input lot size.
[edit]: will be trading at least 4 different symbols.
If there´s anything else that needs to be described, let me now.
Also provide the EA´s source code.