İş tamamlandı
Tamamlanma süresi: 1 gün
Müşteri tarafından geri bildirim
Great work, thanks.
İş Gereklilikleri
I need the following function to complete:
double GetMaxLotSize(int cmd, double sl, double risk_margin = 1.0, string symbol = NULL)
Arguments are:
- cmd: Command such as OP_BUY or OP_SELL.
- sl: Stop loss to calculate the lot size for.
- risk_margin: Account margin to risk (in %), e.g. Money = AccountBalance() / 100 * risk_margin (e.g. 1.0%)
- symbol: If NULL, means current.
The output:
- Maximum safe lot size value to use where given SL won't exceed the percentage of risk margin amount.
This should work similar as GetMaxStopLoss() which calculates the maximum SL for given lot size, but GetMaxLotSize should work other way round.
The code should be compatible with MQL4 and MQL5.
Yanıtlandı
1
Derecelendirme
Projeler
789
71%
Arabuluculuk
9
33%
/
33%
Süresi dolmuş
22
3%
Serbest
Yayınlandı: 8 kod
2
Derecelendirme
Projeler
127
41%
Arabuluculuk
3
33%
/
67%
Süresi dolmuş
0
Serbest
3
Derecelendirme
Projeler
121
25%
Arabuluculuk
5
20%
/
60%
Süresi dolmuş
17
14%
Serbest
4
Derecelendirme
Projeler
185
30%
Arabuluculuk
77
9%
/
73%
Süresi dolmuş
77
42%
Serbest
5
Derecelendirme
Projeler
81
38%
Arabuluculuk
1
0%
/
0%
Süresi dolmuş
31
38%
Serbest
Proje bilgisi
Bütçe
15 - 20 USD
Son teslim tarihi
from 1 to 3 gün