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

 
vovan-gogan:

Sorry, but could you take it easy?) Help me understand what the error is in

Bid == Delete_Level

Think about it - the Expert Advisor works with the arrival of a tick (another quote).

Your Delete_Level, for example, is equal to 1.0010 ... Let's dance from here. A quote Bid=1.0011 has arrived - the condition is not fulfilled. On the next tick Bid=1.0008 - the condition is not fulfilled. It seems that the price has crossed your closing level. And there was no equality.

 
Alexandr24:
Does anyone know how to solve this problem?
Maybe there are no proper five-minute bars at the start of the period being tested. Does it not work for any sometime or for one that includes the current thirty minute bar? or the tester may be limiting attempts to look ahead.
 
splxgf:
Maybe there are no proper five-minute bars at the start of the period being tested. Does it not work for any sometime or for one that includes the current thirty minute bar? or the tester may be limiting attempts to look ahead.
Thanks very much for the tip! hadn't noticed that there were no 5 minute candles yet at the start of the test.
 
first_may:
sergeev:

and what is the date in your understanding and in the understanding of MQL ?
I would like to do a check before placing an order.
strange answer to the question about the date.
 
Roll:


I think there is a logical error in your code. Pay attention to the "ticket" variable.


Ticket is ok, but SL and TP are not set correctly. And the price is not checked for proximity to the bid.
 
Please help, the advisor modifies the order very often (it has to), but before closing it suddenly gives an ordermodify error 1, but also not always
 
LazarevDenis:
Please help, the advisor modifies the order very often (it has to), but before closing it suddenly gives an ordermodify error 1, but also not always
When you modify an order, you pass all parameters equal to those already set
 
ilunga:
When modifying, you pass all parameters equal to those he already has set

I have already put a lot of restrictions on order modification and still I get 1 error per order. If something is not clear, I can give you the code
 
LazarevDenis:

I have already put a lot of restrictions on order modifications but I still get 1 error per order. If something is unclear, I can output the code

print at OrderModify==false the modification parameters and the current order parameters + GetLastError
 
sergeev:
strange answer to the question about the date.


Yes I agree, I didn't say it right. I have read help and decided to write it like this:

// my EA may place orders every day of the session
// from 10-45 to 18-30
if (Hour()>=10 && Minute()>=45 && Hour()<=18 && Minute()<=30)
{
...
}

So is the condition for checking the time correct?