Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 322

 
LRA:
This is hardly the case ...
With a smaller lot it might work - partial execution.
 
Artyom Trishkin:
With a smaller lot it might work - partial execution.
Why does this happen and how do you deal with it?
 

Good afternoon.

I can't find the "advisors" folder in 7 vin.

I haven't traded for a couple of years, maybe something has changed since then!)

Can you please tell me how to load an EA in 4 Metatrader? Thank you

Files:
 

Hello, I have a question. The objective is to locate the price among the open orders. The trading is done on one currency pair. I think I will create an array of all orders and their open prices (Mas[OrdersTotal][OrderOpenPrice]). But how do I understand how open prices will be positioned in this array? From lower to higher or vice versa? Or by date of creation? Please advise!

 
vikzip:

Hello, I have a question. The objective is to locate the price among the open orders. The trading is done on one currency pair. I think I will create an array of all orders and their open prices (Mas[OrdersTotal][OrderOpenPrice]). But how do I understand how open prices will be positioned in this array? From lower to higher or vice versa? Or by date of creation? Please advise!

Write an array, and sort it by required parameter ArraySort(...)

 
Vitaly Muzichenko:

Write an array, and have it sorted by the required ArraySort(...) parameter.

Vitaly Muzichenko:

Write an array, and sort it by the required parameter ArraySort(...)


And what does"Sort numeric arrays by the first dimension" mean?

 
vikzip:

Thank you))

 
sergey savchenko:
Good afternoon.
I can't find the "advisors" folder in 7 vin.
I haven't traded for a couple of years, maybe something has changed since then!)
Can you please advise how to load an EA in 4 Metatrader? Thank you
In the terminal, press F1 and select Start and then Start and Data Structure. Read about new data structure and /portable key
Apparently what you are showing is the installation folder. If you don't use the /portable switch, you will find the data directory under File, open data directory.
If you use the /portable switch, the data directory will be in the installation directory.
Only you need to install it to a drive other than the system drive. Or at least in the root of the drive instead of the Program Files folder
 

Hi, again a question about arrays) I have created an array of all open orders and their prices

int OT=OrdersTotal; //number of open orders in the terminal

double Price =OrderOpenPrice(); // Price of the selected order.

double Mas [OT][Price]; //array to arrange all orders

ArraySort (Mas,WHOLE_ARRAY,0,MODE_DESCEND); // now the open prices are in descending order

My question is, how can I find out between which orders a price is located, or is it (the price) located outside the array? Please give me a hint!))

 
it seems to be

ArrayBsearch


Reason: