Работа завершена
Техническое задание
This specification describes the requirements for an EA that will identify demand and supply areas on a chart and then enter trades when the market returns to that level in future.
Input parameters
The following input parameters should be available for configuring the robot in its settings:-
- Trade direction: options should be (1) buy, (2) sell, (3) buy and sell and should be available from a drop down menu
- Timeframe: the EA should work on only one timeframe at a time. The timeframe specified by the user in this parameter should be the timeframe that the EA adheres to regardless of which timeframe the user has open in their terminal
- Start point of analysis: can be any number
- Risk/ reward: user should be able to put any number in this field. The EA will calculate the target risk/ reward prior to opening as trade and will look up this variable before placing a trade to ensure the calculated target risk/ reward is at least equal to the value in this parameter
- Profit target 1 (%): can be any number between 1 and 100
- Profit target 2 (%): can be any number between 1 and 100
- Profit target 3 (%): can be any number between 1 and 100
- % of trade to close T2: can be any number between 1 and 100
- Initial move %: can be any number between 1 and 100
- Number of candles at trading level: can be any number
- SL level from entry price (pips) : can be any number
- Number of candles at interesting level: can be any number
- Number of pips from interesting level: can be any number
- Risk amount (as a % of account balance): can be any number between 1 and 100
Definitions
Interesting level |
An “interesting level” is a level where there was a “significant move” away from the level Note: the interesting level does not need to be identified there and then. The robot will use future price movements to enable it to identify if it was an interesting level |
Significant move |
A significant move is defined as a move that is at least equal to the percentage in the “Initial move %” parameter. The move is measured from the price of the “interesting level” to the “peak price”. Example: the interesting level is at 1.20100 and the peak price is 1.21220, therefore there is a 120 pip difference. The “Initial move %” parameter is set at 20%. 20% of the 120 pip difference is 24 pips from the “interesting level”. Therefore, a significant move would have occurred when the market got to 1.20340 Note: the significant move does not need to be identified as it is happening. The robot will use future price movements and the value of the “initial move %” parameter to identify if a move was a significant move |
Peak price |
The peak price is the highest or lowest price the market reaches after an “interesting level” is identified |
Start point of analysis |
This is a parameter that defines how many candles into the past from the current candle that the robot will look back to start its market analysis from. The robot will only use this parameter once and that will be when the robot is first activated |
Process
Step 1: identify interesting level and draw level on chart, labelled as a “potential interesting level”. Draw line as a blue dotted line
Step 2: monitor market after the interesting level identified to identify where market goes to (peak price)
Step 3: once market has achieved a new peak price, calculate if there has been a significant move away from the “potential interesting level” (initial move % parameter)
Step 4: if there has NOT been a significant move away from the interesting level, cancel all interest in the level and delete the “potential interesting level” line
Step 5: if there HAS been a significant move away from the interesting level, calculate how long the market was at the “potential interesting level”. The robot will look up the value in the “number of candles at interesting level” parameter. If at the close of the candle specified in the “number of candles at interesting level” input variable (e.g. if the variable says 5 candles, we’re looking at the close of the 5th candle after the candle that formed the interesting level) price is still within the number of pips in the “number of pips from interesting level” parameter then the “potential interesting level” line is deleted from the chart
Step 6: if the price HAS moved away from the potential interesting level by more than the number of pips in the “number of pips from interesting level” input parameter within the number of candles in the “number of candles at interesting level” input parameter, re-label the line as “confirmed interesting level” and change it to a dotted magenta line
Step 7: monitor market after setting the level as “confirmed interesting level” and place trade when price comes back to the “confirmed interesting level”. A trade will only be opened if the potential risk to reward ratio is at least equal to the value set in input parameter “Risk/ reward”. The potential risk to reward is calculated as the number of pips from the “confirmed interesting level” to the peak price divided by the size of the stop loss
Step 8: trade is placed in direction so as to move back towards the peak price. The lot size is calculated so that the risk amount is set according to the “risk amount” input parameter
Step 9: targets are set as follows:-
- T3 is the number of pips from the “confirmed interesting level” to the peak price at the point in time when price comes back to the “confirmed interesting level”
- T2 is set as per input variable
- T1 is set as per input variable
Step 10: for T1 to get hit, the price needs to move by the amount in the “Profit target 1 (%)” input parameter. This is calculated as the amount the price has moved from the entry price as a percentage of the overall distance between the entry price and the peak price. If T1 is hit, the stop loss is moved to breakeven
Step 11: for T2 to get hit, the price needs to move by the amount in the “Profit target 2 (%)” input parameter. This is calculated as the amount the price has moved from the entry price as a percentage of the overall distance between the entry price and the peak price. If T2 is hit, the robot will close the % of the trade size captured in input variable “% of trade to close T2”
Step 12: If T3 is hit, the remainder of the trade gets closed
Step 13: The initial stop loss gets set as per the input variable “SL level from entry price (pips)”
Step 14: after the trade is closed, the “confirmed interesting level” line should be deleted