工作已完成
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
Requirements Specification examples
Here is an example of Requirements Specification for the development of the Super Trend Expert Advisor. If you can use the PineScript code (attached) that would be perfect because I love the indicator. If not feel free to use any MT4/MT5 SuperTrend indicator but with the same parametars as the PineScript one!
1. The idea of the trading system is as follows: market entries are performed when there is either a Buy or a Sell signal. Buy orders are executed on the Buy signal and Sell orders go with the Sell signal. It needs to be able to open multiple orders at the same time and same buy/ask price. It will target small pip movements of 1-10 pips but with the large volume of 1-10 trades it will take a lot of pips.
2. Trend : SuperTrend uses ATR Period of 10 and ATR Multiplier of 3 (0.1 step value) and a (h+l)/2 to determine the trend direction.
Up = (high + low) / 2 + multiplier x ATR
Down = (high + low) / 2 – multiplier x ATR
Calculation of Average True Range – I don't know if this is in the PineScript
[(Prior ATR x 13) + Current TR] / 14
3. Trading Signals - Buy signal is active when this is TRUE
trend = 1 buySignal = trend == 1 and trend[1] == -1
Sell signal is active when this is TRUE
trend = 1 sellSignal = trend == -1 and trend[1] == 1
4. Positions are closed at opposite signals: Buy positions are closed at Sell signals, and Sell positions are closed at Buy signals.
5. Positions are opened at the same time as the Buy/Sell signal is active, but the limit is placed on 1-10 orders per trading signal. When the limit is reached you need the opposite signal and opposite orders closed to open new orders.
6. Added indicator - 5-20 EMA crossover. When the Super Trend turns green (i.e. Super Trend is below the price) and 5 EMA is above 20 EMA, the Buy order is executed. Similarly, when the Super Trend turns red (i.e. Super Trend is above the price) and 20 EMA is above 5 EMA the Sell order is executed - I need this as a double conformation (Both need to be TRUE) for the trade to be executed ( If one is FALSE, 0 trades will be executed).
7. Take Profit - custom range in pips
8. Stop loss - stop loss for a Buy trade is placed on the horizontal green line/step of the Up Trend. When the Up Trend green line moves up the SL stays fixed. When there is a new horizontal green line/step, the SL is moved to its value.
The same goes with Down Trend, the SL is moved with every formed horizontal red line/ step of the Down Trend.
9. Lot size - in % of the current equity so the lot size changes on its own and the risk is low.
10. Time frame option - 5min 15 min 30min 1h 4h 1d
11. Trading time zone - GMT + 1
12. Trading periods - open for input ( from 00:00:00 to 23:59:59)
13. Trading days - open for input ( MON - FRY)