Errors, bugs, questions - page 51

 

I see the confusion comes down to one thing: how does it manifest itself?

Let me explain : when a new tick comes, it freezes for half a second and no functions are executed, after which the execution continues as if the stopped functions have already been executed,

so if you number the array 1 2 3 4 5 6 and a tick comes in on number 4, the array will be numbered 1 2 3 5 6

(this is an example, not a specific execution).

But the execution is the same,

At each iteration the balls are shifted by one position,

when a tick comes, some balls may even drop out of the display (it is clearly visible if you put a delay in the script below 500, well, for different machines is different, perhaps on a powerful machine delay should be 100 to manifest glitch) ,

and then at new iterations are restored, the same happens when you load the background (especially it appears at high resolution Step 4-3 and below)

Appears more often on lower stacks only because the background loading time with so many objects more, respectively, and higher probability to get under the pressure of a new tick.

 
stringo:

When a tick comes to the client terminal, it must be applied in several places at once - in the market overview, in the history, in open charts. At the same time the indicators are recalculated. What do you want?

If you have a single core, and charts are open to the maximum, then of course, the implementation of other components will slow down - resources must be shared.

Generally, a strange way of putting it. What does OnTick() have to do with it and how does it interfere with other functions?

In a system one program MT-5 is running in visual mode, one chart is opened in MT-5, one script (or advisor) is running on the chart.

And with all this to change the coordinates of three objects there is not enough machine time when a new tick comes ????.

 
Urain:

And with all this to change the coordinates of three objects there is not enough machine time when a new tick comes ????.

Don't forget that there are 3600 Label text objects on the screen at the same time, drawn in a not very economical way (drawing circles in font is obviously short-sighted).

Try to put one BMP image instead of 3600 objects to get better performance.

Without substrate of 3600 objects everything flies.

 
Renat:

It should not be forgotten that there are 3600 Label text objects on the screen simultaneously, drawn in a not very economical way (drawing circles in font is obviously shortsighted).

Try to put one BMP image instead of 3600 objects - it'll be much laggier.

Without a substrate of 3600 objects everything flies.

This was my initial plan (background should actually be created when loading depending on current market situation),

I can't make a background out of dots but it's saved only in gif,

I have to download bmp,

You can't use mql tools, you need a third-party mql translation tool (I wanted to do everything in mql).

I would like to show how easy it is to get the traders to work with me.

(and you have to bind it to price and time).

I'm trying to figure out how to do it with a 3-meter step=3, there are about 40,000 of them.

 

In all likelihood, we will make the new graphical object into an editable bitmap and a set of primitive operations on it.

By doing so, it will be possible to draw complex graphics within a single object, thus eliminating the need to manage hundreds or thousands of objects.

 
Renat:

In all likelihood, we will make a new graphical object in the form of an editable bitmap and a set of primitive operations on it.

Thus, it will be possible to draw complex graphics inside a single object, which will eliminate the need to manage hundreds or thousands of objects.


That would be great, because I have faced such situations quite often on 4,

It is clear that you invested in trade orders in the first place, and graphics is second.

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Типы торговых операций
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Типы торговых операций
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Типы торговых операций - Документация по MQL5
 

everything is disabled, auto-trading is prohibited, but the messages go, i.e. it turns out that the Expert Advisor works, it is the Expert Advisor messages... it should not be like this

 
Prival:

everything is disabled, auto-trading is banned, but the messages go, i.e. it turns out that the Expert Advisor works, it's the Expert Advisor's messages... it shouldn't be like that

As far as I am concerned, the prohibition of "automatic trading" does not mean that the EA does not work. Apparently there are no additional checks in the EA's code for possible trading problems...
 
Prival:

everything is disabled, auto-trading is prohibited, but the messages go, i.e. it turns out that the Expert Advisor works, it is the Expert Advisor messages... it should not be like this

You are right. The Expert Advisor is not banned, the autotrading is only prohibited

Here is a reference

Разрешить/запретить совершение торговых операций советниками и скриптами. Функция данной кнопки аналогична настройке терминала на вкладке "Советники".

I think this ban is coming from the terminal.

Therefore, you should use the function AccountInfoInteger(ACCOUNT_TRADE_EXPERT) before trade orders to avoid getting error messages in the log when placing orders

 

Only trading operations are prohibited, and the Expert Advisor is working, trying to trade with the corresponding errors. To prevent this from happening, you should check the terminal status before analysing for trades using

if(TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала - Документация по MQL5