Questions from Beginners MQL4 MT4 MetaTrader 4 - page 210

Yevhenii Levchenko  
ponochka:
Can you tell me how to enable Alert on the close of a candle? Ie the meaning of this: The signal crossing the MA on TF 5, for example, but it is triggered somewhere in the 2nd minute, andAlert should work at the close of the current candle....

Can't the opening of a new one be checked as the previous one closed?

ponochka  
Yevhenii Levchenko:

On opening a new one, you can't do a check on how the previous one closed?

I don't understand! reformulate the question!

Yevhenii Levchenko  
ponochka:

I don't understand! reformulate the question!

The closing of a candle is at the same time the opening of a new one. Do a check for new candles and on this signal check the condition
Aleksei Stepanenko  
int i, eTotal=OrdersTotal();
for(i=0; i<eTotal; i++)
   {
   if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) continue;
   printf(OrderSymbol()+" : "+IntegerToString(OrderType())+" : "+DoubleToString(OrderOpenPrice(),
Digits)+" : "+DoubleToString(OrderLots(),2));
   }
Andrei Sokolov  

Greetings. Can you advise me?

I am making "arbitrage" EAs, which work on two terminals from different brokers and transmit Ask and Bid to each other. I have done so by writing the structure in binary file and reading the file by another EA.

The speed of transfer is proportional to frequency of reading/writing.

How "harmful" for the disk is such a thing, if frequency is, let's say, 10 times per second?

How can you make the data transfer not through the disk?

Vladimir Simakov  
Andrey Sokolov:

Greetings. Can you advise me?

I am making "arbitrage" EAs, which work on two terminals from different brokers and transmit Ask and Bid to each other. I have done so by writing the structure in binary file and reading the file by another EA.

The speed of transfer is proportional to frequency of reading/writing.

How "harmful" for the disk is such a thing, if frequency is, let's say, 10 times per second?

How can you make the data transfer not through the disk?

Through shared memory. True, the religion of the dll must allow for this)