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

 
AVOHR:
How do I write it correctly in an EA to determine an entry point based on two timeframes? More precisely: describe the parameters of a candle of a larger timeframe and a smaller one


Indicate clearly the timeframe.

For example:

   double MA=iMA(NULL,PERIOD_H4,14,0,MODE_EMA,PRICE_CLOSE,1);
   double MA=iMA(NULL,PERIOD_H1,14,0,MODE_EMA,PRICE_CLOSE,1);
 
DhP:


Specify explicitly the TF.

For example:

Thank you very much
 
tol64:


It goes something like this:


What to write instead of "ticket" in the "OrderDelet" function? If "ticket", it only deletes the last order that was opened.
 

I need to close one of the 2 pending orders. I can't figure out how to do it. Please write the full path, including the OrderDelete function.

I would appreciate your help!!!!!!

 

Good afternoon everyone!

I apologise in advance for the amateurish question, but if anyone has no difficulty, please write the code for opening an order at a specific time to within a second. I understand that the algorithm itself is simple, but I can't figure out the time handling.

 
Andreev:

I need to close one of the 2 pending orders. I can't figure out how to do it. Please write the full path including the OrderDelete function.

I would be grateful for help!!!!!!

And how to determine which of the two?

https://book.mql4.com/ru/trading/orderclose

 for (int i=1; i<=OrdersTotal(); i++)       //Цикл по всем ордерам,..
     {                                        //отражённым в терминале
      if(OrderSelect(i-1,SELECT_BY_POS)==true)//Если есть следующий
        {                                     
         // Здесь должен выполняться ..
         // ..анализ характеристик ордеров 
        }
     }                                        //Конец тела цикла

And filter by symbol if necessary, fully working example

https://book.mql4.com/ru/trading/ordermodify

 
Bora:

Good afternoon everyone!

I apologise in advance for the amateurish question, but if anyone has no difficulty, please write the code for opening an order at a specific time to within a second. I understand that the algorithm itself is simple, but I can't figure out the time handling.


To help, this, this and this.
 
Bora:

Good afternoon everyone!

I apologise in advance for the amateurish question, but if anyone has no difficulty, please write the code for opening an order at a specific time to within a second. I understand that the algorithm itself is simple, but I can't figure out the time handling.

Loop start. TimeCurrent() to compare with the desired time.

int start()
  {
    while (true)
      if (TimeCurrent()='19.07.2011 12:30:27') OrderSend();
  }
  
 
Roman.:

To help, this, this and this.

Thank you.
 
splxgf:

Loop start. TimeCurrent() to compare with the desired time.


thanks
Reason: