工作已完成
指定
Requirements Specification:
In the attached file is the complete specification with images.
It is a requirements specification for the development of the Exponential Moving Average and Three Stochastic Expert Advisor in MetaTrader 5 platform. The expert advisor must work in production and strategy simulator in MetaTrader 5 platform. At this moment, we is working with XM broker but in the future, we could use other broker and the expert advisor must work if the broker works with MetaTrader 5.
Expert Advisor Parameters:
Stop Loss (in pips), Take Profit (in pips), Lots, EMA Period (by default value 20), First Stochastic Period %K (by default value 33), First Stochastic Period %D (by default value 3), First Stochastic Slowing (by default value 3), Second Stochastic Period %K (by default value 5), Second Stochastic Period %D (by default value 3), Second Stochastic Slowing (by default value 2), Third Stochastic Period %K (by default value 8), Third Stochastic Period %D (by default value 5), Third Stochastic Slowing (by default value 3), Telephone Number (by default value 0) (If the telephone number take the value 0, the expert advisor will not send the messages), Number Candles Until Confirmation (by default value 1), InpTrailingStopBeforeBreakEven (in pips), InpTrailingStopAfterBreakEven (in pips), Position Mode (if position mode take the value 1, the positions are opened or closed; if position mode take 0, the positions aren´t opened or closed).
Trading Signals:
Bullish Signal:
Buy signal: The signal candle close above EMA (by default value 20 in configuration parameters) and stoc 33,3,3 (by default values in configuration parameters) < stoc 8,5,3 (by default values in configuration parameters) < stoc 5,3,2 (by default values in configuration parameters). In this point the expert advisor send a telegram message. The confirmation candle close above the signal candle (take the close of the signal candle) and the confirmation candle must have bullish direction. In this point the expert advisor send a telegram message. The parameter Number Candles Until Confirmation is used to indicate the number of candles where the confirmation could be effective. For example, the confirmation signal could give in the next candle of the signal candle or two candles after the signal candle or more. The telegram message (confirmation) will be receive in the first candle that accomplish the conditions. The signal candle must be invalidated when we have not confirmation candle in the next candles (Number Candles Until Confirmation) or if we have not confirmation candle and the next candles (Number Candles Until Confirmation) closes the price under EMA (by default value 20 in configuration parameters).
Bearish Signal:
Sell signal: The signal candle close under EMA (by default value 20 in configuration parameters) and stoc 33,3,3 (by default values in configuration parameters) > stoc 8,5,3 (by default values in configuration parameters) > stoc 5,3,2 (by default values in configuration parameters). In this point the expert advisor send a telegram message. The confirmation candle close above the signal candle (take the close of the signal candle) and the confirmation candle must have bearish direction. In this point the expert advisor send a telegram message. The parameter Number Candles Until Confirmation is used to indicate the number of candles where the confirmation could be effective. For example, the confirmation signal could give in the next candle of the signal candle or two candles after the signal candle or more. The telegram message (confirmation) will be receive in the first candle that accomplish the conditions. The signal candle must be invalidated when we have not confirmation candle in the next candles (Number Candles Until Confirmation) or if we have not confirmation candle and the next candles (Number Candles Until Confirmation) closes the price above EMA (by default value 20 in configuration parameters).
Position:
Positions are closed when the position take the stop loss or take profit.
Positions are opened when we have a buy signal or sell signal in the same direction of the signal (explained above).
Position management
InpTrailingStopBeforeBreakEven is used to protect profit. Stop Loss is set if profit in pips exceeds the value specified in the InpTrailingStopBeforeBreakEven parameter. If the price continues to move in the profit direction and we are in breakeven, Stop Loss should be trailed InpTrailingStopAfterBreakEven (in pips) by every InpTrailingStopAfterBreakEven (in pips) move in the profit direction. Stop Loss cannot be moved towards the loss direction, i.e. the Stop Loss value cannot be increased. If the parameter InpTrailingStopAfterBreakEven and InpTrailingStopAfterBreakEven take the value 0, the trailing stop is disable.
Telegram Message Format:
XXXXXX-YYYY-ZZ
XXXXXX àFinancial Instrument (EURUSD, GOLD,…).
YYYY à Buy signal put “BUY” and sell signal put “SELL”.
ZZ à Timeframe.