Creation of a "FOR" loop in array

MQL4 Experts C#

Specification

//----------------------------------ENGLISH
Description : for loop that selects and manages the data under array and returns 1 openorder() according to the input. 
extern int Nomber_trade = 3; ( Max 5 )  




Calculates 1 : 
If Nomber_trade == 3 && "MagicNumber" then we select the first 3 orders and do the average to return 1 value. 

if (Trade_number == 1) Trade 1 in "Arrayname"[0];
                       Trade 2 in "Arrayname"[1]; 
                       Trade 3 in "Arrayname"[2];
                       Trade 4 in "Arrayname"[3];
                       Trade 5 in "Arrayname"[4];
                       

if (Number_trade == 3) Trade 1,2,3 in "Arrayname"[0];
                       Trade 4,5,6 in "Arrayname"[1]; 
                       Trade 7,8,9 in "Arrayname"[2];
                       Trade 10,11,12 in "Arrayname"[3];
                       Trade 13,14,15 in "Arrayname"[4];
                       


Calculates 2 :
Obviously if Nomber_trade > 1 it will not be able to return several openorder() so it will calculate the average of the openorder().

if (Nomber_trade==1) "Arrayname"[0]= OpenOrder()1 / Nomber_Trade ;
if (Nomber_trade==3) "Arrayname"[0]= OpenOrder()1 + OpenOrder()2 + OpenOrder()3 / Nomber_Trade ; 


We will then receive 1 value which is the average of the openorder().  

Obviously the loop must be as optimized as possible. I have a reference for creating a loop if you don't know how to start.

https://www.mql5.com/en/forum/338132




//---------------------------------------FRENCH


Description : boucle for qui sélectionne et gère les données sous tableaux array et renvoi 1 openorder() en fonction du input. 

extern int Nomber_trade = 3; ( Max 5 )  





Calcule 1 : 

Si Nomber_trade == 3 && "MagicNumber" alors nous sélectionnons les 3 premiers ordres et fais la moyenne pour renvoyer 1 valeur. 


if (Nombre_trade == 1) Trade 1 dans "Arrayname"[0];

                       Trade 2 dans "Arrayname"[1]; 

                       Trade 3 dans "Arrayname"[2];

                       Trade 4 dans "Arrayname"[3];

                       Trade 5 dans "Arrayname"[4];

                       


if (Nombre_trade == 3) Trade 1,2,3 dans "Arrayname"[0];

                       Trade 4,5,6 dans "Arrayname"[1]; 

                       Trade 7,8,9 dans "Arrayname"[2];

                       Trade 10,11,12 dans "Arrayname"[3];

                       Trade 13,14,15 dans "Arrayname"[4];

                       



Calcule 2 :

Evidement si Nomber_trade > 1 il ne pourra pas renvoyer plusieurs openorder() alors il va calculer la moyenne des openorder().


if (Nomber_trade==1) "Arrayname"[0]= OpenOrder()1 / Nomber_Trade ;

if (Nomber_trade==3) "Arrayname"[0]= OpenOrder()1 + OpenOrder()2 + OpenOrder()3 / Nomber_Trade ; 



Nous recevrons alors 1 valeur qui est donc la moyenne des openorder().  


Evidement la boucle doit être la plus optimiser possible. j'ai une reference de création de boucle si vous ne saviez pas comment commencer. 

https://www.mql5.com/en/forum/338132




ATTENTION : The code of our EA is not provided you should test it on your EA.



Responded

1
Developer 1
Rating
(87)
Projects
134
14%
Arbitration
41
22% / 29%
Overdue
14
10%
Free
2
Developer 2
Rating
(115)
Projects
129
18%
Arbitration
11
27% / 55%
Overdue
4
3%
Free
3
Developer 3
Rating
(196)
Projects
200
28%
Arbitration
0
Overdue
3
2%
Working
4
Developer 4
Rating
(167)
Projects
192
11%
Arbitration
37
38% / 35%
Overdue
5
3%
Loaded
5
Developer 5
Rating
(14)
Projects
14
21%
Arbitration
1
0% / 100%
Overdue
1
7%
Free
6
Developer 6
Rating
(563)
Projects
932
47%
Arbitration
301
59% / 25%
Overdue
124
13%
Working
Similar orders
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
I want to design a website like https://www.ngnrates.com/ we will change some stuff but not much, if you can deliver a website like this let me know your budget and readiness to implement
Hey, great developer I have a thinkorswim script I want to convert it into TradingView. Can you please let me know if you can i will be looking for great developer that will bid for it best regards
Hey, great developer I have a thinkorswim script I want to convert it into TradingView. Can you please let me know if you can i will be looking for great developer that will bid for it best regards
Tradingview developer 30 - 35 USD
Hey greetings. I am in need of tradingview developer that can modify an open source PineScript indicator code to add additional features. Kindly bid for this project if it is what you handle and let proceed with the project
In summary 1) The bot will only take Firm Buy and Firm Sell Signals . 2) The bot will use the SL and TP based on the indicator . 3) the risk to reward is 2:1 but when the price reaches 1:1 set SL to Breakeven 4) the bot will take Firm Buy and Firm sell after the candle closes with a firm buy or firm sell 5) make sure to give an option for number of contracts to be traded . 6) Bot will close all the trades EOD
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity
looking for help to get my ibkr automated, i have strategies already built in composer and have JSON for them, i really just need to he setup and explanation on how to maintain it and add new strategies
Would you kindly take a look at the attached indicator script that I want to turn into a strategy? The most important request is: Is there anyway to turn lines 156 and 157 into strategy long and short entry codes? They currently plot as labels but I would them to fire as alerts for strategy entries. //Save High & Low Labels Line 156
I am looking for someone who has experience working with the ZigZag indicator. I want to create a multi timeframe dashboard scanner based on ZigZag. I will explain more in private messages. if you feel capable & interest with that,please pm me for more details. thanks

Project information

Budget
30+ USD
For the developer
27 USD