[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 426

 
nadya:
OrderSend returns an integer value, it is not a Boolean function, be careful

Oh man, that's the second time I've fallen for that. Thanks
 
sss2019:

Oh, man, that's the second time I've fallen for that. Thank you
Glad I could help.)
 

Tell me what it means. I don't fully understand.

SELECT_BY_POS - в параметре index передается порядковый номер позиции в списке,

The sequence number of the position means

OP_BUY - 0

OP_SELL - 1

OP_BUYLIMIT - 2

OP_BUYSTOP - 3

OP_SELLLIMIT - 4

OP_SELLSTOP - 5

Or something else?

 
sss2019:

Tell me what it means. I don't fully understand.

The sequence number of the position means

OP_BUY - 0

OP_SELL - 1

OP_BUYLIMIT - 2

OP_BUYSTOP - 3

OP_SELLLIMIT - 4

OP_SELLSTOP - 5

Or something else?

The order type (OrderType ) and the position number is the number of the orders currently open in the account.

For instance, 10 BUY orders at EURUSD and another 5 SELL orders are open - we have to distinguish them somehow. So firstly each of them has a ticket - a unique number, and secondly - a serial number (from 0 to 14 in the example).

 
ilunga:

What you have listed is the order type (OrderType) and the position number is the number of the currently open orders in the account.

For instance, in your EURUSD you have 10 BUY orders and another 5 SELL orders which need to be distinguished somehow. So firstly each of them has a ticket - a unique number, and secondly - a serial number (from 0 to 14 in the example).


And the older is the order, the less is its number? And it is the same with tickets - the older the ticket, the smaller it is?
 
sss2019:

So the older the order, the lower the number? Is it the same with tickets - the older the ticket, the smaller the ticket?
Theoretically yes, practically not necessarily
 
sss2019:

So the older the order, the lower the number? And is it the same with tickets - the older the ticket, the smaller the number?

It is better to choose by opening time (OrderOpenTime) - then you know exactly which order is older
 
jhg
 
T-G:
What do you think? Since I'm asking, yes!

Try deleting the history in the quote-period archive, then re-download, if that doesn't work, then delete it in the download too.
 

Hello, I've already written help please, I can't figure it out I wrote a script for some reason I can't get the minimum price for the last 9 bars can I be dumb and most likely this is it, help please...

//+------------------------------------------------------------------+
//|                                                         test.mq4 |
//|                      Copyright © 2011, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
int i_time,bars;
double Level,Price,clock,low_bars,high_bars,min_korob;
   bars=9;
   min_korob=0;
   Alert("new");
   for(i_time=0;i_time<bars;i_time++)                            // для 9 свечей
   {  
   low_bars=Low[i_time];                                         // минимальная цена текущей свечи
   high_bars=High[i_time];                                       // максимальное значение текущей свечи   
      if(min_korob<low_bars)                                     // нахождение минимма из n баров
         {
         min_korob=low_bars;
         }
   }
   Alert(min_korob); // вывести минимум
 

//----
   return(0);
  }
//+------------------------------------------------------------------+
Reason: