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

 
Rustam Bikbulatov:
Hi. Can you tell me how to make the total number of orders on a pair. Currently counting separately buy and sell.
Please bookmark it.
 
Vitaly Muzichenko:
Bookmark it.

Thank you very much!!!
 
I have another question. My Expert Advisor is closing trades and waiting for the next candle to open a new order, although I have all the conditions to open an order immediately after it closes. I am working on a one-minute chart. I have a very annoying signal for this EA to work immediately and not wait for a new candle.
 
Rustam Bikbulatov:
I have another question. My Expert Advisor is closing trades and waiting for the next candle to open a new order, although I have all the conditions to open an order immediately after it closes. I am working on a one-minute chart. Please advise how to fix it and make it work immediately instead of waiting for a new candle.
Look for the new bar opening control in the code - it must be there.
 
Artyom Trishkin:
Look in the code for control of opening a new bar - it's probably there.


searched all over. i'm really new at this.

 
Rustam Bikbulatov:


I've been looking all over. I'm really new at this.

И?
 

Good afternoon. Question about arrays. I'm a beginner in programming - so my question is: In my robot the processing of positions goes through an array of structures and there is a need to reduce the entire array from the beginning, i.e. there is an array of 100 structures, the first 80 are already processed and I need to leave in the original array only the last 20 at the very beginning of the array. The flag that the position is still open is stored as a structure element.

 
Evgenii:

Good afternoon. Question about arrays. I'm a beginner in programming - so my question is: In my robot the processing of positions goes through an array of structures and there is a need to reduce the entire array from the beginning, i.e. there is an array of 100 structures, the first 80 are already processed and I need to leave in the original array only the last 20 at the very beginning of the array. The flag that the position is still open is stored as a structure element.

Isn't it better to delete the structure object as soon as it is no longer needed?
 
Artyom Trishkin:
Isn't it better to remove the structure object as soon as it is no longer needed?
They go in order in the array, and it's the order that counts.
 
Evgenii:
They go in order in the array, and their order is important.
Since the object is no longer needed, why would it be ordered in the list of objects? Delete it, and the list of required objects will remain as ordered.
Reason: