Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 420

 
TarasBY:
Compare the opening price with the current price - Delta (difference) will be the attribute by which you can sort orders.

It's elementary, I agree. All you have to do is choose the minimum Delta - that's the closest price to the market, which is what I need. Yes, it's understandable, I've come up with a dozen and a half similar methods myself. If I could implement it .... I need help not in words, but preferably with code or link. After all, this is what the forum is for. Not just rant and rave.

 
TarasBY:
Compare the opening price with the current price - Delta (difference) will be the attribute by which you can sort orders.

Please tell me a program which uses a search with parameters (price, not ticket, not magik, not ...), by which I could choose any order (Buy, Sell, Buy Stop, Sell Stop - each a few pieces) with the price I am interested in, for example from five Buy Stop orders - the average.

 
Melko:

Please tell me a program which uses enumeration with parameters (price, not ticket, not magik, not ...), by which I could choose any order (Buy, Sell, Buy Stop, Sell Stop - each a few pieces) with the price I am interested in, for example from five Buy Stop orders - the average.


I told you that about 4 months ago, when I've just started to learn mql4, I've seen an implementation, similar to Kim's style in some EA (search for yourself)

Now it's no problem for you to write what you need, as it is for many people.

Since freebies "deted", the question is the incentive, for me personally.

If the effort were in the form of code, there would be help.

 
Ekburg:

That's a good spread then)

There are smaller spreads, so I was surprised to see such a spread.
Although, it's not easy for a broker to do trades with a paltry 0.01 lot (5 - mark).
 
Link_x:

Sometimes less, so I was surprised to see such a spread.
Although, it's not easy for a broker to execute trades with a paltry 0.01 lot (5 - mark).

The 0.01 lot is not a problem for him. They do not take it to the interbank market, and even if they do, they form an aggregate lot of their clients.
 
If anyone has encountered a solution to a similar problem, please give me a link:

On-Line to an array to write the results of the trades :

double MsOLL[][6];           // Массив результатов ВСЕХ сделок
                             // [][0]  = Size_MsOLL   порядковый номер записи в массив
                             // [][1]  = PO           Цена, по которой открыта сделка
                             // [][2]  = TO           Количество секунд в момент открытия сделки
                             // [][3]  = PC           Цена, по которой закрыта сделка
                             // [][4]  = TC           Количество секунд в момент закрытия сделки
                             // [][5]  = Res          Результат сделки (в пунктах)
The array only needs to store the results of the last day's trades
 
Leo59:
If anyone has encountered a solution to a similar problem, please give me a link:

The results of the trades are written to an array on-Line :

The array only needs to store the results of the last day's trades




Order bookkeeping
 

The warning in the new compiler possible use of uninitialized variable 'Lot' Expert.mq4 275 8

how do i remove it? and why does it show up?


//+-------------Рассчет лота----------- -----------------------------+

double SizeLot()
{
  double Lot;


  

   if (Lot<0.01) 
       Lot=0.01;
  return(NormalizeDouble(Lot,2));
}
//+------------------------------------------------------------------+
 
vadynik:

The warning in the new compiler possible use of uninitialized variable 'Lot' Expert.mq4 275 8

How do I get rid of it?



declare it as double Lot=0;

you are using an autoinitialized variable

 
ALXIMIKS:


declare it as double Lot=0;

you use an auto-initialised variable


Right, thank you.
Reason: