Set Trailing Step According to Order Swap and Minimum Stop allowed

2020.05.12 Experts Consultation

Specification

0

I am using a swap strategy with two account with different brokers (hedged accounts). I have the code that sync between the two account (via two brokers).

When i close a BUY order with broker A, my EA send Close message and the SELL order on broker B gets closed. i get profit from [swap minus commission] on broker B.

What i need instead of closing the order on broker B do the following:

  1. Get the total swap of the SELL order.
  2. Set the Trailing stop loss by the [swap minus commission] value, e.g if the [swap minus commission] is $50, set the stop loss so if it gets hit the loss will be $50 max.
  3. Check the minimum allowed stop loss by broker, and if the needed step (calculated on step 2) is above the minimum , do not set trailing stop , just close the order with the [swap minus commission] profit.

Responded

1
Developer 1
2020.05.12
Rating
4.6
(10)
Projects
18
11%
Arbitration
12
17% / 58%
Overdue
2
11%
Loaded
2
Developer 2
2020.05.13
Rating
4.67
(254)
Projects
388
28%
Arbitration
65
18% / 48%
Overdue
139
36%
Working
3
Developer 3
2020.05.13
Rating
0
Projects
0
0%
Arbitration
0
Overdue
0
Free
4
Developer 4
2020.05.13
Rating
5
(2)
Projects
2
0%
Arbitration
1
0% / 100%
Overdue
1
50%
Free

Project information

Budget
30+ USD
For the developer
27 USD
Deadlines
to 10 day(s)

Customer

Placed orders3
Arbitrage count0