![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.