[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 56
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
Yes, I agree, I mispronounced it. After reading help, I decided to write it like this:
// the Expert Advisor can place orders every day of the session
// during the period from 10-45 to 18-30
if (Hour()>=10 && Minute()>=45 && Hour()<=18 && Minute()<=30)
{
...
}
Is this the correct condition to check the time?
No. You won't trade with this condition at all, since Minute()>=45 && Minute()<=30 is impossible in principle.
No. You won't trade at all with this condition because Minute()>=45 && Minute()<=30 is impossible in principle
So, you cannot compare hours and minutes separately? So, 11-55, for example, corresponds to the first condition, as 11>=10 & 55>=45, but not to the second one, as 11<=18 & 55<=30. Although in real life, 11-55 is just in the vinterval of hours from 10-45 to 18-30.
It turns out that we cannot compare hours and minutes separately? For example 11-55 suits the first condition, as 11>=10 and 55>=45, but not the second, as 11<=18 and 55<=30. Although in real life, 11-55 is just in the vinterval of hours from 10-45 to 18-30.
you must create your start and end time with e.g. StrToTime
you have to create your own start and end times, e.g. StrToTime
Here, using the last known server time, wrote:
if (TimeCurrent()>=StrToTime("10:45") && TimeCurrent()<=StrToTime("18:30"))
{
...
}
Now 11-55 will fall into the 10-45 to 18:30 interval?
Will 11-55 now fall between 10-45 and 18-30?
Yes.
Thank you very much! :)
People, with all these global and local variables, I'm about to start running around barefoot and blowing sparrows. Man, I don't understand why there's so much headache in the middle of nowhere!
People, with all these global and local variables, I'm about to start running around barefoot and blowing sparrows. Man, I don't understand why there's so much headache in the middle of nowhere!!!!
As far as I know from MQL4 tutorial, now the new value of global variable Orders should equal 1. The next iteration should be 2, then 3. Then 4. And so on, until the Expert Advisor places pending orders. But I do not understand why the EA does not place pending orders! After placing another pending SELLSTOP order, every time I see only one message: Orders = 1! What is the reason? Can it be because of MetaEditor?The reason is that you have more market orders opened on this trading account.
The reason is that you have more market orders open on this trading account.
The saddest thing is that this happens in the tester. and pending orders are placed by the EA, but the Orders always equal 1
The saddest thing is that this happens in the tester. The Expert Advisor places pending orders and Orders always equals 1
I guess you didn't phrase your question correctly.