Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1197

 
kopeyka2:

Good morning.

The point is that the last 50 candles are calculated for the average.

Question. What to add, fix in the code to calculate once and not every tick. The problem is that in ON-LINE there is an accumulation of value.

When a new bar starts, rates_total > prev_calculated and they become equal after the first tick. Use this and everything will be as it should be.
 
Alexandr Sokolov:

redraw - ChartRedraw()

Igor Makanu:

Without a sample scheme of how you process events is just guessing.

Alternatively, run it in the Indicators folder Examle\SimplePanel

and if this code works correctly ... guess on your own ;)

Salud! Thank you!

I did ChartRedraw(), but it didn't help. I had to increase the priority to receive mouse click event on chart (OBJPROP_ZORDER). After setting it above zero it started working correctly.

 

I will repeat the question. Where should I report bugs on the MT5 terminal? Is there a direct link to the developers?

I wrote to them once, but there was no answer.

 
Alexey Viktorov:
When a new bar starts, rates_total > prev_calculated and they become equal after the first tick. Use this and everything will be as it should be.
Thank you!
 
Oleg:

I will repeat the question. Where should I report bugs on the MT5 terminal? Is there a direct link to the developers?

I have already contacted them by e-mail but there is no reply.

Oleg:

Hello, guys. Please advise me on which thread to complain about the MT5 updates?


The endless number of updates with new glitches in the last couple of months, what is it about?

When I close or open a position in one terminal, all the history on the charts appears automatically, not only in this terminal, but in other terminals for all symbols. It is annoying. I have to delete it every time.

It is impossible to manually transfer deals to the chart one by one from the history now. If you add all of the trades, it opens a new chart with all of the history.

The EA has been changed in the latest update, it hasn't compiled anymore, it keeps getting errors.

I had the opportunity to sign objects in the properties and the inscription appeared on the screen.

It has disappeared.

No one can say anything without the complete code

what keeps you on the test server MQ? use server DC, they only have global updates or you have not yet requested the beta version yourself

there are no mass complaints, it means the problem is in your code and not the updates, critical bugs are fixed with the instant release of a new beta

 
awsomdino:

no one can say anything without the full code

what is keeping you on the MQ test server? use the DC servers, they only have global updates or you can request a beta version yourself

no mass complaints, it means the problem is in your code, not the updates, critical bugs are fixed with the instant release of a new beta

I understand that people start to complain en masse when everything crashes. The above problems occur in at least three other colleagues I talk to.

Are you saying that you can sign the name of an object and it will be displayed next to it or the deals will not be executed in the parallel terminal after opening a deal in the other one? MT5 netting.

I don't really care about Metaquotes even on the client terminal. I had a situation when my min lot was 0.25 for one symbol. Everything was working fine on PC. In mobile version my step was ok, but not 0.25.

I, and not only me, spent a year fighting with broker (very big broker) to correct the error. They, in their turn, wrote to Metaquotes and wrote letters to Metaquotes. It took them a year and a half to correct it.

 

How can I write a custom indicator for android? (without panel, alerts, prints, push, email etc - just one line in a separate window, and input parameters obviously)

MT5 for android

Переход на новые рельсы: пользовательские индикаторы в MQL5
Переход на новые рельсы: пользовательские индикаторы в MQL5
  • www.mql5.com
Наконец мы получили возможность попробовать в работе новый торговый терминал - MetaTrader 5 . Вне сомнения, продукт заслуживает внимания и имеет множество новых возможностей по сравнению со своим предшественником. Важными преимуществами этой платформы среди прочих являются: Существенно доработанный язык, позволяющий теперь программировать...
 
Alexandr Sokolov:
How can I write a custom indicator for android? (without panel, alerts, prints, push, email etc - just one line in a separate window, and input parameters obviously)

You can't. Custom indicators, EAs and scripts - only in the Windows terminal.

 

why does the strategy tester fail to detect the creation of new objects (both in MT4 and MT5)?

int count = 0;
void OnChartEvent(const int id,
                  const long& lparam,
                  const double& dparam,
                  const string& sparam)
  {
   if(count == 0)
     {
      if(id == CHARTEVENT_OBJECT_CREATE) Alert("test");
      count++;
     };
  }

... objects are signal arrows of the indicator, which is loaded into the tester together with the Expert Advisor by loading the chart template

Тестирование стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
Тестирование стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
  • www.metatrader5.com
Тестер стратегий позволяет тестировать и оптимизировать торговые стратегии (советники) перед началом использования их в реальной торговле. При тестировании советника происходит его однократная прогонка с начальными параметрами на исторических данных. При оптимизации торговая стратегия прогоняется несколько раз с различным набором параметров...
 
Alexandr Sokolov:

why does the strategy tester fail to detect the creation of new objects (both in MT4 and MT5)?

... The objects are signal indicator arrows that are loaded in the tester together with the Expert Advisor by loading the chart template

For the very trivial reason that I think is described in the documentation, that OnChartEvent does not work in the tester.

Reason: