Errors, bugs, questions - page 1780

 

SymbolInfoTick() error returning irrelevant data - tick overshoot. Build 1525 x64. Test from indicator, did not test on Expert Advisor:

#property version   "1.00"
#property indicator_chart_window
#property indicator_plots 0
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
  
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   static long prevMs = 0;
   //---
   MqlTick tick;
   if( SymbolInfoTick( _Symbol, tick ) )
        {
         if( prevMs != 0 && tick.time_msc < prevMs )
                {
                 Print( __FUNCTION__,": ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!" );
                 Print( __FUNCTION__,": Текущее время мс = ",tick.time_msc," ("+TimeToString( tick.time, TIME_DATE|TIME_SECONDS )+"), предыдущее = ",prevMs );
                }
            //---
            prevMs = tick.time_msc;
        }
   else
         Print( __FUNCTION__,": ОШИБКА #",GetLastError(),". Значение текущего тика не получено!" );
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+

Result:

2017.02.02 21:54:20.450 test_SymbolInfoTick_20170202 (VTBR-3.17,M1)     OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
2017.02.02 21:54:20.450 test_SymbolInfoTick_20170202 (VTBR-3.17,M1)     OnCalculate: Текущее время мс = 1486065260384 (2017.02.02 19:54:20), предыдущее = 1486065260387
2017.02.02 22:11:31.025 test_SymbolInfoTick_20170202 (GOLD-3.17,M3)     OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
2017.02.02 22:11:31.025 test_SymbolInfoTick_20170202 (GOLD-3.17,M3)     OnCalculate: Текущее время мс = 1486066290963 (2017.02.02 20:11:30), предыдущее = 1486066290966
2017.02.02 22:12:44.939 test_SymbolInfoTick_20170202 (BR-3.17,M1)       OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
2017.02.02 22:12:44.939 test_SymbolInfoTick_20170202 (BR-3.17,M1)       OnCalculate: Текущее время мс = 1486066364884 (2017.02.02 20:12:44), предыдущее = 1486066364890
2017.02.02 22:29:36.358 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
2017.02.02 22:29:36.358 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: Текущее время мс = 1486067376304 (2017.02.02 20:29:36), предыдущее = 1486067376307
2017.02.02 22:31:26.462 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
2017.02.02 22:31:26.462 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: Текущее время мс = 1486067486339 (2017.02.02 20:31:26), предыдущее = 1486067486344
2017.02.02 22:32:14.441 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
2017.02.02 22:32:14.441 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: Текущее время мс = 1486067534360 (2017.02.02 20:32:14), предыдущее = 1486067534363
2017.02.02 22:36:07.509 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
2017.02.02 22:36:07.510 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: Текущее время мс = 1486067767443 (2017.02.02 20:36:07), предыдущее = 1486067767463
2017.02.02 22:39:29.606 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
2017.02.02 22:39:29.606 test_SymbolInfoTick_20170202 (Si-3.17,M1)       OnCalculate: Текущее время мс = 1486067969557 (2017.02.02 20:39:29), предыдущее = 1486067969558

Real, Opening, Access Server V. Sadness! Pay attention to the problem, please. And also to the problem in application#1598238 (starting from page 10, post of2017.01.26 09:43).

Dear developers, let's fix the ticks! Code provided, here it is - the problem, no need to look for anything, just react and fix it!

 
Oh, and please fix the panels in the terminal already! Bug is insignificant, but annoying, if you need to frequently squeeze/stretch the window panels do not stand in place! Build 1525 x64.
 
Let's check it out.
 
Alexey Kozitsyn:

SymbolInfoTick() error returning irrelevant data - tick overshoot. Build 1525 x64. Test from indicator, did not test on Expert Advisor:


Dear developers, let's correct the ticks! The code has been provided, here it is - the problem, you do not need to look for it, just react and correct it!

Please make your message a request to servicedesk.
 
Alexey Da:
Please form your message with the servicedesk application.
#1664077
 

Compilation error

static string text1 =
                      "ABC"
                      "DEF"; //нормально
static string text2 =
#ifndef MACRO
                      "ABC"
#endif
                      
"DEF"; //Error: 'DEF' - some operator expected
 

Incorrect order of function calls when changing chart period

  • Indicator location path: \Indicators\Test_i.ex5
  • Path of Expert location: {Experts\Test.ex5

Sequence of Actions:

  1. Attach the Expert Advisor 'Test.ex5' to the M5 chart (symbol GBPUSD)
  2. Change the chart period to M15
  3. Change the chart period to M30
  4. Remove the Expert Advisor from the chart

Result:

#step1: join
I::I->M5
OnInit->M5
#step 2: period change M5 ->M15
I::I->M15
OnInit->M15
#step 3: period change M15->M30
I::I->M30
OnInit->M30
OnDeinit->M15:3
I::~I->M15
#step 4: delete
OnDeinit->M5:1 ##this line was expected in step #2 like this: OnDeinit->M5:3
I::~I->M5 ##this string was expected at step #2
OnDeinit->M30:1
I::~I->M30

Rows marked ## were expected to be output at step #2 and in addition deinitialised due to period change(REASON_CHARTCHANGE:3) but not deleted from the chart (REASON_REMOVE:1). In other words, step #2 was expected to be similar to step #3

//Test_i.mq5 //Индикатор
void Prn( string f, int i = -1 ) { Print( f, "->", StringSubstr( EnumToString( Period()), 7 ), (i == -1 ? "" : ":" + i )); }
struct I {
         I() { Prn( __FUNCTION__ ); }
        ~I() { Prn( __FUNCTION__ ); }
};
static const I i;
void OnInit()                     { Prn( __FUNCTION__ ); }
void OnDeinit( const int reason ) { Prn( __FUNCTION__, reason ); }
int OnCalculate( const int, const int, const int, const double& [] ) { return 0; }
//Test.mq5 //Эксперт
struct B {
         B();
        ~B();
        const int h;
        static const string name;
};
const string B::name = "Test_i";
B::B() : h( iCustom( NULL, 0, name ))
{
        if ( !ChartIndicatorAdd(    0, 0, h )    ) Print( "-1:", GetLastError());
}
B::~B()
{
        if ( !ChartIndicatorDelete( 0, 0, name ) ) Print( "-2:", GetLastError());
        if ( !IndicatorRelease( h )              ) Print( "-3:", GetLastError());
}
static const B b;
void OnInit() export {}
 

Glitches when installing Bill Williams indicators

I put fractals - it does

set AO - it sets ADX

build 1031

 
Vladimir Gribachev:

Glitches when installing Bill Williams indicators

I put fractals - it does

set AO - set ADX

build 1031

not only when installing this indicator, but from time to time others as well.

restarting the terminal fixes the problem.

noticed that it starts after testing.

 

The ZigZag delivery indicator in MT5 bild 1525 flickers intermittently (without reflashing)