ZeroMemory(request);
ZeroMemory(result);
//--- установка параметров операции
request.action =TRADE_ACTION_DEAL; // тип торговой операции
request.position =position_ticket; // тикет позиции
request.symbol =position_symbol; // символ
request.volume =volume; // объем позиции
request.deviation=5; // допустимое отклонение от цены
request.magic =EXPERT_MAGIC; // MagicNumber позиции//--- установка цены и типа ордера в зависимости от типа позицииif(type==POSITION_TYPE_BUY)
{
request.price=SymbolInfoDouble(position_symbol,SYMBOL_BID);
request.type =ORDER_TYPE_SELL;
}
else
{
request.price=SymbolInfoDouble(position_symbol,SYMBOL_ASK);
request.type =ORDER_TYPE_BUY;
}
//--- вывод информации о закрытииPrintFormat("Close #%I64d %s %s",position_ticket,position_symbol,EnumToString(type));
//--- отправка запросаif(!OrderSend(request,result))
PrintFormat("OrderSend error %d",GetLastError()); // если отправить запрос не удалось, вывести код ошибки//--- информация об операции PrintFormat("retcode=%u deal=%I64u order=%I64u",result.retcode,result.deal,result.order);
fxsaber: How to get the start date of testing in OnTesterInit?
You don't. It's to the point that MQL API lacks ways to find out many of tester's settings (I wrote a long time ago in SD back on MT4 and got the usual rejection).
The start date can only be intercepted in OnInit on the agent.
1. Why, when the timeframe is changed, the function is not saved in the FOLLOW-UP properties. Example. I have Heikin Ashi indicator and when I change timeframe it is overlaid on top of the price chart, but the FRAME OVER checkbox disappears?
2.I need to save my own profile, I am doing that. How do I transfer my own profile to another computer in MT5? My profile is not in the charts folder(
1. Why, when the timeframe is changed, the function is not saved in the FOLLOW-UP properties. Example. I have Heikin Ashi indicator and when I change timeframe it is overlaid on top of the price chart, but the FRAME OVER checkbox disappears?
2.I need to save my own profile, I am doing that. How do I transfer my own profile to another computer in MT5? My profile is not in the charts folder(
1) mt4/5 is not reproducible, when you change the TF the property remains active. Maybe you are drawing a custom indicator with "show above chart" property...
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.
I think a line like this would be more useful:
You're not thinking straight.
You're not thinking straight.
Well, it all makes sense now.)
Thanks for the nudge:
How to get the start date of testing in OnTesterInit?
You don't. It's to the point that MQL API lacks ways to find out many of tester's settings (I wrote a long time ago in SD back on MT4 and got the usual rejection).
The start date can only be intercepted in OnInit on the agent.
The start date can only be intercepted in OnInit on the agent.
That's what I did in Report. But I need it at OnTesterInit, not later.
Two questions:
1. Why, when the timeframe is changed, the function is not saved in the FOLLOW-UP properties. Example. I have Heikin Ashi indicator and when I change timeframe it is overlaid on top of the price chart, but the FRAME OVER checkbox disappears?
2.I need to save my own profile, I am doing that. How do I transfer my own profile to another computer in MT5? My profile is not in the charts folder(
Two questions:
1. Why, when the timeframe is changed, the function is not saved in the FOLLOW-UP properties. Example. I have Heikin Ashi indicator and when I change timeframe it is overlaid on top of the price chart, but the FRAME OVER checkbox disappears?
2.I need to save my own profile, I am doing that. How do I transfer my own profile to another computer in MT5? My profile is not in the charts folder(
1) mt4/5 is not reproducible, when you change the TF the property remains active. Maybe you are drawing a custom indicator with "show above chart" property...
2) \Users\UserNAME\AppData\Roaming\MetaQuotes\Terminal\...\MQL5/Profiles/Charts
Has opencv been ported to mql? Isn't it? Or am I mistaken?
I haven't seen it and I haven't found it by searching.