Good afternoon, all. Please help me to solve the following problem.
There are two MT5 terminals on the virtual machine. One is working with broker A, the other with broker B. The same bot is running on both terminals. Everything was fine until yesterday when I updated to version 2615.
The terminal working with broker A worked and still works, but the terminal with broker B hangs. That is, after start-up works for some time normally, then hangs. In the logs after the hangs the following record:
PJ 1 11:18:36.886 Network '67003410': connection to RoboForex-ECN lost
MP 0 11:18:37.656 Network '67003410': authorized on RoboForex-ECN through Europe #2 (ping: 98.08 ms, build 2560)
RN 0 11:18:37.656 Network '67003410': previous successful authorization performed from 91.217.110.2 on 2020.09.22 07:16:34
DR 0 11:18:37.768 Network '67003410': terminal synchronized with RoboMarkets Ltd: 2 positions, 0 orders, 121 symbols, 0 spreads
IM 0 11:18:37.768 Network '67003410': trading has been enabled - hedging mode
EK 1 11:20:38.099 Network '67003410': connection to RoboForex-ECN lost
ES 0 11:20:38.674 Network '67003410': authorized on RoboForex-ECN through Europe #2 (ping: 98.08 ms, build 2560)
FQ 0 11:20:38.674 Network '67003410': previous successful authorization performed from 91.217.110.2 on 2020.09.22 07:18:36
FM 0 11:20:38.784 Network '67003410': terminal synchronized with RoboMarkets Ltd: 2 positions, 0 orders, 121 symbols, 0 spreads
GR 0 11:20:38.784 Network '67003410': trading has been enabled - hedging mode
OH 1 11:22:39.328 Network '67003410': connection to RoboForex-ECN lost
CR 3 11:22:55.243 NetDispatcher thread timeout reached possible deadlock [15]
Tell me, have the developers of Metatrader 5 broken indicator buffers in the latest update? Or is it something wrong with my head?
The point is that all the arrow indicators that don't have full recalculation on a new bar have started producing the same glitch. The arrows start multiplying like rabbits on the adjacent bars on the new bar. Example attached.
Only complete recalculation of the indicator on a new bar helps.
//+------------------------------------------------------------------+//| test_arrow.mq5 |//| Efremov Konstantin |//| https://www.mql5.com/ru/users/leonardo4 |//+------------------------------------------------------------------+#property copyright"Efremov Konstantin"#property link"https://www.mql5.com/ru/users/leonardo4"#property version"1.00"#property indicator_chart_window//--- init indicator buffers#property indicator_buffers1#property indicator_plots1#property indicator_label1"Arrows"#property indicator_type1DRAW_ARROW#property indicator_color1clrLawnGreen#property indicator_style1STYLE_SOLID#property indicator_width11inputint History = 10; // История, дней double Arrows[];
int cnt_bars;
int HistoryCandle;
bool FirstStartFlag;
int bar, limit;
datetime counted_bar;
//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+intOnInit()
{
//--- indicator buffers mappingSetIndexBuffer (0,Arrows,INDICATOR_DATA);
ArraySetAsSeries (Arrows,true);
PlotIndexSetInteger (0,PLOT_DRAW_TYPE,DRAW_ARROW);
PlotIndexSetInteger (0,PLOT_LINE_COLOR,clrDodgerBlue);
PlotIndexSetString (0,PLOT_LABEL,"Arrows");
PlotIndexSetInteger (0,PLOT_ARROW,233);
IndicatorSetInteger(INDICATOR_DIGITS,_Digits);
//--- Рассчитываем количество свечей истории текущего таймфрейма от настройки "дней"
HistoryCandle = History*24*60*60/PeriodSeconds(PERIOD_CURRENT);
cnt_bars = HistoryCandle; // Кол-во баров для подсчета сигналов
FirstStartFlag = true;
//---return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+voidOnDeinit(constint reason)
{
ChartRedraw(0);
}
//+------------------------------------------------------------------+//| Custom indicator iteration function |//+------------------------------------------------------------------+intOnCalculate(constint rates_total,
constint prev_calculated,
constdatetime &time[],
constdouble &open[],
constdouble &high[],
constdouble &low[],
constdouble &close[],
constlong &tick_volume[],
constlong &volume[],
constint &spread[])
{
//---ArraySetAsSeries(close,true);
ArraySetAsSeries(open,true);
ArraySetAsSeries(low,true);
if(HistoryCandle>=rates_total) cnt_bars=rates_total-1;
else cnt_bars=HistoryCandle;
//----+ проверка количества баров на достаточность для корректного расчёта индикатораif(rates_total<=cnt_bars)
{
Print("Недостаточно истории. Есть "+IntegerToString(rates_total-1)+" надо "+IntegerToString(cnt_bars));
return(0);
}
//--- инициализация индикаторного буфера if(FirstStartFlag)
{
//--- обнулим все буферы стрелок и времени от мусора for(int x=cnt_bars; x>=0 && !IsStopped(); x--) Arrows[x] = EMPTY_VALUE;
FirstStartFlag = false;
ChartRedraw(0);
}
if(prev_calculated>rates_total || prev_calculated<=0) // проверка на первый старт расчёта индикатора
{
limit=cnt_bars-1; // стартовый номер для расчёта всех баров
}
else limit=rates_total-prev_calculated; // стартовый номер для расчёта новых баровif(rates_total != prev_calculated) Arrows[0] = EMPTY_VALUE;
for(bar=limit; bar>=0 && !IsStopped(); bar--)
{
if(close[bar+1]>open[bar]+5*_Point) {Arrows[bar]=NormalizeDouble(low[bar]-5*_Point,_Digits);}
}
MqlRates rates[];
MqlTick tick;
SymbolInfoTick(Symbol(),tick);
CopyRates(Symbol(),PERIOD_CURRENT,0,1,rates);
double i;
long m,s;
m=rates[0].time+GetMinute()*60-tick.time;
i=m/60.0;
s=m%60;
m=(m-m%60)/60;
Comment(" Candle: "+IntegerToString(m,0,' ')+" m "+IntegerToString(s,0,' ')+" s left");
if(iTime( _Symbol, PERIOD_M1, 0 ) > counted_bar )
{
counted_bar = iTime( _Symbol, PERIOD_M1, 0 );
ChartRedraw(0);
}
//--- return value of prev_calculated for next callreturn(rates_total);
}
//+------------------------------------------------------------------+int GetMinute()
{
switch(Period())
{
casePERIOD_M1: return(1);
casePERIOD_M2: return(2);
casePERIOD_M3: return(3);
casePERIOD_M4: return(4);
casePERIOD_M5: return(5);
casePERIOD_M6: return(6);
casePERIOD_M10: return(10);
casePERIOD_M12: return(12);
casePERIOD_M15: return(15);
casePERIOD_M20: return(20);
casePERIOD_M30: return(30);
casePERIOD_H1: return(60);
casePERIOD_H2: return(120);
casePERIOD_H3: return(180);
casePERIOD_H4: return(240);
casePERIOD_H6: return(360);
casePERIOD_H8: return(480);
casePERIOD_H12: return(720);
casePERIOD_D1: return(1440);
casePERIOD_W1: return(10080);
casePERIOD_MN1: return(43200);
}
return(1);
}
Tell me, have the developers of Metatrader 5 broken indicator buffers in the latest update? Or is it something wrong with my head?
The point is that all the arrow indicators that don't have full recalculation on a new bar have started producing the same glitch. The arrows start multiplying like rabbits on the adjacent bars on the new bar. Example attached.
Only complete recalculation of the indicator on a new bar helps.
Replace this nonsense
//--- инициализация индикаторного буфера if(FirstStartFlag)
{
//--- обнулим все буферы стрелок и времени от мусора for(int x=cnt_bars; x>=0 && !IsStopped(); x--) Arrows[x] = EMPTY_VALUE;
FirstStartFlag = false;
ChartRedraw(0);
}
>>Thereare two MT5 terminals onthe virtual machine.One is working with broker A, the other with broker B. Both terminals are running >>the same bot. Everything was fine until yesterday, until I updated to version 2615.
Got back version 2560, everything works fine, no freezes or deadlocks.
Виртуальный хостинг для MetaTrader 4/5 является лучшим VPS-решением для Форекса. Оно не требует настройки, дает минимальные задержки до сервера и отличается низкими ценами. Всего за 15 USD в месяц вы получите виртуальную платформу, которая работает круглые сутки, экономит вашу прибыль и даже окупает себя. Создать удаленную копию приложения...
>>Thereare two MT5 terminals onthe virtual machine.One is working with broker A, the other with broker B. Both terminals are running >>the same bot. Everything was fine until yesterday, until I updated to version 2615.
Got back version 2560, everything is working fine, no hangs or dead-locks.
Are the developers even responding to messages?
Have you reported any technical details to understand or reproduce?
Questions without details are almost always left without our attention.
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.
Good afternoon, all. Please help me to solve the following problem.
There are two MT5 terminals on the virtual machine. One is working with broker A, the other with broker B. The same bot is running on both terminals. Everything was fine until yesterday when I updated to version 2615.
The terminal working with broker A worked and still works, but the terminal with broker B hangs. That is, after start-up works for some time normally, then hangs. In the logs after the hangs the following record:
PJ 1 11:18:36.886 Network '67003410': connection to RoboForex-ECN lost MP 0 11:18:37.656 Network '67003410': authorized on RoboForex-ECN through Europe #2 (ping: 98.08 ms, build 2560) RN 0 11:18:37.656 Network '67003410': previous successful authorization performed from 91.217.110.2 on 2020.09.22 07:16:34 DR 0 11:18:37.768 Network '67003410': terminal synchronized with RoboMarkets Ltd: 2 positions, 0 orders, 121 symbols, 0 spreads IM 0 11:18:37.768 Network '67003410': trading has been enabled - hedging mode EK 1 11:20:38.099 Network '67003410': connection to RoboForex-ECN lost ES 0 11:20:38.674 Network '67003410': authorized on RoboForex-ECN through Europe #2 (ping: 98.08 ms, build 2560) FQ 0 11:20:38.674 Network '67003410': previous successful authorization performed from 91.217.110.2 on 2020.09.22 07:18:36 FM 0 11:20:38.784 Network '67003410': terminal synchronized with RoboMarkets Ltd: 2 positions, 0 orders, 121 symbols, 0 spreads GR 0 11:20:38.784 Network '67003410': trading has been enabled - hedging mode OH 1 11:22:39.328 Network '67003410': connection to RoboForex-ECN lost CR 3 11:22:55.243 NetDispatcher thread timeout reached possible deadlock [15]why does a compilation error occur?
Why does a compile-time error occur?
double
double
OK. Thanks.
Checked, it is.
Tell me, have the developers of Metatrader 5 broken indicator buffers in the latest update? Or is it something wrong with my head?
The point is that all the arrow indicators that don't have full recalculation on a new bar have started producing the same glitch. The arrows start multiplying like rabbits on the adjacent bars on the new bar. Example attached.
Only complete recalculation of the indicator on a new bar helps.
Tell me, have the developers of Metatrader 5 broken indicator buffers in the latest update? Or is it something wrong with my head?
The point is that all the arrow indicators that don't have full recalculation on a new bar have started producing the same glitch. The arrows start multiplying like rabbits on the adjacent bars on the new bar. Example attached.
Only complete recalculation of the indicator on a new bar helps.
Replace this nonsense
with this nonsense.
>>Thereare two MT5 terminals onthe virtual machine.One is working with broker A, the other with broker B. Both terminals are running >>the same bot. Everything was fine until yesterday, until I updated to version 2615.
Got back version 2560, everything works fine, no freezes or deadlocks.
Are the developers even responding to messages?
>>Thereare two MT5 terminals onthe virtual machine.One is working with broker A, the other with broker B. Both terminals are running >>the same bot. Everything was fine until yesterday, until I updated to version 2615.
Got back version 2560, everything is working fine, no hangs or dead-locks.
Are the developers even responding to messages?
Have you reported any technical details to understand or reproduce?
Questions without details are almost always left without our attention.