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
338
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
(2662)
Proyectos
3383
68%
Arbitraje
77
48% / 14%
Caducado
342
10%
Libre
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
1428
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
(452)
Proyectos
565
26%
Arbitraje
24
42% / 38%
Caducado
85
15%
Trabaja
Ha publicado: 6 ejemplos
10
Desarrollador 10
Evaluación
(174)
Proyectos
232
61%
Arbitraje
3
33% / 33%
Caducado
6
3%
Trabaja
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
20
40% / 20%
Caducado
32
22%
Libre
Solicitudes similares
Close Vol (%N): Closes half (or any percentage you want) of the lot size of your open positions. For example, if you have five open orders of 0.06 lots and want to close half of each, you simply click it, and it will close the specified volume from each individual order. Close Order (%N): Closes half (or any amount you want) of the total number of your open orders. For example, if you have ten open orders and want to
I need a professional MQL5 developer to build a fully automated Expert Advisor (EA) named " Hassanien Daily Breakout ". The EA is based on daily price levels and specific execution times. ​ Technical Specifications: ​ Time Settings (Iraq Time - GMT+3): ​ Execution Time: 10:00 AM. ​ Full Clean-up Time: 10:50 PM (Close all open positions and delete pending orders). ​ Entry Logic: ​ Case 1 (Pending Orders): At 10:00 AM
Hi basically I'm wanting an already made EA scalper that's constantly in and out of trades on the M1 time frame that has good risk management. It knows what it's doing. Most of its trades are profitable and that can start with $100. I am willing to pay up to $1500 for the right scalping bot. If you please have one and you're very confident in it, please allow me to use a live version to see how it does and if I'm
Need an trailing SL manager which can work with my all open trades (trades may be multiple), Put a fix SL based on entry price and then trail my strictly in my favoured direction, Initial SL shud be confiurable via a small dashboard
Pip killer ntt 100+ USD
Create a forex robot especially for sculping using the 3 ema strategy which consists of the following moving average levels of the 15 ma ,30 ema , 60 ema and 90 which enter potentially on a retest into the ema and targets opposite direction after the retest .Potentially bringing into account that the number of retested emas controlls the number of entreis which for eg. retest of the 15 ema single 0.01 trade is
Need to improve logic in existing coding for Range breakout/breakin EA 1) for timing range like 1am-10am Asian Range with max entry per session like London 1-2 times max entry 10-4pm & US session timings 1-2 entry 4pm - 8pm or 2) candle high low range eg 4pm to 4:30pm - entry logic eg mark 30min candle high low range as given in attached picture with buffer if required to show entry , SL & TP in trade/backtest mode
Make a Robot for mt5 using supertrend indicator for entry in trade with period 2 and multiplier 1.1 using Heiken Ashi candle also with martingle of 2 with maximum step for martingle is 15 step until profit reaches double of total loss. Select time frame 1 minute.Always close the previous trade if in loss then take next trade with martingle of 2 of previous lot in loss. All parameter have the option to change it
Robot que combine 2 indicadores en la ejecución automatica: 1 el Gann High Low y el Donchian Channel (DC) ACTIVO: XAU/USD EN UNA HORA PARA EL DC: período DC = 55 velas displacement/shift = 1 Mas Detalles en este video : https://youtu.be/3jI3cZY89T4?si=YEZAkMvWiq9O8-u9
Hello, I need an Expert Advisor for both MT4 and MT5 based on a recovery/grid trading strategy. Strategy Logic: User manually opens either a Buy or Sell market order. Once the first trade is opened, the EA automatically places an opposite pending order at a user-defined distance. If the pending order gets triggered, the EA places another opposite pending order at the original order price. This cycle continues
📌 Project Overview: I need a full Smart Trade Management System for MetaTrader 4/5. This is a complete trading ecosystem, not a simple EA. 📌 Core Features: Smart Money Management (risk-based lot calculation) Advanced Trading Toolbox (TradingView-style drawing tools) Central Master Dashboard (risk, filters, account control) Multi-account monitoring (MT4/MT5 synchronization) Real-time monitoring (spread, equity

Información sobre el proyecto

Presupuesto
10 - 25 USD