工作已完成
指定
Good day to everyone! I need to quench my curiosity in order to conduct a series of backtests. For this I need a trading algorithm, but unfortunately I cannot allocate a huge amount of money for this. I would like a specialist to look at this task and evaluate the task accordingly. For those who is familiar with "Grid trading" and Martingale system they should recognize similarity.
Text below is copied from my Exel file and may contain minor format issues. Contains Description with inputs for EA and algorithm. Picture attached after all and I hope all together will be enough to understand.
Description:
EA should not be sensitive to external interference in order for manual adjustments during it's work until General Inputs conditions are met.
General Inputs:
Overall stop working conditions of EA
1. Overall increase from initial balance since program is working to exit all trades and stop working:
Example: Increase from initial balance limit: + 5000 USD
2. Overall drawdown from initial balance since program is working to exit all trades and stop working
Example: Drawdown from initial balance limit: - 5000 USD
Detailed Inputs:
Phase 1 inputs
Start Phase 1. Day of week
Example: Mo (no) Tu (yes) We (no) Th (no) Fr (no)
Time
Example: Open positions at: 16h30
Phase 1 Size Size (Volume of positions of Phase 1 in lots)
Example: Size of positions in lots 0.5 (for EUR/USD)
or Example: Size of positions in lots 10 (for US100/USD)
Phase 1 Take Profit Take Profit limit orders in USD for Phase 1
Example: Take Profit order +1000 USD
Note: No stop loss order included. Until overall stop working conditions are met.
Phase 2 inputs
Included or not Means if included then Phase 2 takes place, if No then there is no Phase 2 following this case
Example: Phase 2 on/off Yes No
Phase 2 Size Size (Volume of positions of Phase 2 in lots)
Example: Size of positions in lots 0.3 (for EUR/USD)
Phase 2 Take Profit Take Profit limit orders in USD for Phase 2
Example: Take Profit order +500 USD
Note: No stop loss order included. Until overall stop working conditions are met.
Phase 3 inputs
Included or not Means if included then Phase 3 takes place, if No then there is no Phase 3 following this case
Example: Phase 3 on/off Yes No
Phase 3 Size Size (Volume of positions of Phase 3 in lots)
Example: Size of positions in lots 1 (for EUR/USD)
Phase 3 Take Profit Take Profit limit orders in USD for Phase 3
Example: Take Profit order +1500 USD
Note: No stop loss order included. Until overall stop working conditions are met.
Phase 4 inputs
Included or not Means if included then Phase 4 takes place, if No then there is no Phase 4 following this case
Example: Phase 4 on/off Yes No
Phase 4 Size Size (Volume of positions of Phase 4 in lots)
Example: Size of positions in lots 0.6 (for EUR/USD)
Phase 4 Take Profit Take Profit limit orders in USD for Phase 4
Example: Take Profit order +500 USD
Note: No stop loss order included. Until overall stop working conditions are met.
Repeat
Working Algorithm:
There are no indicators or any patterns used for EA to initiate trades other then presetted day of week and time.
Every Phase 1 it is to open market orders both long and short with same equal size (volume) on the same price that is present at the moment (as close to same price as spread will allow of course). Then when orders are opened they have TP targets each separately. As soon as limit order of Long or Short position filled, Phase 2 initiated straight after: open market orders both long and short with same equal size. In this condition realised PnL expected to be equal (as close as spread, commissions, swap fees and slippage will allow) to unrealized loss. However profit target of those losing position of Phase 1 remains pending despite the growing negative balance. On Phase 2 we have again opened market orders both long and short equal size with separate Take Profit targets each in addition with loosing position of Phase 1. In this chain we have subsequence of 4 Phases (if they all 4 switched on in settings) with custom features of position size and Take Profit limit orders (corresponding to the size of the position). After end of subsequence only TP targets are remaining on losing sides and EA supposed to restart from Phase 1 from the set day of the week and time. Automatic closing of all positions shall only occur in the case specified in General Inputs (Overall Stop Working Conditions).
Have a great day!