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

 
ikatsko: What I do not understand from the fragment: iTime will give the value of bar opening time shifted relative to the current time by the number of_ bars_to_pass. It means that the time thus obtained will always be lower than the current time. With each new bar it will also be shifted upwards. And all this is tied to ??? So what? How will it work for skipping a bar?

Replace OrderOpenTime with the time of your command

f(iTime(Symbol(),period_bar,number_of_bars_to_skip)<your_command_time) return

 
paukas:

Replace OrderOpenTime with the time of your command

f(iTime(Symbol(),period_bar,number_of_bars_to_pen)<your_command_time) return

I think I've got it. time_your_command sets the start of the next bar and thereturn stops after the_bars_to_skip ! Neat. Thanks !
 
Bicus:

What could be more complicated than that?

The 0-th element of the array will have the price of the last tick, the 1st element will have the price 1 tick ago, the 2nd element will have the price 2 ticks ago etc.

Or did I misunderstand something and meant something else?

I'm new to this, I'm learning from a textbook on my own - can you spell it out for me?
#property copyright "Bicus"
#property link      "Bicus"


double aPrices [5]; //мы объявили массив с пятью значениями внутри

void PutStack (double p_Price) //вот мне не понятно. Эта функция выступает как шаблон? Она показывает программе, как работать? Объясните что это плз.
{
  int nCounter; //создали переменную целого числа
  
  for (nCounter = 4; nCounter > 0; nCounter--) //это цикл, который начинается с 4х и идет к нулю (я так понял - он будет сохранять 4 тика)
    aPrices [nCounter] = aPrices [nCounter - 1]; //присваиваем массиву (например) с номером 3 значиние массива с номером  2 (а разве надо не наоборот?). 
    
  aPrices [0] = p_Price; //если p_Price - это тик, то в этой строчке мне все понятно - мы присваиваем первому значению массива настоящий тик.
}

int start()
{
  int nCounter; //опять создали переменную целого числа
  
  PutStack (Bid); //тут не понятно... Putstack=Bid?
  
  for (nCounter = 0; nCounter < 5; nCounter++) //тут создаем цикл, который идет от нуля, чтоб заполнять массив, но почему внутри его нет массива? он не нужен?
    Print (nCounter, "-й тик: ", DoubleToStr (aPrices [nCounter], Digits)); //тут выводим значение
}
 

Good afternoon, dear experts.

I searched all the Help and haven't found any answers on forums. The question is simple: does MQL4 have a simple functionality to report the time a pending order triggers or not?

From the available information, there is no such a function. The OrderOpenTime() function indicates the time when a pending order was placed for execution but it seems to me that we would not be able to find out the time when it became a market order without using an EA to track order status on the account.

Please advise if someone knows a simple solution. The Expert Advisor is rather unproductive, there is no sense in using it permanently if its services are required only once or twice a day. We need something simpler, it would be a built-in function, which would inform about the time of its triggering... The trader needs it for proper accounting of orders by their opening time, so that, for instance, it is always possible to say which of the orders currently open or have already been closed has the latest opening time. In the case of the pending order, we cannot do this. The pending order could be placed 2 hours ago and close an hour ago, in that interval of an hour other orders may open and close and in the terminal the time of opening of the pending order that has become a market one is 2 hours and we need to know the actual time of its triggering.

I will be glad to get your comments.

 
Starting:

Good afternoon, dear experts.

I searched all the Help and haven't found any answers on forums. The question is simple: does MQL4 have a simple functionality to report the time of pending order triggering or not?

From the available information, there is no such a function. The OrderOpenTime() function indicates the time when a pending order was placed for execution but it seems to me that we would not be able to find out the time when it became a market order without using an EA to track order status on the account.

Please advise if someone has a simple solution. The Expert Advisor is rather unproductive, there is no sense in using it permanently if its services are required only once or twice a day. We need something simpler, it would be a built-in function, which would inform about the time of its triggering... The trader needs it for proper accounting of orders by their opening time, so that, for instance, it is always possible to say which of the orders currently open or have already been closed has the latest opening time. In the case of the pending order, we cannot do it. The pending order could be placed 2 hours ago and close an hour ago, in that interval of an hour other orders may open and close and in the terminal the time of opening of the pending order that has become a market one is 2 hours, but I want to know the actual time of its triggering.

I will be glad to get your comments.

I don't understand why you're not happy with the EA, you're not going to make a complex neural network based trading system with self-optimisation, you just need to check every tick to see if the pendulum is working and when it does you would get a text message on the screen or audio or both, the calculator can do that, nothing to worry about or do you have problems writing the computer?
 
CLAIN:
I'm new to this, learning from a textbook on my own - can you spell it out for me?

Doesn't the textbook answer your questions?
 

Carried over:

Pyxlik2009 14.10.2011 03:52

Guys tell me what the error means (invalid integer number as parameter 10 for OrderSend function) and how to fix it ?

 

Good day to all, program code expert!

If you could explain me the situation, in my EA the whole point of placing an order is at a certain time and one order per day:

int H=Hour(),
    M=Minute();
if(H>=21 && M>=40)
{
   {
    Alert("Ордер открыт-",Ticket);
    return(0);
    }
   else 
   {
   Alert("Ошибка№=",GetLastError());
   return(0);
   }
}

But I noticed thatif(H>=09 && M>=40) andif(H>=21 && M>=40) have the same conditions and it turns out that the order will be placed at least twice a day.

What should I do to avoid this problem?

Thanks for the support!

 

Starting:

.... It is unproductive to make an expert as an expert, and it makes sense to have an expert on a regular basis, if his or her services are needed once or twice a day.


There is such a thing as a script. When you need it, you run it.
 
Valdemar:

...I noticed thatif(H>=09 && M>=40) andif(H>=21 && M>=40) conditions are the same and it turns out that the order will be placed at least twice a day.
What else should I have done to avoid this problem?

Please check FAQ frequently, there is a huge number of examples, which may be useful. And you can build your own functions based on them.
isTradeTimeString - Returns the flag allowing to trade by time.
isTradeTimeInt - Returns flag to allow trading by time.