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

 
Vovilon V:

Take the tics from here.

ThirdPartyTicks
ThirdPartyTicks
  • www.mql5.com
Исторически сложилось, что для MetaTrader 4 пользуются популярностью сторонние приложения, позволяющие получать тиковую историю из различных источников. Как правило, ее используют в Тестере Стратегий как полигон для проверки советников, а также для исследований (машинное обучение и т.д.). Некоторые источники котировок в обсуждениях стали почти...
 
I don't need other ticks, I have ticks and they suit me fine. Question/difficulty, how to build minute bars based on these ticks to load into MT5
 
Vovilon V:
I don't need other ticks, I have ticks and they suit me fine. Question/complexity, how to build minute bars based on these ticks to load into MT5

After importing ticks run this script on a new symbol chart (it will be without bars)

Forum on trading, automated trading systems and testing trading strategies

Discussion of article "Creating and testing custom symbols in MetaTrader 5"

fxsaber, 2018.04.12 07:59

#property script_show_inputs

#include <fxsaber\ThirdPartyTicks\CustomSymbol.mqh> // https://www.mql5.com/ru/code/20225

// Generate M1-history from ticks
void OnStart()
{  
  MqlTick Ticks[];
  CUSTOMSYMBOL Symb;

  if (Symb.IsCustom() && (CopyTicksRange(Symb.Name, Ticks, COPY_TICKS_ALL, 0, LONG_MAX) > 0))
  {
    Symb.AddTicks(Ticks);
  
    Symb.CreateHistoryRates();
    
    ChartOpen(Symb.Name, PERIOD_CURRENT);
  }
}


I think they promised to do automatic conversion of ticks into bars

 

Thank you very much, I'll give it a try!

 

Bug 09.

CustomTicksAdd does not generate a NewTick event.

Run this EA on a "live" symbol to reproduce

void OnTick() { ExpertRemove(); }

The EA will not unload despite the ticks coming in.


ZZY Maybe it's not working now because of foolproofing: on a custom symbol, the EA is run and CustomTicksAdd itself is done in OnTick.

 
fxsaber:

Bug 09.

CustomTicksAdd does not generate a NewTick event.

Run this EA on a "live" symbol to reproduce

The EA will not unload despite the ticks coming in.


ZZY Maybe it doesn't work now because of foolproofing: on a custom symbol, the EA is run and CustomTicksAdd itself is done in OnTick.

https://www.mql5.com/ru/docs/runtime/event_fire

The NewTickevent is generated when new quotes come in and is handled by OnTick() in attached EAs. If at the arrival of a new quote the OnTick function was running on the previous quote, the incoming quote will be ignored by the Expert Advisor, because the corresponding event is not placed in the EA event queue.

Документация по MQL5: Программы MQL5 / События клиентского терминала
Документация по MQL5: Программы MQL5 / События клиентского терминала
  • www.mql5.com
Сразу же после того, как клиентский терминал загрузит программу (эксперт или пользовательский индикатор) и запустит процесс инициализации глобальных переменных, будет послано событие Init, которое обрабатывается функцией OnInit(), если она есть. Это событие также генерируется после смены финансового инструмента и/или периода графика, после...
 

Right, thanks! Bug09 is full-fledged then.

By the way, if onCalculate is to throw in two ticks each, would any protection work?

 
fxsaber:

Right, thanks! Bug09 is full-fledged then.

By the way, if OnCalculate is to throw in two ticks at a time, will the protection work?

It won't.

OnCalculate is called on every tick. So, there is a risk of an avalanche

 

Forum on trading, automated trading systems and testing trading strategies

Custom symbols. Errors, bugs, questions, suggestions.

fxsaber, 2019.03.17 09:56

Bug 07.

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

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

I felt a complete idiot when after days of searching with different TS algorithms I found out that everything was in vain.

It turned out that in the real ticks mode not only the bars but also the TICs do not correspond to history! Why would I do that?


So now Tester can't cope with the elementary thing - to give a historical sequence of ticks.

It turns out that now with each build, the first thing to do is to check the adequacy of the Tester. Because with such niggles, you can't trust him at all.


Well, the rule is simple: "Hands off the real ticks. Why the hell does the tester fix/filter them?


What data to provide in order to fix this technical shame in time for the next beta?


ZS That's how it turns out that 2025b is needed for some tasks and earlier builds are needed for others. Again, please help with the builds archive.

ZZZY This bug gets around by trashing the custom character with a sweep of the bases. Then recreate and do not switch to any other trading accounts. I strongly advise to check the history before working with the tester.

 
fxsaber:

Again, please help with the build archive.

Poured 2009 and 2025 into the previous location.