Select last 30 orders in history with magic number 999999 MQL4

MQL4 Experten Skripte

Auftrag beendet

Ausführungszeit 3 Minuten
Bewertung des Kunden
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.

Spezifikation

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  

Bewerbungen

1
Entwickler 1
Bewertung
(647)
Projekte
1295
67%
Schlichtung
84
26% / 49%
Frist nicht eingehalten
338
26%
Frei
2
Entwickler 2
Bewertung
(182)
Projekte
342
42%
Schlichtung
118
12% / 73%
Frist nicht eingehalten
104
30%
Frei
Veröffentlicht: 4 Beispiele
3
Entwickler 3
Bewertung
(2661)
Projekte
3382
68%
Schlichtung
77
48% / 14%
Frist nicht eingehalten
342
10%
Frei
Veröffentlicht: 1 Beispiel
4
Entwickler 4
Bewertung
(14)
Projekte
27
22%
Schlichtung
18
6% / 89%
Frist nicht eingehalten
8
30%
Frei
Veröffentlicht: 1 Beispiel
5
Entwickler 5
Bewertung
(618)
Projekte
1428
59%
Schlichtung
31
81% / 0%
Frist nicht eingehalten
10
1%
Frei
6
Entwickler 6
Bewertung
(88)
Projekte
143
39%
Schlichtung
21
19% / 48%
Frist nicht eingehalten
30
21%
Frei
7
Entwickler 7
Bewertung
(1931)
Projekte
3552
88%
Schlichtung
73
40% / 15%
Frist nicht eingehalten
268
8%
Frei
8
Entwickler 8
Bewertung
(16)
Projekte
39
69%
Schlichtung
2
0% / 50%
Frist nicht eingehalten
1
3%
Frei
9
Entwickler 9
Bewertung
(452)
Projekte
565
26%
Schlichtung
24
42% / 38%
Frist nicht eingehalten
85
15%
Arbeitet
Veröffentlicht: 6 Beispiele
10
Entwickler 10
Bewertung
(174)
Projekte
232
61%
Schlichtung
3
33% / 33%
Frist nicht eingehalten
6
3%
Arbeitet
Veröffentlicht: 1 Beispiel
11
Entwickler 11
Bewertung
(70)
Projekte
86
31%
Schlichtung
1
100% / 0%
Frist nicht eingehalten
1
1%
Frei
12
Entwickler 12
Bewertung
(12)
Projekte
13
31%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
1
8%
Frei
Veröffentlicht: 1 Beispiel
13
Entwickler 13
Bewertung
(47)
Projekte
140
49%
Schlichtung
9
56% / 0%
Frist nicht eingehalten
27
19%
Frei
14
Entwickler 14
Bewertung
(14)
Projekte
22
27%
Schlichtung
24
13% / 79%
Frist nicht eingehalten
6
27%
Frei
15
Entwickler 15
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
16
Entwickler 16
Bewertung
(64)
Projekte
144
46%
Schlichtung
20
40% / 20%
Frist nicht eingehalten
32
22%
Frei
Ähnliche Aufträge
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
We are seeking an experienced MQL5 developer to build the Guardian EA, a focused circuit-breaker module for MetaTrader 5. Objective Protect capital during adverse moves by temporarily exiting positions at a defined drawdown threshold, while virtually tracking those positions as open. Re-establish the positions only when market conditions stabilize (via ADX) and drawdown recovers to a lower threshold. The goal is full
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 £1000 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
hello good evening All professional programmers! I'd like to request a special services I need a Gold and Silver trading bot like the one in the video, one that works on real accounts. My only request is that I don't pay any money until the bot is built and tested. Thank you very much please contact me as soon as possible for more information

Projektdetails

Budget
10 - 25 USD