[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 23

 
Mathemat:

Artem, the trick here is that there is a line like this below:

So the way you suggested doesn't make much sense - if I understand correctly what alex12 wants.

Alex, so there's (out of the corner of my eye) an overshoot of terminal orders... So the line says - if it is not our symbol, then look for
 
alex12:

Only one error - don't know how to fix it. Where is the problem ?

'Symbol' - initialization expected C:\Program Files\MetaTrader Finam\experts\1.mq4 (8, 13)

'Symbol - initialization expected C:\Program Files\MetaTrader Finam\experts\1.mq4 (8, 13)

Thank you. But 3 other errors appear ))
 
artmedia70:

You have:

You have to:

Actually, you can double-click on the error message and the cursor will move to the specified (by the way) place where the compilation error occurred, i.e. here: (8, 13)

After that, other mistakes will come... :)

Move the above line to the beginning of the start() function

That's a start - then deal with other errors...


That's what I didn't want, more mistakes coming in :)
 
alex12:
That's what I didn't want, more mistakes coming in :)

A completely crazy expression:

if  NormalizeDouble(tp,sl,Digits)       // Выбор самого близкого орд    
 

There is a condition to start the code:

if(EndHour>Hour() && Hour()>BeginHour)

It works when EA is intraday.

How do I make my EA trade from 22:00 to 03:00, for example?

In the evening, the wok does not work at all for me... Help please!

 

Replace AND with OR.

if(BeginHour>Hour() || Hour()>EndHour)

 
Roger:

Replace AND with OR.

if(BeginHour>Hour() || Hour()>EndHour)

Thank you! Only in addition to || you need to replace "more" signs with "less"... I'm clarifying it for others.

By the way, while you were writing the answer, I invented one more solution with else:

if(EndHour<Hour() && Hour()<BeginHour) //condition for working time

{/*empty*/}else

{/*code EA*/}

 
Roger:

Replace AND with OR.

if(BeginHour>Hour() || Hour()>EndHour)


Or - if(!(EndHour>Hour() && Hour()>BeginHour))
 

There is also hardware. I have a timer that switches the lights in the aquarium on and off. The computer can handle the power.

 
tara:

There is also hardware. I have a timer that switches the lights in the aquarium on and off. The computer can handle the power.


And if an octopus-predictor is launched into this aquarium, we will get a trading system. And such a timer would be priceless!