DebutList[a] is a list of different time in string format.
I just want that if ticket > 0 , boucle is done now and will begin again when the next string time is coming.
I tried boulce for and while but logically no good results. Cause i use time interval, i lose some open trade cause no ticks were there during the interval. And sometimes cause there is 3 ticks during this interval it open 3 orders.
If i could have a small counter which say: if order opened (ticket >0) stop the boucle to the next new time (DebutList[a]). It not a problem if one order is open and the last order which was opened by the last signal is opened too.
i was searching in the forum but no codes seems to be a solution for my problem.
Could you also explain what you are trying to achieve ? what are the times held in the DebutList array ?
Sorry, in french we said boucle, it's cycle operator for and while.
time are 11:30 and 15:00 in the array.
I just want to stop ordersend when a first order is opened when time is 11:30. So when time is 15:00, the EA have to OrderSend again. The first order opened in 11:30 could be opened too. So it's possible that the two orders are opened a same time. I just want one order per hour without close the last to allow open the second order.
Sorry, in french we said boucle, it's cycle operator for and while.
time are 11:30 and 15:00 in the array.
I just want to stop ordersend when a first order is opened when time is 11:30. So when time is 15:00, the EA have to OrderSend again. The first order opened in 11:30 could be opened too. So it's possible that the two orders are opened a same time. I just want one order per hour without close the last to allow open the second order.
So all you need to do is first check the currently open orders . . . if you have an order that has an OrderOpenTime() of between 11:30 and 14:59 and the time is currently between 11:30 and 14:59 you don't open a new one . . . then do the same for 15:00 to ??:??
Read what I wrote not what you thought I wrote . . . check the Open orders, if there is already one opened for the current time do not open a second . . . for the current time . . . . do the same at the 2nd time, 15:00 . . .
Read what I wrote not what you thought I wrote . . . check the Open orders, if there is already one opened for the current time do not open a second . . . for the current time . . . . do the same at the 2nd time, 15:00 . . .
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Ok it was nice. I did place codes in my EA.
I up this topic cause for this part:
i don't need count all OrderType.
DebutList[a] is a list of different time in string format.
I just want that if ticket > 0 , boucle is done now and will begin again when the next string time is coming.
I tried boulce for and while but logically no good results. Cause i use time interval, i lose some open trade cause no ticks were there during the interval. And sometimes cause there is 3 ticks during this interval it open 3 orders.
If i could have a small counter which say: if order opened (ticket >0) stop the boucle to the next new time (DebutList[a]). It not a problem if one order is open and the last order which was opened by the last signal is opened too.
i was searching in the forum but no codes seems to be a solution for my problem.
Thanks for all your help !
Ok it was nice. I did place codes in my EA.
I up this topic cause for this part:
boucle ? can you explain this in English please ?
Could you also explain what you are trying to achieve ? what are the times held in the DebutList array ?
boucle ? can you explain this in English please ?
Could you also explain what you are trying to achieve ? what are the times held in the DebutList array ?
Sorry, in french we said boucle, it's cycle operator for and while.
time are 11:30 and 15:00 in the array.
I just want to stop ordersend when a first order is opened when time is 11:30. So when time is 15:00, the EA have to OrderSend again. The first order opened in 11:30 could be opened too. So it's possible that the two orders are opened a same time. I just want one order per hour without close the last to allow open the second order.
yes but i tried other ways and no results. ask and bid are it:
ask = MarketInfo( symbol(), Mode_ASK);
bid = MarketInfo(Symbol(), Mode_BID);
Sorry, in french we said boucle, it's cycle operator for and while.
time are 11:30 and 15:00 in the array.
I just want to stop ordersend when a first order is opened when time is 11:30. So when time is 15:00, the EA have to OrderSend again. The first order opened in 11:30 could be opened too. So it's possible that the two orders are opened a same time. I just want one order per hour without close the last to allow open the second order.
No no:
if time is 11:30 Open a position only one.
if time is 15:00 Don't look if the first position (opened in 11:30) is open yet, open a position only one. Don't care if the is opened yet !
i just want limit at 1 trade per string hour when it arrives like that:
I don't know how to do, that's why i ask for help. I see the logic but not how to write.
i tried that:
No effect to stop multi opening tradeNo no:
Yes, Yes.
Read what I wrote not what you thought I wrote . . . check the Open orders, if there is already one opened for the current time do not open a second . . . for the current time . . . . do the same at the 2nd time, 15:00 . . .
Yes, Yes.
Read what I wrote not what you thought I wrote . . . check the Open orders, if there is already one opened for the current time do not open a second . . . for the current time . . . . do the same at the 2nd time, 15:00 . . .
Ah yes i understood write like that.
I will try code it,
thanks a lot.