Select last 30 orders in history with magic number 999999 MQL4

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%
무료
게재됨: 4 코드
3
개발자 3
등급
(2630)
프로젝트
3345
67%
중재
77
48% / 14%
기한 초과
342
10%
무료
게재됨: 1 코드
4
개발자 4
등급
(14)
프로젝트
27
22%
중재
18
6% / 89%
기한 초과
8
30%
무료
게재됨: 1 코드
5
개발자 5
등급
(618)
프로젝트
1428
59%
중재
31
81% / 0%
기한 초과
10
1%
무료
6
개발자 6
등급
(88)
프로젝트
143
39%
중재
21
19% / 48%
기한 초과
30
21%
무료
7
개발자 7
등급
(1928)
프로젝트
3548
88%
중재
73
40% / 15%
기한 초과
268
8%
무료
8
개발자 8
등급
(16)
프로젝트
39
69%
중재
2
0% / 50%
기한 초과
1
3%
무료
9
개발자 9
등급
(452)
프로젝트
565
26%
중재
24
42% / 38%
기한 초과
85
15%
무료
게재됨: 6 코드
10
개발자 10
등급
(171)
프로젝트
229
60%
중재
3
33% / 33%
기한 초과
6
3%
작업중
게재됨: 1 코드
11
개발자 11
등급
(70)
프로젝트
86
31%
중재
1
100% / 0%
기한 초과
1
1%
무료
12
개발자 12
등급
(12)
프로젝트
13
31%
중재
1
0% / 100%
기한 초과
1
8%
무료
게재됨: 1 코드
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
등급
(64)
프로젝트
144
46%
중재
19
42% / 16%
기한 초과
32
22%
작업중

프로젝트 정보

예산
10 - 25 USD