Set Trailing Step According to Order Swap and Minimum Stop allowed

İş Gereklilikleri

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.

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(23)
Projeler
45
20%
Arabuluculuk
24
29% / 42%
Süresi dolmuş
12
27%
Çalışıyor
2
Geliştirici 2
Derecelendirme
(258)
Projeler
395
28%
Arabuluculuk
69
19% / 49%
Süresi dolmuş
120
30%
Ücretsiz
3
Geliştirici 3
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Ücretsiz
4
Geliştirici 4
Derecelendirme
(4)
Projeler
4
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
1
25%
Ücretsiz

Proje bilgisi

Bütçe
30+ USD
Geliştirici için
27 USD
Son teslim tarihi
to 10 gün