Spezifikation
New Hedging EA with blueprint needs to be developed. I have 2 EA's that manages the trades of the New Hedging EA and needs integrated with the New Hedging EA.
I have the source code of the 2 EA's that manages the trades.
The New Hedging EA that needs to be developed only places stop orders and trails stop orders.
The 2 external EA's that needs to be integrated into the New Hedging EA will manage the open position trades of the New Hedging EA.
EA3 Hedge Expert Advisor
Settings
1. 1 Magic number
2. 2 Initial stop order lot size
3. 3 Add hedge lot - True/ False
4. 4 Add lot size - 0.01
5. 5 Multiply hedge lot - True/False
6. 6 Multiply lot size - 1.5
7. 7 Initial stop order distance - 100 Points
8. 8 Hedge stop order distance - 200 Points
9. 9 Trail stop order - True/False
10. 10 Stop order trailing step - 10 Points
11. 11 Stop order trading pause - True/False
12. 12 Single order trailing profit – True/False
13. 13 Single order trailing activation – 200 points
14. 14 Single order trailing placing distance – 100 points
15. 15 Single order trailing step – 50 points
16. 16 Initial trading start time - 05:00
17. 17 Initial trading stop time – 12:00
18. 18 Slippage - 3
EA Basic Start (For Setting 2, 7 and 16)
EA starts by placing two stop orders, buy stop and sell stop x amount of points from the current price (setting 7).
EA Basic hedge trading (For setting 3, 5 and 8)
When one of the initial stop orders is activated into an open order, the other stop order gets deleted and replaced with setting 3 (add lot size) stop order or setting 5(multiply lot size) stop order.
EA Basic Trailing stop (For setting 12, 13, 14 and 15)
The EA will trail an open order, buy or sell only if there is one open order.
If there is more than on open order, buy or sell, the EA will not use the trailing stop setting.
EA Basic trail stop order (For setting 9 and 10)
The EA stop orders will trail the market price if trail stop order (setting 9) is true. The stop order will trail the market price when the market moves away from the stop order in steps according to stop order trailing step (setting 10) in points.
EA Basic stop order trading pause (setting 11)
Settings explained
1. Magic number – Magic number of EA
2. Initial stop order lot size – The first buy stop and sell stop orders lot size – 0.01
3. Add hedge lot - True/ False – If true, increase stop order lot size. If false, stop order lot size does not increase.
4. Add hedge lot size - 0.01 – Increase size of stop order lot size by adding to stop order.
5. Multiply hedge lot - True/False - If true, increase stop order lot size. If false, stop order lot size does not increase.
6. Multiply hedge lot size - 1.5 – Increase size of stop order lot size by multiplying to stop order.
(If setting 3 and setting 5 are both false, then there is no add hedge or multiply hedge of stop order. Stop orders will stay at initial stop order size – 0.01 (Setting 2)
7. Initial stop order distance - 100 Points – The distance of the first buy stop and sell stop from the market price (X amount of points)
8. Hedge stop order distance - 200 Points - The distance of the hedge buy stop and hedge sell stop from the market price (X amount of points)
9. Trail stop order - True/False – If true, stop order trails market price. If false, stop order does not trail market price.
10. Stop order trailing step - 10 Points – The steps in points used for the stop order to trail market price. (every 10 points the market price moves away from the stop order, the stop order will move 10 points closer to the market price)
11. Stop order trading pause - True/False – If true, the stop order will not move past the previous stop order position.
(If current sell stop order is at 1.100 and previous buy stop order was at 1.200, sell stop order will trail market price but will not pass 1.200 where the previous buy stop was when activated to become a buy order)
(If current buy stop order is at 1.200 and previous sell stop order was at 1.100, buy stop order will trail market price but will not pass 1.100 where the previous sell stop was when activated to become a sell order)
12. Single order trailing profit – True/False – If true, when there is only one open order, buy or sell (example buy 0.01 in profit of 200 points) The EA can trail the open buy order. This excludes stop orders and only focus on open orders such as buy or sell).
If false, then the EA will not trail any open orders such as buy or sell.
13. Single order trailing activation – 200 points – when there is only one open order, buy or sell and the order is 200 points in profit. This setting activates if setting 12 is true.
14. Single order trailing placing distance – 100 points – When setting 13 activate, trailing stop is places 100 points from current market price.
15. Single order trailing step – 50 points - The steps in points used for the trailing stop to trail market price. (every 50 points the market price moves away from the trailing stop, the trailing stop will move 50 points closer to the market price)
(If setting 12, 13, 14 and 15 combined closes the open buy or sell order with a trailing stop, the EA will reset and start with initial stop order, only if it is not past 12:00 (setting 17). If the EA reset between 05:00 (setting 16) and 12:00 (setting 17) then the EA can start with initial stop order (setting 2)
(If setting 13, 14 and 15 combined closes the open buy or sell order with a trailing stop, the EA will reset and start with initial stop order. If the time is out of range between 05:00 (setting 16) and 12:00 (setting 17), the EA will not start with initial stop order (setting 2).
(example – EA trailing stop closes buy or sell order at 13:45, the EA will not start initial stop order (setting 2) until the next day at 05:00 (setting 16)
16. Initial trading start time - 05:00 – The time the EA starts trading and placing the Initial stop order lot size (setting 2)
17. Initial trading stop time – 12:00 – The time the EA will stop placing any initial stop orders (setting 2) The EA will not place any new initial stop orders after 12:00. Only at 05:00the next day, the EA will place initial stop orders if the EA has closed all open
(If there are open orders and stop orders after Initial trading stop time (setting 17), The EA will trade as normal until all orders and stop orders are closed buy Single order trailing profit (setting 12, 13, 14 and 15 combined) or Equity Safeguard EA (EA provided to implement with EA3). Then the EA will reset and start with initial trading stop at 05:00 (setting 16) to 12:00 (setting 17)
18. Slippage – 3 – Standard slippage setting to allow constant trading