Select last 30 orders in history with magic number 999999 MQL4

MQL4 Uzmanlar Komut dosyaları

İş 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
Yayınlandı: 4 kod
3
Geliştirici 3
Derecelendirme
(2649)
Projeler
3366
68%
Arabuluculuk
77
48% / 14%
Süresi dolmuş
342
10%
Serbest
Yayınlandı: 1 kod
4
Geliştirici 4
Derecelendirme
(14)
Projeler
27
22%
Arabuluculuk
18
6% / 89%
Süresi dolmuş
8
30%
Serbest
Yayınlandı: 1 kod
5
Geliştirici 5
Derecelendirme
(618)
Projeler
1428
59%
Arabuluculuk
31
81% / 0%
Süresi dolmuş
10
1%
Serbest
6
Geliştirici 6
Derecelendirme
(88)
Projeler
143
39%
Arabuluculuk
21
19% / 48%
Süresi dolmuş
30
21%
Serbest
7
Geliştirici 7
Derecelendirme
(1930)
Projeler
3551
88%
Arabuluculuk
73
40% / 15%
Süresi dolmuş
268
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
(452)
Projeler
565
26%
Arabuluculuk
24
42% / 38%
Süresi dolmuş
85
15%
Çalışıyor
Yayınlandı: 6 kod
10
Geliştirici 10
Derecelendirme
(173)
Projeler
231
61%
Arabuluculuk
3
33% / 33%
Süresi dolmuş
6
3%
Serbest
Yayınlandı: 1 kod
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
Yayınlandı: 1 kod
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
(64)
Projeler
144
46%
Arabuluculuk
20
40% / 15%
Süresi dolmuş
32
22%
Çalışıyor
Benzer siparişler
A SPECIFICATION: NESTED MULTI-TIMEFRAME MOMENTUM (NMTM) 1. CORE OBJECTIVE The EA is designed to identify institutional Supply and Demand zones on the H4 timeframe that are "nested" within Daily (D1) zones. It filters for high- momentum "Leg-Out" moves and only trades in the direction of the Daily trend. 2. PHASE 1: TREND & CONTEXT FILTERS (DAILY) The EA must first confirm the Daily bias. No H4 zones are valid if they
I already have a fully developed MT5 Expert Advisor with all required prop firm features, including: Risk management Daily loss & max drawdown limits Spread & slippage filters News filter Trade management system The EA structure is complete. 👉 What I need is a professional developer to replace ONLY the entry logic with a high-quality, rule-based trading strategy. 🚨 STRICT REQUIREMENT (READ CAREFULLY): I am NOT
I am looking for a highly experienced MQL5 developer robot to build a professional-grade Expert Advisor for MetaTrader 5, focused on XAUUSD (Gold). This project is not a simple EA, but the foundation of a scalable multi-strategy trading system, designed for long-term development and future upgrades. Core Concept The EA must support a maximum of 5 internal strategies, each working independently but profitable daily
FireDire 30+ USD
I want a prop-firm–compliant trading robot, not a fast or aggressive one. Objectives: – Pass a prop firm challenge safely within 2–4 weeks, not 1 week. – Focus on capital protection first, profit second. Risk & Money Management: – Risk per trade: 0.25%–0.5% max – No martingale, no grid, no recovery trading – One position per signal (optional scaling only after BE) – Global daily risk cap: 1%–1.5% – Respect both daily
Project Description I am looking for a highly experienced MQL5 developer to build a professional-grade Expert Advisor for MetaTrader 5, focused on XAUUSD (Gold). This project is not a simple EA, but the foundation of a scalable multi-strategy trading system, designed for long-term development and future upgrades. Core Concept The EA must support a maximum of 5 internal strategies, each working independently but
Hola, estoy buscando un programador MQL5 con experiencia real en el desarrollo de EAs diseñados específicamente para generar un alto volumen de operaciones diarias. Mi principal prioridad no es un bot que realice solo unas pocas operaciones, sino un sistema con una alta actividad comercial, capaz de abrir lotes de gran tamaño de forma constante y que opere en condiciones reales de mercado, incluyendo spreads
I am looking for an expert in trading bot development to trade Bitcoin and other cryptocurrencies. The bot must be able to execute trades automatically based on a specific strategy, including risk management, precise entries, and automated exits. Experience with exchange APIs and trading automation is essential
I need an experienced developer to carry out an indicator and trading robot using the following; moving averages risk ( take profit and stop loss) and maximum drawdown limits heiken ashi confirmation. trendline breakout if possible The developer will test this on a demo account that I will provide before conclusion as I don’t want anyone to waste my time trying to use chartgpt trial and error. If you can do the
I need screenshots for the MetaTrader 5 documentation - https://www.metatrader5.com/en/terminal/help I need you to remake all the images included in the guide, except for those on the very first page which are already up to date. You simply go through each page of the guide, and take the same images: same size, same interface elements, same set of charts/trades, symbols, etc. These include small icons of commands
I am looking for an experienced MQL5 developer to build a currency strength analysis tool for MetaTrader 5 , inspired by the functionality shown here: https://www.livecharts.co.uk/currency-strength.php The main idea is simple: calculate and display the relative strength of major forex currencies to support better trade decisions. However, the key feature I want (which is currently missing from most strength meters)

Proje bilgisi

Bütçe
10 - 25 USD