Select last 30 orders in history with magic number 999999 MQL4

仕事が完了した

実行時間3 分
依頼者からのフィードバック
Compliments to Ivand for his work. His work was quick, accurate for a reasonable price. He also helped me with the running of the script. Would definitely recommend him as a EA programmer to others.

指定

Hallo,

I want to select the last 30 orders form my EA with the magicnumber 999999  in MQL4. Currently my code is like this which doesnt account for the MagicNumber:

OrderSelect(OrdersHistoryTotal()-30,SELECT_BY_POS,MODE_HISTORY);  
   double G30 = OrderProfit();                                       if(G30 > 0) W ++;  
   if(G30 == 0) G30 = 0.0001; 
   if(G30 > 0) Wins = Wins + G30; 
   if(G30 < 0) Loss = Loss + G30;
   OrderSelect(OrdersHistoryTotal()-29,SELECT_BY_POS,MODE_HISTORY);  
   double G29 = OrderProfit();                                       if(G29 > 0) W ++; 
   if(G29 == 0) G29 = 0.0001; 
   if(G29 > 0) Wins = Wins + G29; 
   if(G29 < 0) Loss = Loss + G29;               
   OrderSelect(OrdersHistoryTotal()-28,SELECT_BY_POS,MODE_HISTORY);  
   double G28 = OrderProfit();                                       if(G28 > 0) W ++;        
   if(G28 == 0) G28 = 0.0001; 
   if(G28 > 0) Wins = Wins + G28; 
   if(G28 < 0) Loss = Loss + G28;     

 I want to select the last 30 orders from the ea with the magicnumber 999999 and than calculate the average winn and  average loss amount of the last 30 trades.

Can anybody help me?

Kind Regards

 

Rene  

応答済み

1
開発者 1
評価
(647)
プロジェクト
1295
67%
仲裁
84
26% / 49%
期限切れ
338
26%
2
開発者 2
評価
(182)
プロジェクト
342
42%
仲裁
118
12% / 73%
期限切れ
104
30%
3
開発者 3
評価
(2441)
プロジェクト
3076
66%
仲裁
77
48% / 14%
期限切れ
340
11%
4
開発者 4
評価
(14)
プロジェクト
27
22%
仲裁
18
6% / 89%
期限切れ
8
30%
5
開発者 5
評価
(554)
プロジェクト
1342
59%
仲裁
28
82% / 0%
期限切れ
10
1%
仕事中
6
開発者 6
評価
(88)
プロジェクト
143
39%
仲裁
21
19% / 48%
期限切れ
30
21%
7
開発者 7
評価
(1859)
プロジェクト
3463
88%
仲裁
73
40% / 15%
期限切れ
265
8%
8
開発者 8
評価
(16)
プロジェクト
39
69%
仲裁
2
0% / 50%
期限切れ
1
3%
9
開発者 9
評価
(440)
プロジェクト
546
25%
仲裁
21
38% / 38%
期限切れ
83
15%
仕事中
10
開発者 10
評価
(130)
プロジェクト
186
54%
仲裁
3
33% / 33%
期限切れ
6
3%
11
開発者 11
評価
(70)
プロジェクト
86
31%
仲裁
1
100% / 0%
期限切れ
1
1%
12
開発者 12
評価
(12)
プロジェクト
13
31%
仲裁
1
0% / 100%
期限切れ
1
8%
13
開発者 13
評価
(47)
プロジェクト
140
49%
仲裁
9
56% / 0%
期限切れ
27
19%
14
開発者 14
評価
(14)
プロジェクト
22
27%
仲裁
24
13% / 79%
期限切れ
6
27%
15
開発者 15
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
16
開発者 16
評価
(62)
プロジェクト
140
46%
仲裁
19
42% / 16%
期限切れ
32
23%
類似した注文
I’m looking for someone experienced with Think or Swim to create a backtesting script for an in-the-money Iron Condor strategy using options on the SPX. The strategy involves setting up 10 contracts of an Iron Condor with a 10-point spread width and a net credit requirement of $11 per contract. The goal is to backtest the performance over the last three years, focusing on trades where the SPX closes outside a
I currently have a license code that connects to my web server, and I add the account number, client name, and expiration date. I’d like something more automated. Currently I allow clients 10 licenses, but adding for them on my side can get exhausting. I’d like a better solution for myself and clients

プロジェクト情報

予算
10 - 25 USD
VAT(付加価値税) (21%): 2.1 - 5.25 USD
合計: 12.1 - 30.25 USD
開発者用
9 - 22.5 USD