[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 163

 

yes yes... that's right... thank you so much for letting me know... found what I was looking for... I'll look into it now...

 
If you know MQL4 please advise why I tried the same settings in the Strategy Tester and operated at the same timeframe, I got different results, i.e. i got a drastic drawdown and profit.
 
and there are no telepaths here yet - they're on holiday... There's definitely an error in the code... as G said.
 
Tesla555:
Who knows MQL4 please advise why when I run the EA in the tester with the same settings and on the same timeframe, I get different results, significantly in the drawdown and in profit.

Disconnect the terminal from the internet.

it's all about the spread / stop level

 
Alexandr24:
Dear forum users, how can I get the time of the arrow drawn? For example, the arrow is drawn if (Ckose[0]>High[1]-5*Point && Ckose[0]<High[1]+5*Point ) but once the arrow is drawn, the time keeps changing.ar",OBJPROP_TIME1); the time keeps changing, probably, because Close[0] is in this zone; however, the arrow is static and time is deducted from it at every tick in the arrow zone; how should I know only the time of arrow creation?
Guys, can anyone help?
 

There is nocreation time for the object.

You need to change the logic. or store the time of the condition in a variable of your own

 
Please tell me (or give me a link) what or how to add to the Expert Advisor, so that after opening a position, to block for N seconds the opening of any other position on any currency pair. Many thanks in advance.
 
paladin80:
Please tell me (or leave a link) what or how to add in the EA, so that after opening a position, block opening of any other position for N seconds on any currency pair. Thanks in advance.
void Sleep( int milliseconds)
The function delays execution of the current expert or script for a specified interval.
The Sleep() function cannot be called from custom indicators, as indicators are executed in the interface thread and must not slow it down.
The function has built-in check of the status of the expert's stop flag every 0.1 second.
Parameters:
milliseconds - Delay interval in milliseconds.
Example:
//---- wait for 10 seconds Sleep(10000);
 

r772ra

The point is different. If the EA has opened a position on EUR/USD, and at the same time, for example, on GBP/USD, there is also a signal for position opening, then the sending of the order for position opening to the server should be delayed for N seconds. Sleep() will "sleep" the Expert Advisor on the current symbol. There is something like a flag or something like that, from which all advisors for all currencies read the permission to make a deal.

 
There is a function: TimeCurrent().
When opening a position, remember the value of this function, and when you want to open a new position, check the difference between the current value and the remembered value of this function.