Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 13
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
Maybe so:
Other thoughts don't come...
You're reading between the lines. Anyway, look at what you put in the loop in the first place. The loop's action area...
Good afternoon! I can't get this condition to work:
OrderCloseTime()!=hour()
I want no more than one order to be opened in an hour!
All the same orders are opened!
Good afternoon! I can't get this condition to work:
OrderCloseTime()!=hour()
I want no more than one order to be opened in an hour!
But all the same orders are opened! What can it be?
First of all: OrderCloseTime() - this is the time of order closing. If the order is not closed, it is equal to zero. You need to look at the time of opening.
Secondly: Hour() - this is the hour of start of the EA, and this hour does not change during the execution of the program. You need to compare it with the time of the last quote arrival - TimeCurrent()
This function returns the number of seconds after the last position of the current symbol was opened:
I.e., to check the number of seconds after the opening of the last Buy position with Magic, you need
First: OrderCloseTime() is the time to close the order. If the order is not closed, it is equal to zero. You need to watch the open time.
Second: Hour() - this is the hour of start of the Expert Advisor, and this hour does not change during the execution of the program. You need to compare it with the time of the last quote arrival - TimeCurrent()
This function returns the number of seconds after the last position of the current symbol was opened:
I.e., to check the number of seconds after the opening of the last Buy position with Magic, you need
thank you for the function! don't you have another one?! so that only one order is opened per bar?!thank you for the feature! don't you have another one?! so that only one order opens per bar?!
same thing, only check for the number of bars, not seconds
same thing, only check for number of bars, not seconds
It works! But when i close an order by TP, a new one will open right away!
same thing, only check for the number of bars, not seconds
it works! But when an order closes on TP, a new one opens instantly! How can we fix it?
So we need to do another check: for the number of bars after the last order was closed: