Select last 30 orders in history with magic number 999999 MQL4

MQL4 Asesores Expertos Sripts

Trabajo finalizado

Plazo de ejecución 3 minutos
Comentario del Cliente
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.

Tarea técnica

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  

Han respondido

1
Desarrollador 1
Evaluación
(647)
Proyectos
1295
67%
Arbitraje
84
26% / 49%
Caducado
337
26%
Libre
2
Desarrollador 2
Evaluación
(182)
Proyectos
342
42%
Arbitraje
118
12% / 73%
Caducado
104
30%
Libre
Ha publicado: 4 ejemplos
3
Desarrollador 3
Evaluación
(2676)
Proyectos
3416
68%
Arbitraje
77
48% / 14%
Caducado
343
10%
Trabaja
Ha publicado: 1 ejemplo
4
Desarrollador 4
Evaluación
(14)
Proyectos
27
22%
Arbitraje
18
6% / 89%
Caducado
8
30%
Libre
Ha publicado: 1 ejemplo
5
Desarrollador 5
Evaluación
(618)
Proyectos
1429
59%
Arbitraje
31
81% / 0%
Caducado
10
1%
Libre
6
Desarrollador 6
Evaluación
(88)
Proyectos
143
39%
Arbitraje
21
19% / 48%
Caducado
30
21%
Libre
7
Desarrollador 7
Evaluación
(1931)
Proyectos
3552
88%
Arbitraje
73
40% / 15%
Caducado
268
8%
Libre
8
Desarrollador 8
Evaluación
(16)
Proyectos
39
69%
Arbitraje
2
0% / 50%
Caducado
1
3%
Libre
9
Desarrollador 9
Evaluación
(453)
Proyectos
566
26%
Arbitraje
24
42% / 38%
Caducado
85
15%
Libre
Ha publicado: 6 ejemplos
10
Desarrollador 10
Evaluación
(174)
Proyectos
233
61%
Arbitraje
3
33% / 33%
Caducado
6
3%
Libre
Ha publicado: 1 ejemplo
11
Desarrollador 11
Evaluación
(70)
Proyectos
86
31%
Arbitraje
1
100% / 0%
Caducado
1
1%
Libre
12
Desarrollador 12
Evaluación
(12)
Proyectos
13
31%
Arbitraje
1
0% / 100%
Caducado
1
8%
Libre
Ha publicado: 1 ejemplo
13
Desarrollador 13
Evaluación
(47)
Proyectos
140
49%
Arbitraje
9
56% / 0%
Caducado
27
19%
Libre
14
Desarrollador 14
Evaluación
(14)
Proyectos
22
27%
Arbitraje
24
13% / 79%
Caducado
6
27%
Libre
15
Desarrollador 15
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
16
Desarrollador 16
Evaluación
(64)
Proyectos
144
46%
Arbitraje
21
38% / 24%
Caducado
32
22%
Trabaja
Solicitudes similares
PRECISION ENTRY PRO EA V1 MT5 EXPERT ADVISOR REQUIREMENTS SPECIFICATION PROJECT NAME: Precision Entry Pro EA V1 PLATFORM: MetaTrader 5 (MT5) LANGUAGE: MQL5 1. PROJECT OBJECTIVE I want a simple, reliable and fully automated MT5 Expert Advisor based on the following trading concept: TREND → MARKET STRUCTURE → FIBONACCI RETRACEMENT → PRICE ACTION CONFIRMATION → ENTRY → STOP LOSS → TAKE PROFIT. The purpose of V1 is to
I need an MT5 Expert Advisor (EA) specifically for NFP news trading. Strategy: - Trade EURUSD during the US Non-Farm Payroll (NFP) release. - Automatically identify the NFP release time. - Place a Buy Stop above the current price and a Sell Stop below the current price shortly before NFP. - Adjustable distance from current price for both pending orders. - When one order is triggered, automatically cancel the opposite
yoo i want to make a trading bot i have my strategy in videos and also the rules to if anyone can work it out for me i will be glad welcome your bid and it urget let connect here on ninjatrader
Bonjour ! Je vous ai contacté pour le développement de mon EA sur MetaTrader. Je souhaite intégrer une stratégie précise avec une gestion stricte des règles du courtier Exness. J'ai déjà préparé le cahier des charges complet sous format PDF avec toutes les spécifications techniques
SKBOT 35+ USD
want an MQL5 Expert Advisor (EA) for MetaTrader 5, mainly for XAUUSD (Gold). Strategy: The EA should trade based on market structure, Break of Structure (BOS), Fair Value Gaps (FVG), Order Blocks (OB), and Fibonacci retracement levels. BUY setup: Detect bullish market structure. Detect a bullish Break of Structure (BOS). Identify the relevant bullish FVG and/or Order Block created around the structure move. Use
Light 🕯️ 50+ USD
To apply, you must already have your EA running on an active MT5 trading account connected to the market. The account must have genuine trading history that can be independently reviewed and verified. EA Requirements 1. Prop-Firm Compatible Risk Management - The EA must include daily and overall drawdown protection. - Required inputs: "MaxDailyLoss = 5%" "MaxTotalDrawdown = 10%" - Once either limit is
Hello, I'm looking for developer or coder to create a custom expert advisor (EA) on mql4 according to my strategy. The developer should be able deliver both indicator and source code for the job. Thanks
​ Indicators: Fast MA (Period 10, Exponential) and Slow MA (Period 50, Exponential). ​ Buy Signal: When Fast MA crosses above Slow MA. ​ Sell Signal: When Fast MA crosses below Slow MA. ​ Risk Management & Parameters: ​Customizable Lot Size (Default: 0.01). ​Stop Loss (SL) and Take Profit (TP) in pips. ​Trailing Stop options. ​Max Spread filter. ​ Platform: MetaTrader 5 (MQL5)
​ Indicators: Fast MA (Period 10, Exponential) and Slow MA (Period 50, Exponential). ​ Buy Signal: When Fast MA crosses above Slow MA. ​ Sell Signal: When Fast MA crosses below Slow MA. ​ Risk Management & Parameters: ​Customizable Lot Size (Default: 0.01). ​Stop Loss (SL) and Take Profit (TP) in pips. ​Trailing Stop options. ​Max Spread filter. ​ Platform: MetaTrader 5 (MQL5)
A robot 30+ USD
Je souhaite trouver un développeur pour réaliser ce travail et effectuer les paiements via cette application. Je m'engage à ne communiquer avec les candidats que par cette application, y compris par messageries tierces, correspondance personnelle ou courriel. Je comprends que toute personne ne respectant pas ces conditions sera interdite de publier des commandes sur la plateforme Freelance

Información sobre el proyecto

Presupuesto
10 - 25 USD