Canvas is cool! - page 67

 
prostotrader:

Canvas - Cool!

How does it help in the trade?

What is it?

 
Renat Fatkhullin:

Do you think that drawing gui 300 times per second is free?

You'll be the first to claim that we're drawing incorrectly, not finishing drawing, or skipping drawing.

If we're talking about a desktop, you need a normal fast video card - it will chew up the high rendering rate. Minimizing windows can reduce the load on most applications that draw frequently.


For information, MetaTrader can do 100-300 FPS due to the large flow of quotes per second. Not 1-2 frames per second like regular programs, but actually hundreds of frames per second depending on the streams of quotes.

Forum on trading, automated trading systems & strategy testing

MT5 and Speed in Action

Renat Fatkhullin, 2020.10.05 22:19

Since the terminal often makes more fps than PC games because of very frequent upsets, the video card comes to the fore. Especially on vpsks without cards the whole load is put on the strangled processor.

Why?!

Forum on trading, automated trading systems and testing trading strategies

MT5 and Speed in Action

fxsaber, 2020.10.05 22:58

So why not snapshot update at 20Hz, thereby reducing fps?

The Market Overview window and the open positions table window are manual trading. Just closing these windows without minimizing the Terminal relieves the CPU to almost nothing.

Why do I need 300 fps for manual trading when 20 fps is enough?


I would also like to ask, have you eliminated constant server lags?

Forum on trading, automated trading systems and strategy tester

Accepting SL/TP orders

Renat Fatkhullin, 2021.01.20 12:45

We will try to check it anyway, but there are always single ejections in any system.

LCHI via MT5 with such lags will have to be skipped again.
 

Sub you buy a decent new processor already, it's painful to look at already

you can go to the temple for the poor, get a fxsaber for a new computer there

 
fxsaber:

Why?!

The Market Watch window and the window with the table of open positions are manual trading. Simply closing these windows without minimizing the Terminal relieves the CPU to almost nothing.

Why would a manual trader need 300 fps when 20 is enough?

If a window is open, it means that people want to see the data displayed there. Sometimes with 300-500 quotes per second total.

If you don't want it, close this window or reduce the number of characters. But don't forget that charts are also redrawn at a high frequency when a quote from that chart comes in.

 
Renat Fatkhullin:

If the window is open, it means that people want to see the data displayed there. Sometimes at a rate of 300-500 quotes a second in total.

The point is that you are wasting computing resources. Instead of doing it intelligently.

If you don't have to, close that window or reduce the number of characters. But don't forget that charts are also redrawn with high frequency when that chart quote comes in.

Write your own Market Watch and Current Position Table and everything works with less resource consumption than its regular counterparts.

Unable to trade hands with zero pings. It is impossible to read with your eyes the information from the price table on the screen more than 20 times per second.

It is a kind of self-deception.


Charts update quickly only if they are forced to do so by an MQL program. The charts themselves rarely peak at 20 fps - the quotes one character at a time don't go at 20 Hz.

And Market Watch and Position Table - there is no fps limit there, because symbols are not synchronized. Only there is no point in doing more than 20.


What fool can complain about Market Watch updating 20 times per second instead of 300? It's a digital spreadsheet, not a video.


The market overview is a digital spreadsheet, not a video. The lag would be so big that it would take many seconds to manually place an order by F9. I encountered this by accident yesterday.

 
Nikolay Kositsin:
Nikolai, which side of the library do you dig into? I've probed it with all available analysis methods, but I haven't found any resizing or resampling of pixel arrays and images.

run agg-web\index.html and that's it. Everything is accessible there.

I'm attaching all the executable demo tests. These are exe files. All taken from this library. I personally did not add viruses there. :)) Antivirus won't complain, but if in doubt, send it somewhere for checking.
Image resizing is demonstrated in two demos: image1 (pure resizing) and image_perspective (resizing is a special case, more flexible transformation).
Their codes are available in this library (look for cpp file in Demo directory and click on it). I haven't looked into it.

Files:
Demo.zip  3157 kb
 
fxsaber:

For the combat work of EAs, it is possible to close all additional windows where there is some movement (such as market Watch, Toolbox) and disable all graphics in the windows. Then the GUI will be in anabiosis, but there is no visualization what's going on - no idea. But in this case, you can display the necessary information through the canvas, say every 5 seconds or by pressing a key.

 
Dmitry Fedoseev:

What's that?

:):) Respect!

 
prostotrader:

:):) Respect!

of custom graphics.

Secondly, it's a question of capability and ability.

If there is ability, but no capability, there will be no evolution.

And if you don't have the ability and imagination, then no amount of capability will help either.

Not only is Kanvas a great way to wrap products in a nice, friendly interface, but it's also a great way to visualize various complex processes.

Renat often rightly says that the time of manual trading is gone and now the battle of automatic strategies rules.

I will say more, that simply crossing different lines will not give you a competitive edge and you will always be in the majority among the crowd.

Now, concepts such as various clouds and spaces, such as probabilities; various multidimensional systems and networks, such as neural networks, have long been on the scene. Artificial intelligence is coming into play.

The world is moving away from primitivism.

Without the visualisation of these complex processes there is no way around it. And here there are no options - only drawing on the pixel level, i.e. kanvas. That is what this fairy tale was created for.

So you would at least put it down in your subcortex that you can do that, in case you get used to it some day :))

Of course, visualization is a very heavy load on the system. Who makes it work all the time? It is necessary if the observer, the host, wants it.

And if you can see what's going on right now and what your robot is doing, isn't that a plus?

Personally, in my robot the price moves in 4-dimensional space, not in two-dimensional. Without a canvas you can't visualise it, but with a canvas you can.

 
Nikolai Semko:

For the combat work of EAs, it is possible to close all additional windows where there is some movement (such as market Watch, Toolbox) and disable all graphics in the windows. Then the GUI will be in anabiosis, but there is no visualization what's going on - no idea. But in this case, you can display the required information through the canvas, say every 5 seconds or by pressing some key.

I wrote it right away.

your computing resources. Instead of doing intelligently.

Write your Market Watch and a table of current positions and everything works with less resource consumption than your in-house counterparts.

Reason: