Creation of a "FOR" loop in array

MQL4 Experts C#

Termos de Referência

//----------------------------------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.



Respondido

1
Desenvolvedor 1
Classificação
(87)
Projetos
134
14%
Arbitragem
41
22% / 29%
Expirado
14
10%
Trabalhando
2
Desenvolvedor 2
Classificação
(115)
Projetos
129
18%
Arbitragem
11
27% / 55%
Expirado
4
3%
Livre
3
Desenvolvedor 3
Classificação
(204)
Projetos
209
28%
Arbitragem
0
Expirado
3
1%
Livre
4
Desenvolvedor 4
Classificação
(172)
Projetos
195
11%
Arbitragem
37
38% / 35%
Expirado
5
3%
Carregado
5
Desenvolvedor 5
Classificação
(14)
Projetos
14
21%
Arbitragem
1
0% / 100%
Expirado
1
7%
Livre
6
Desenvolvedor 6
Classificação
(564)
Projetos
933
47%
Arbitragem
302
59% / 25%
Expirado
125
13%
Trabalhando
Pedidos semelhantes
Hello, I’m looking for a TradingView indicator that fits my forex trading needs. If you can create or customize one for me, please reach out. I'd appreciate your help! Best regards ridynaty
Hello Great Developer i need developer to create Expert Advisor in MT5 it is too easy script , just continues buying (order after order) , if not continues within (# of hours) average strategy start .. and no connection between buying orders and selling orders .. input 1- first order 2- first order profit 3- average size 4- number of hour 5- pips add on breakeven i want to be sure the averaging strategy
I already have a thinkscript, but I need to know if it is possible since I have done a lot of research already on the matter. Basically, I have a DoubleTop and DoubleBottom thinkscript indicator, which is based on futures bars. It prints a Pivot dot with a label when there is a DoubleTop or DoubleBottom on the chart. I can then see this on whatever time-frame I switch to. I would like to have the Scan - Alert
Hello Great developer can you Create a NinjaTrader strategy for me 1. Identify yesterday’s range (high and low) between 13:30 and 16:00. Call this the NY PM Range. 2. Wait until price trades above the NY PM Range High or below the NY PM Range Low in Regular Trading Hours (9:30 to 16:00) 3. If price trades above the NY PM Range High, Set a Stop Market Order Short at low of the previous candle. Continuously adjust the
Hello, i need a very experienced developer for my project, I have an existing ctrader bot that I need modification for. If you can do this let me know please. Thanks
Hey greetings My please to met you Am in need of a tradingview developer that can create alert for me based on a tradingview indicator kindly bid for this project if it is what you can do for me
Hey greetings am in need of a developer that can convert my simple tradingview indicator to MT4 I have the source code of the indicator and is also a public indicator on Tradingview site Kindly bid and let started
can you help me with Ctrader i need modification on the linkhttps://docs.google.com/document/d/1fggk49xWbnwahtfOlE-U7G6muZB1FT8eWmftGiY7R-s/edit?usp=sharing can you assist with cTrader modifications to enhance functionality and improve performance. do text me if you a professional on it i will be looking forward to your response best regards
Hello, thank you for your interest in my project. I want to develop a simple piece of code in ninjascript that does not exceed 8 lines of code. I will give the details of the code in the messages. the work is urgent Thank you
I hope you're doing well. I am interested in learning more about your EA (Expert Advisor) trading bot. Specifically, I would like to review some performance data, particularly regarding the Profit and Loss (P&L) over recent weeks. Could you kindly provide a short video with today's date, showcasing the weekly stats from the last two months? I am looking for data covering the period from August 1st, 2024, to October

Informações sobre o projeto

Orçamento
30+ USD
Desenvolvedor
27 USD