Select last 30 orders in history with magic number 999999 MQL4

İş tamamlandı

Tamamlanma süresi: 3 dakika
Müşteri tarafından geri bildirim
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.

İş Gereklilikleri

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  

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(647)
Projeler
1295
67%
Arabuluculuk
84
26% / 49%
Süresi dolmuş
338
26%
Serbest
2
Geliştirici 2
Derecelendirme
(182)
Projeler
342
42%
Arabuluculuk
118
12% / 73%
Süresi dolmuş
104
30%
Serbest
3
Geliştirici 3
Derecelendirme
(2441)
Projeler
3076
66%
Arabuluculuk
77
48% / 14%
Süresi dolmuş
340
11%
Serbest
4
Geliştirici 4
Derecelendirme
(14)
Projeler
27
22%
Arabuluculuk
18
6% / 89%
Süresi dolmuş
8
30%
Serbest
5
Geliştirici 5
Derecelendirme
(554)
Projeler
1342
59%
Arabuluculuk
28
82% / 0%
Süresi dolmuş
10
1%
Çalışıyor
6
Geliştirici 6
Derecelendirme
(88)
Projeler
143
39%
Arabuluculuk
21
19% / 48%
Süresi dolmuş
30
21%
Serbest
7
Geliştirici 7
Derecelendirme
(1859)
Projeler
3463
88%
Arabuluculuk
73
40% / 15%
Süresi dolmuş
265
8%
Serbest
8
Geliştirici 8
Derecelendirme
(16)
Projeler
39
69%
Arabuluculuk
2
0% / 50%
Süresi dolmuş
1
3%
Serbest
9
Geliştirici 9
Derecelendirme
(440)
Projeler
546
25%
Arabuluculuk
21
38% / 38%
Süresi dolmuş
83
15%
Çalışıyor
10
Geliştirici 10
Derecelendirme
(130)
Projeler
186
54%
Arabuluculuk
3
33% / 33%
Süresi dolmuş
6
3%
Serbest
11
Geliştirici 11
Derecelendirme
(70)
Projeler
86
31%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
1
1%
Serbest
12
Geliştirici 12
Derecelendirme
(12)
Projeler
13
31%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
1
8%
Serbest
13
Geliştirici 13
Derecelendirme
(47)
Projeler
140
49%
Arabuluculuk
9
56% / 0%
Süresi dolmuş
27
19%
Serbest
14
Geliştirici 14
Derecelendirme
(14)
Projeler
22
27%
Arabuluculuk
24
13% / 79%
Süresi dolmuş
6
27%
Serbest
15
Geliştirici 15
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
16
Geliştirici 16
Derecelendirme
(62)
Projeler
140
46%
Arabuluculuk
19
42% / 16%
Süresi dolmuş
32
23%
Serbest
Benzer siparişler
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

Proje bilgisi

Bütçe
10 - 25 USD
KDV (21%): 2.1 - 5.25 USD
Toplam: 12.1 - 30.25 USD
Geliştirici için
9 - 22.5 USD