Questions from Beginners MQL4 MT4 MetaTrader 4 - page 136

 
Ihor Herasko:

Only enter the appropriate parameter:

You should therefore think 100 times before using static variables in an EA. In a script or indicator is another matter.

I see, thank you for your answer.

 
Hi. Can you tell me how to close an order after a certain time?
 
Sacred70:
Hi. Could you advise me how to close an order after a certain time?

  1. Set the time in seconds.
  2. At every tick, go through all open orders and calculate the difference between the current time and the open time of the order.
  3. If the obtained difference is greater than or equal to the specified time in seconds, then close the order.

 
There is no BRN oil symbol in the mobile version.
is it supposed to be?
 
Sobbaka:
There is no BRN oil symbol in the mobile version.
is it supposed to be?

It could be called something else. For example, I know the BCOUSD variant.

 
Ihor Herasko:

It may be called something else. For example, I know of a variant called BCOUSD.

No such thing either. I haven't found anything similar.
Doesn't anyone know?
 
I wrote an owl, started optimising, and it's very slow, even though there are only 5 parameters and the optimisation is by closing prices. How can I reduce the optimization time?
 

Will trade orders be executed from the indicator in MQL4?

The compiler doesn't complain about them, it doesn't give any error messages.

Of course I will check it myself, but can anyone tell me right away?

 
Игорь Васильев:

Will trade orders be executed from the indicator in MQL4?

The compiler doesn't complain about them, it doesn't give any error messages.

Of course, I will check it, but maybe somebody will tell me right away.

No, they won't. The documentation directly states that they won't. There are other limitations for indicators, take a look.

 
Ihor Herasko:

They won't. This is explicitly stated in the documentation. There are other restrictions for indicators, look it up.

It's strange, why the compiler doesn't inform about it, when it sees the trade commands in the indicator code.

We'll have to pull the trading part out of the indicator into the EA now, linking it to it via ICustom().

It looks like "no tail on the mare and a bow on the side".

Reason: