Help EA hourly entry

 

Hello everyone

I am creating an ea but I have a problem. The EA should enter once per hour.

Example: from 10 to 11, the signal is at 10:15, enters the market, at 10:40 there is another signal, the expert nowhere to go, but it can come back from 11 to 12.

The expert then has to take the first signal of each hour , when there are other signals in the same time slot must leave them .

I can not understand how I can do and I can not find expert on which I can elaborate

any help??

 
gio10:

Hello everyone

I am creating an ea but I have a problem. The EA should enter once per hour.

Example: from 10 to 11, the signal is at 10:15, enters the market, at 10:40 there is another signal, the expert nowhere to go, but it can come back from 11 to 12.

The expert then has to take the first signal of each hour , when there are other signals in the same time slot must leave them .

I can not understand how I can do and I can not find expert on which I can elaborate

any help??

Hello,

I need the code to help you.

Best Regards.

 
if (OrdersTotal()<=0)

{

if (Hour()>=10 && Hour()=11 && Hour()=12 && Hour()=16.30 && Hour()=17 && Hour()<=18)

{

OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY);

Print(OrderCloseTime());

if(OrderCloseTime()<(TimeCurrent()-10*Period()*30))

what I managed to do is this . it works but sometimes if the operations are too close , as one towards the end of the hour and the other at the very beginning of the next, does not go to market

Reason: