Работа завершена
Техническое задание
Entry Options
1. Short_Side
Name of the asset to be sold
2. Long_Side
Name of the asset to be bought
3. Ratio 1
This is the trigger for starting the trade.This option must be of the following format: 1.2345
4. Ratio 1 Buy Quantity
Quantity of Long_side shares to be bought when the price crosses the ratio 1
5. Ratio 1 Sell Quantity
Quantity of Short_side shares to be sold when the price crosses the ratio 1
6. Ratio 2
This setting must be optional. This is a trigger for a second Buy and sell, if I want to divide the entrance into the trade in two steps.
7. Ratio 2 Buy Quantity
Quantity of Long_side shares to be bought when the price crosses the ratio 2
8. Ratio 2 Sell Quantity
Quantity of Short_side shares to be sold when the price crosses the ratio 2
9. Ratio 3
This setting must be optional. This is a trigger for a third Buy and sell, if I want to divide the entrance into the trade in three steps.
10. Ratio 3 Buy Quantity
Quantity of Long_side shares to be bought when the price crosses the ratio 3
11. Ratio 3 Sell Quantity
Quantity of Short_side shares to be sold when the price crosses the ratio 3
12. Calculation Time-frame
The ratio should be calculated using the closing prices of the chosen time-frame.
13. Expiration date
DAY/MONTH/YEAR (DD/MM/YYYY)
14. Expiration Hour
If the Ratio 1 is not reached until the expiration date and time, the trade must be canceled, and the EA can remove itself from the chart.
Exit Options
15. Stoploss
If the sum of the profit of the Short_Side and the profit of the Long_Side is equal to or less than the amount specified in this option (which must be negative!), then the transaction must be terminated immediately.
16. Take profit
If the sum of the profit of the Short_Side and the profit of the Long_Side reaches (or exceeds) the amount specified in this option (which must be positive!), the transaction is terminated immediately.
17. Trailing Stop Trigger
When the trade profit reaches the amount specified here, the EA must proceed to protect the profit according to the percentage specified in the item 19.
18. Trailing Stop step
It is the amount in $$ of increase in profit for the trailing stop to be recalculated.
19. Trailing Stop percentage
It is the percentage of profit achieved that EA must protect.
20. Closing date
Regardless of whether the transaction is in profit or loss, at this date and time (option below), the transaction must be terminated immediately.
DAY/MONTH/YEAR (DD/MM/YYYY)
21. Closing hour
22. Trading Hours
The start hour of the trading session and the end hour of the trading session.
The EA must neither open nor close the trade outside the trading session. This rule also applies to the Traling stop, which should not be moved outside of that time, and the stoploss, which should be ignored outside trading session.
23. Magic Number
24. Comment
NOTES:
- The Sell should always be made slightly before the buy. Both sides must be made with market orders. (No pending orders)
- The Ratio is the division of the current price of the Long_Side asset by the current price of the Sell_Side asset.
- The Ratio 1 and their respective quantities should be the only mandatory Ratio setting. The other two, Ratio 2 and Ratio 3, if their quantities are 0, then the EA should ignore them, or an option of a true / false switch could be used instead.
- As soon as the current Ratio value crosses the Ratio 1 value (or Ratio 2 or 3, if used) the EA should start selling the Short_Side and buying the Long_Side.
- The Trailing Stop should work as follows:
- Let's say the Trailing Stop Trigger is $1000 and the trailing stop percentage is set to 60%.
- When the sum of the Short_side and the Long_side is equal to or greater than $1000, then the EA must protect $600. That is, if the if the profit decreases up to $600, the trade must be terminated.