Auftrag beendet
Spezifikation
1. The idea of the trading system is as follows: market entries are performed when MACD, RSI and Stochastic K main signal lines are in the same current trend direction.
MACD: use attached file MACD_coloured.mq4 (12,26,9)
Stochastic K: Stochastic main (14 period, 3 slowing)
RSI: (7)
2. Trend is determined based on each indicator.
An indicator shows an UP TREND when:
RSI is above 50
Stochastic K is above 50
i) MACD main above signal line and difference between the two is increasing
An indicator shows an DOWN TREND when:
RSI is below 50
Stochastic K is below 50
ii) MACD main below signal line and difference between the two is increasing
MACD is not in trend when:
iii) MACD main above signal line and difference between the two is decreasing
iv) MACD main below signal line and difference between the two is decreasing
As depicted by indicator MACD_coloured.mq4 :
i) Bright green
ii) Bright Red
iii) Dark green
iv) Dark red
3. Trading Signals:
Trading signals should only be acted upon at at the start of a new bar.
ENTRY:
Buy signal: All three indicators show an UP TREND in the previous bar
RSI UP TREND && Stochastic K% UP TREND && MACD UP TREND
RSI > 50
STO > 50
MACD Entry when previous bar is bright colour - ie BUY when previous bar is bright green
Sell signal: All three indicators show a DOWN TREND in the previous bar
RSI DOWN TREND && Stochastic K% DOWN TREND && MACD DOWN TREND
RSI < 50
STO < 50
MACD Entry when previous bar is bright colour - ie SELL when previous bar is bright red
EXIT
OP_BUY: The previous bar - RSI is NOT in an UP trend OR Stochastic K% is NOT in an UP trend OR MACD is NOT in an up trend
RSI < 50
STO < 50
MACD when previous bar is not bright green
OP_SELL: the previous bar - RSI is NOT in a DOWN trend OR Stochastic K% is NOT in a DOWN trend OR MACD is not in a DOWN trend
RSI < 50
STO < 50
MACD when previous bar is not bright red
4. Positions are closed :
- on trading signal at start of new bar. All positions closed at market.
- on Calculated TP or Trailing SL at any time
5. Positions are opened:
- on trading signal at start of a new bar
BUY positions opened at one point above the high of the previous bar.
SELL positions opened at one point below the low of the previous bar.
One position open at any time
Size of position in points The value is set in the InpSize input parameter.
6. Additional filters for opening a position:
No additional filters
7. Additional filters for closing a position:
No additional filters
Protective Orders:
10. Close by Take Profit — during position opening, a Take Profit level is set at a fixed distance from the open price, specified in points. The value is determined by Average True Range: ATR(7) x 3
9. Close by Trailing Stop Loss
is used to protect profit and minimise loss. Stop Loss is set by Average True Range: ATR(7) x 1.5. for:
OP_BUY from the low of the previous bar
OP_SELL from the high of the previous bar
11. Position Management
SL and TP should always be managed by the EA, never by the server.
SL and TP can occur during any OnTick()
If the price continues to move in the profit direction, Stop Loss should be trailed at the given distance from the low of the previous bar. Stop Loss cannot be moved towards the loss direction, i.e. the Stop Loss value cannot be increased for OP_SELL
Exit trade due to TP and SL at any time in any OnTick()
If none of the protective orders (Take Profit or Stop Loss) triggers, the position should be closed by a trading signal at the start of a new bar. No other position exit methods are available.
12. Add comments to describe function of each section - be descriptive of function and reason
13. In price window:
A. For any position opened, add line at that bar, at both TP (Blue) and SL (red) levels.
B. Add line at each bar a SL is updated at the updated SL level
C. Add a green dot above a bar if all three indicators show an UP trend - make it yellow if the previous bar does not have all three indicators show an up trend
D. Add a red dot below bar if all three indicators show a DOWN trend - make it pink if the previous bar does not have all three indicators show a down trend
14. Copyright will be transferred to me
15. C++ formatting preferred
16. Multiple screenshots of EA testing with Indicators clearly visible - so decision making methodology can be assessed and compared with demonstration testing.