Работа завершена
Техническое задание
1. The idea of the trading system is as follows: market entries and exits are performed when price crossing 10 EMA and 50 SMA, with STC and ROC in the same direction
2. Trend is determined based on the 50 SMA in the same period. If the price is higher than 50SMA, the trend is seen as growing, only long position will be opened. Alternatively, If the price is lower than 50SMA, the trend is seen as going down, only Short position will be opened.
3. Trading Signals:
- Buy signal(Opening 2 long positions each time):
i) price crossing up 50 SMA or 10 EMA at candle close;
ii)check price>50 SMA; AND
iii) STC K>D; AND
iv)current roc value>previous;
Take profit or close position:
i) price crossing down 50 SMA or 10 EMA at candle close
ii) STC K<D AND
iii))current ROC(Rate of change) value<previous. - Sell signal(Opening 2 short positions each time):
i) price crossing down 50 SMA or 10 EMA at candle close;
ii)check price<50 SMA; AND
iii) STC K<D; AND
iv)current ROC value<previous;
Take profit or close position:
i) price crossing up 50 SMA or 10 EMA at candle close
ii) STC K>D AND
iii))current ROC value>previous.
4. Positions are opened at the market price, when a new bar emerges. The Expert Advisor is to be tested using Open prices, so there is no need to add functions for disabling operations inside the bar.
5. Position management
TrailngStop is used to protect profit. Stop Loss is set if profit in points exceeds the value specified in the InpTrailingStop parameter. If the price continues to move in the profit direction, Stop Loss should be trailed at the given distance. Stop Loss cannot be moved towards the loss direction, i.e. the Stop Loss value cannot be increased. If none of protective orders (Take Profit or Stop Loss) triggers, the position should be closed by an opposite signal. No other position exit methods are available.