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%
Свободен
3
Разработчик 3
Оценка
(2441)
Проекты
3076
66%
Арбитраж
77
48% / 14%
Просрочено
340
11%
Свободен
4
Разработчик 4
Оценка
(14)
Проекты
27
22%
Арбитраж
18
6% / 89%
Просрочено
8
30%
Свободен
5
Разработчик 5
Оценка
(554)
Проекты
1342
59%
Арбитраж
28
82% / 0%
Просрочено
10
1%
Работает
6
Разработчик 6
Оценка
(88)
Проекты
143
39%
Арбитраж
21
19% / 48%
Просрочено
30
21%
Свободен
7
Разработчик 7
Оценка
(1859)
Проекты
3463
88%
Арбитраж
73
40% / 15%
Просрочено
265
8%
Свободен
8
Разработчик 8
Оценка
(16)
Проекты
39
69%
Арбитраж
2
0% / 50%
Просрочено
1
3%
Свободен
9
Разработчик 9
Оценка
(440)
Проекты
546
25%
Арбитраж
21
38% / 38%
Просрочено
83
15%
Работает
10
Разработчик 10
Оценка
(130)
Проекты
186
54%
Арбитраж
3
33% / 33%
Просрочено
6
3%
Свободен
11
Разработчик 11
Оценка
(70)
Проекты
86
31%
Арбитраж
1
100% / 0%
Просрочено
1
1%
Свободен
12
Разработчик 12
Оценка
(12)
Проекты
13
31%
Арбитраж
1
0% / 100%
Просрочено
1
8%
Свободен
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
Оценка
(62)
Проекты
140
46%
Арбитраж
19
42% / 16%
Просрочено
32
23%
Свободен
Похожие заказы
I use the translator I hope to make myself understood. I'm looking for a cyclical indicator. mt5. I attach videos to understand how it works. to be inserted at any point of the graph. It is possible to change the color and thickness of the line
This EA must have the following functions together: BE: place BE when the price reach a certain gain in PIPS and you can choose the offset too, so, for example it activates after 10 pips with 1 pip of offset so you can have profit with BE too Auto SL and TP Can manage the trades made by phone when MT5 is open in the PC or VPS Trailing stop (step by step): I can decide at what number of pips the trailing stop get
This is a strategy based on crossing two trend indicators on the second timeframe (1s, for example). We work not only with the market but with the limit orders as well (robot must "read" an order book). Read the whole instruction please for more details. Speak Russian, English
Martingale EA for MT5 30 - 100 USD
Criteria: Only one trade at a time. Cannot open another trade if one is running Trade on EURUSD only, once job is completed I will be happy to schedule more for other pairs You choose entry strategy and criteria win rate must be above 50% in long term backtest of EURUSD Every trade has got TP and SL Trades to last about a day, few trades a week, at least 10 pips gain per trade, so that it can be launched on normal
I have a indicator, mql file. The signals are seen below on a EURNZD H1 chart. Very important to get accurate entries. The signal to trade is the first tic after the the indicator signal paints. I've tried to demonstrate that below. Other than that the EA will have a lot size escalation, an on-screen pip counter, a button to stop taking new trades, SL/TP, and magic number. I would like the indicator to be within the
I would like to create an EA based on the Shved Supply and Demand indicator. you can find the Shved Supply and Demand v1.7 indicator in the following link https://www.mql5.com/en/code/29395 NB: Checks the trading robot must pass before publication in the Market ( https://www.mql5.com/en/articles/2555 ) MQ5 file to be provided
Im looking for an coder to code an EA: Trade management 1. opening trades according to the indicator 2. trades settings to choose from like: open all trades according to the signal open only trade 1,2,3 or 4 % per trade ( example 50/30/20 of the lot settings, with 4 trades it would be for example 50/30/10/10) 3. SL/Trailing settings: Move SL to entry after hitting TP1/TP2 or TP3 moving SL by % keep the original SL
Hi I'm looking to have 2 of my pinescript strategies converted to MQL5 and was wondering if you could first give me a quote for the more simple strategy and then for both the simple and complex strategy together. The simple strategy is a MACD crossover type thing that uses a special EMA script that filters out some ranging price action and also fractal candles for the stop loss. The second strategy is market
I want grate robot for making profits that know when to start a good trade and close a trade and must be active all time to avoid lost of money
I have developed a very strong TradingView strategy in Pine Script but unfortunately, a third-party connector is requiired and in my opinion, I want a more direct connection. I am not brilliant at coding, but I have coded the majority of the MT5 code and I would like you to make sure that the MT5 code matches my TradingView script and executes the same way as the TradingView script that I will provide if you are

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

Бюджет
10 - 25 USD
VAT (21%): 2.1 - 5.25 USD
Итого: 12.1 - 30.25 USD
Исполнителю
9 - 22.5 USD