Select last 30 orders in history with magic number 999999 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
Оценка
(2649)
Проекты
3366
68%
Арбитраж
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
Оценка
(1930)
Проекты
3551
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
Оценка
(173)
Проекты
231
61%
Арбитраж
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%
Арбитраж
20
40% / 15%
Просрочено
32
22%
Работает
Похожие заказы
I want to buy prop firm EA 1500 - 5000 USD
Hello all developers, I am searching a good, profitable EA suitable for prop firms. Only serious order please. Source of code required. Please tell me how this EA is working, EA can't be decompiled. Budget is negotiable
Title: SEEKING: Proven SMC/Order Block EA for XAUUSD – Live Track Record Required (<5% Max DD) ​ Job/Request Description: I am looking to acquire or license a high-performance, fully automated Expert Advisor (EA) specifically optimized for XAUUSD (Gold) . The strategy must be strictly based on Smart Money Concepts (SMC) , utilizing Order Blocks, Liquidity sweeps, and Market Structure Shifts (MSS). ​ Technical
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

Информация о проекте

Бюджет
10 - 25 USD