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

 
fxsaber:

Bug 06.

The tester on some custom symbols behaves completely inadequately in real tick mode.

I ran it in 1970 and it's fine. So the bug has appeared recently.

 

2009:

 

Bug 07.

Tester forms bars by Last for exchange custom symbols with Bid price of bar building.

Therefore, the bar history in the Terminal and the Strategy Tester completely diverges. And if someone uses bars in the TS (indicators, for example), the result of the backtest is random for him.

 
fxsaber:

Bug 07.

The tester builds bars on Last for exchange-traded custom symbols with the price of building bars on Bid.

What are these bars built by Bid on exchange symbols?

 
Aleksey Vyazmikin:

What kind of bars are these built by Bid on exchange-traded instruments?

Custom ones.

 
fxsaber:

Custom.

Got it, it's a very critical bug.

 
When will the custom characters start working?
 
Sergey Chalyshev:
When will the custom symbols start working?
Please elaborate on your question
 
Slava:
Specify your question, please

It's very difficult to be specific,there's an ambush at every corner. Have you even tested it yourself?

1) Can't add a bar if there are no bars in the custom symbol history.

2) Cannot add tick if custom symbol is not selected in MarketWatch.

3) Cannot delete custom symbol. First add it toMarketWatch, then remove it fromMarketWatch, only then remove the custom symbol.

That's enough for now. It's better to test it yourself.


 
Sergey Chalyshev:

It's very difficult to be specific,there's an ambush at every corner. Have you even tested it yourself?

1) Can't add a bar if there are no bars in the custom symbol history.

2) Cannot add tick if custom symbol is not selected in MarketWatch.

3) Cannot delete custom symbol. First add it toMarketWatch, then remove it fromMarketWatch, only then remove the custom symbol.

That's enough for now. Better yet, test it yourself.

However, for some reason it works.

Forum on trading, automated trading systems and testing of trading strategies

Libraries: Symbol

fxsaber, 2019.03.02 13:23

The library has extended the functionality because of certain events. Example of its use
// Пример создания "живого" символа.

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

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

void OnTimer()
{
  static bool FirstRun = true;

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


On a symbol like this you can run indicator debugging even on weekends when the quotes are standing.


Reason: