if ((TimeCurrent()-OrderOpenTime())<3*60) return; //или что-то в этом роде, зависит от существующего кода.
if the closing condition is later than 3 minutes after order opening, then the order will not close before that (of course, if it is not a pending order, but even that one is deleted by itself no earlier than 10 minutes)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Здравствуйте,
Как сделать чтобы советник не закрывал сделку раньше 3 мин.??
Может кто подскажет, что и где прописать?
if ((TimeCurrent()-OrderOpenTime())<3*60)
return; //or something similar, depends on existing code.
if ((TimeCurrent()-OrderOpenTime())<3*60)
return; //или что-то в этом роде, зависит от существующего кода.
if the closing condition is later than 3 minutes after order opening, then the order will not close before that (of course, if it is not a pending order, but even that one is deleted by itself no earlier than 10 minutes)
double Lots;
double m = 0.1;
for (m = 0.1; AccountFreeMarginCheck(Symbol(),OP_SELL,m)>150; m = m + 0.1)
{
Lots = m;
}
Почему у меня Lots всегда оказывается равен нулю?
So, can anyone tell me what's wrong with the code?
Всмысле покажи?)
dumbfounded ))
Ну что, подскажет кто-нибудь что не так в коде?
AccountFreeMarginCheck(Symbol(),OP_SELL,m)>150 this expression is initially false
Outputs -1000000000000
I.e. with a deposit >10K, after opening an order with a volume of 0.1 there will be (based on this function) -1000000000000 :)))
In general, it does not work...
Выводит -10000000000
Т.е. при депо >10K, после открытия ордера объемом 0.1 останется (исходя из этой функции) -1000000000000 :)))
Вобщем не получается...
https://forum.mql4.com/ru/14675