Creation of a "FOR" loop in array

MQL4 Esperti C#

Specifiche

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



Con risposta

1
Sviluppatore 1
Valutazioni
(87)
Progetti
134
14%
Arbitraggio
41
22% / 29%
In ritardo
14
10%
Gratuito
2
Sviluppatore 2
Valutazioni
(115)
Progetti
129
18%
Arbitraggio
11
27% / 55%
In ritardo
4
3%
Gratuito
3
Sviluppatore 3
Valutazioni
(196)
Progetti
200
28%
Arbitraggio
0
In ritardo
3
2%
In elaborazione
4
Sviluppatore 4
Valutazioni
(167)
Progetti
192
11%
Arbitraggio
37
38% / 35%
In ritardo
5
3%
Caricato
5
Sviluppatore 5
Valutazioni
(14)
Progetti
14
21%
Arbitraggio
1
0% / 100%
In ritardo
1
7%
Gratuito
6
Sviluppatore 6
Valutazioni
(563)
Progetti
932
47%
Arbitraggio
301
59% / 25%
In ritardo
124
13%
In elaborazione
Ordini simili
Need ea according to stochastic divergence (both hidden and regular) plus candlestick flip .. need for experinced developers to complete my order with 99percent accuracy. So bet for it the budged is fixed and other plugins will be added in the v2
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

Informazioni sul progetto

Budget
30+ USD
Per lo sviluppatore
27 USD