Custom symbols. Errors, bugs, questions, suggestions. - page 11

 
fxsaber:

2033:

2063:

 
fxsaber:

Bug 07.

Tester generates bars by Last for stock custom symbols with Bid price to build bars.

Correspondingly, the bar history in the Terminal and the Tester is completely different. And if someone uses bars in the TS (indicators, for example), the result of the backtest is random for him/her.

If by an exchange instrument we mean a tool with a non-zero depth of the cup, the construction of bars in this case has been corrected.

Either give your own example.

 
fxsaber:

Bug 01.

The custom character chart is open. If, for example, you manually delete all bar and tick history, the chart window just hangs - without refreshing.

Expected behaviour as with an empty custom symbol.

Explain in more detail what you mean by

Deleted all bar history, the custom symbol chart is empty with "Waiting for update". What's wrong?

 

Bug 13.

Forum on trading, automated trading systems and strategy testing

MetaTrader 5 platform beta build 2055: Integration with Python and massive improvements in strategy tester

fxsaber, 2019.05.25 10:33

Playback of visual bug (chart twitching) application ChartSetSymbolPeriod

// Пример создания "живого" символа.

#include <Symbol.mqh> // https://www.mql5.com/ru/code/18855

const bool Init = EventSetMillisecondTimer(20); // С такой частотой будем пробрасывать тики

void OnInit()
{
  MathSrand((int)TimeLocal());
}

long Chart2 = 0;

void OnTimer()
{
  static bool FirstRun = true;

  static const SYMBOL Symb("CUSTOM_" + _Symbol + (string)MathRand()); // Создали символ
  
  static MqlTick Ticks[];
  static int Pos = 0;
    
  if (FirstRun)
  {
    Symb.DeleteHistory();       // Мало ли что-то было в истории - грохнули
    Symb.Delete(true);          // Символ тоже прибьем, чтобы исключить наличие тика в Обзоре рынка
    Symb.Create(NULL, _Symbol); // Воскресили девственно чистым.
    
    if (Symb.IsExist() && Symb.On())   // Если все отлично
    {     
      Chart2 = ChartOpen(Symb.Name, PERIOD_M1); // Открыли чарт
      CopyTicksRange(_Symbol, Ticks, COPY_TICKS_INFO, (ulong)D'2019.05.20' * 1000); // Взяли тики для проброса
    }
      
    FirstRun = false;
  }
  else if (Pos < ArraySize(Ticks))
  {
    Symb += Ticks[Pos++]; // Пробрасываем по тику
    
    // Для обновления чарта.
    ChartSetSymbolPeriod(Chart2, Symb.Name, PERIOD_M1); // Без этой строки дерганья графика прекращаются
    ChartRedraw(Chart2);    
  }
}

The animation shows the chart twitching. If you remove ChartSetSymbolPeriod, the twitching stops.

 
Slava:

Explain in more detail what you mean by this.

Deleted all the bar history, the chart of the custom symbol is empty with "Waiting for update" written on it. What's wrong?

Run this EA. After a few bars, deactivate it without closing the chart. Use CTRL+U to delete all bars.

 
fxsaber:

Bug 13.

The same Expert Advisor also reproduces the following bug

On the left - the chart, on the right - its properties window (F8).

 

Bug 15.

Forum on trading, automated trading systems and strategy testing

MetaTrader 5 platform beta build 2055: Integration with Python and massive improvements in strategy tester

fxsaber, 2019.05.25 10:54

After each application of CustomRatesUpdate there is a zeroing of prev_calculated in indicators that are running on the corresponding custom symbol.

This is an error. prev_calculated should translate to the first bar that was applied in CustomRatesUpdate.


ZY Same error with CustomRatesReplace.

On the symbol of this EA (with ChartSetSymbolPeriod-row removed) we launch the following indicator

#property indicator_chart_window
#property indicator_buffers 0
#property indicator_plots indicator_buffers

int OnCalculate( const int rates_total, const int prev_calculated, const int, const double &[] )
{
  Print(prev_calculated);
  
  return(rates_total);
}

Returns only zeros.

 
Slava:

If by a stock instrument is meant an instrument with non-zero depth of the cup, the bar construction in this case has been corrected.

Either give your example.

Now (2067) I have everything correct with this, Thank you.

 
fxsaber:

2063:

2069:

Reason: