Работа завершена
Техническое задание
I would like to EA that can perform automated trading based on the following requirement.
Rule 1: Place 16 orders based on the following configurable values, the configuration shall be maintain in a external file like config.ini
- Asset Pair=XAU/USD
- order_direction=BUY # BUY or SELL
- first_order_entry_price=2763.37
- first_order_profit_pips=40 # Ex. First order profit price will be 2767.37 when order_direction=BUY, if sell 2759.37
- first_order_stop_loss_pips=150 # First order stop loss price will be 2748.37 when order_direction=BUY, if sell 2778.37
- first_order_lot_size=0.3
- max_price_limit_from_first_order_entry_price=4.1
- # If current price reached more than this max price limit, then cancel all pending orders
- # example: when first_order_entry_price= 2763.37, max_price_limit = 2763.37 + 4.1 = 2767.47 when order_direction=BUY, if sell 2759.47
- 2ndto15th_order_lot_size=0.05
- 2ndto15th_order_profit_pips=20
- 16th_order_profit_pips=50
- 16th_order_stop_loss_pips=150
- 16th_order_lot_size=1.43
- entry_price_step_down_for_2ndto16th_order = 1
Rule 2: Second order to sixteenth order entry price shall be based step down configuration entry_price_step_down_for_2ndto16th_order, in this example, 2nd order entry price 1 less than first order entry price i.e., 2762.37 and 3rd order entry price shall be 1 less than second order i.e., 2761.37, the calculation goes on until 16th order. Reference to the attachment for the entire order list
Rule 3: At the start of the program place all the orders if the current price is more than entry price of the respective orders.
Rule 4: If the first order hit the take profit or the current price hit max price limit, cancel all the pending orders and stop the program. No more orders to be placed
Rule 5: If the 16th order hit take profit or hit stop loss, cancel all the pending orders and stop the program. No more orders to be placed
Rule 6: If the 2nd order to 15th order hit take profit, repeat the order when the current price goes above the respective order's entry price. Checking if the 2nd order to 15th order hit take profit should be based on the original order entry price, sometimes the position may be opened with a slightly different price.
Rule 7: If first to 15th order hit stop loss dont repeat the order.
Deliverable include the following:
- Source Code
- Compiled EA
- Two Back Tested results (requirement for back test in mentioned below)
- Step to setup and execute the EA
Back Testing 1;
- first_order_entry_price=2763.37
- Rest of the configuration same as mentioned under Rule1
- Back Test Period : 29 Jan 2025 05:15 EST to 30 Jan 2025 03:00 EST
Back Testing 2;
- first_order_entry_price=2689
- Rest of the configuration same as mentioned under Rule1
- Back Test Period : 13 Jan 2025 02:15 EST to 13 Jan 2025 23:00 EST
Attached the Sample BUY Order, and its Entry Price, Take Profit Price, Stop Loss Price for the sixteen order.
Regards