Questions from Beginners MQL5 MT5 MetaTrader 5 - page 61

 
Yedelkin:

I don't understand what exactly the inconvenience is. You downloaded the history once in OnInit() for all symbols - that's all.

Well, does the creation of an indicator guarantee that the history is downloaded at the right depth?

"MQL5 Reference - Accessing Time Series and Indicators - Organizing Data Accesshttps://www.mql5.com/ru/docs/series/timeseries_access

Receipt of new data from the server causes automatic updating of price data used in HC format for all timeframes and recalculation of all indicators, which obviously use them as input data for the calculation.

When I call an indicator from an Expert Advisor, if the history for a symbol is not loaded, the terminal will start downloading the data and the traffic stays the same

I don't like the independent loading of data, you need to constantly monitor it, logically the terminal of the 5th generation itself should do it! MT4 has an independent loading of history from the indicator code - "that was a pain in the ass" :)

Документация по MQL5: Доступ к таймсериям и индикаторам / Организация доступа к данным
Документация по MQL5: Доступ к таймсериям и индикаторам / Организация доступа к данным
  • www.mql5.com
Доступ к таймсериям и индикаторам / Организация доступа к данным - Документация по MQL5
 
IgorM:
I see. The inconvenience is in getting fresh data by the indicator (by other symbols), and not the historical ones, as it initially seemed. There is only one idea in this case: a simple indicator consumes memory in direct proportion to the number of its buffers, so if you don't want to waste memory, you can shift the loading to auxiliary indicators.
 
Yedelkin In this case there is only one idea: a simple indicator uses memory in direct proportion to the amount of its buffers, so if you don't want to waste memory, you may shift the loading on auxiliary indicators.

Oh! Now this is constructive, but nobody forbids to limit the number of bars in the terminal settings - it will consume less memory, CopyClose() etc. also requires arrays, and this is the same memory of the computer. And it seems that in the indicator itself you can limit the number of bars for recalculation - it also requires less memory.

will such a construction work correctly with the tester?

 
IgorM: But nobody forbids to limit the number of bars in the terminal settings - it will consume less memory

Yes, "forewarned is forearmed" :)

IgorM: CopyClose() etc. also require arrays, which is the same memory as the computer.

I disagree here about similar memory consumption by CopyClose() function. This function allows for small arrays, and the indicator buffer - it is always stretched to its full length specified in the terminal settings, i.e. at least 50 thousand bars.

IgorM : Such a design will work correctlywith the tester?
In September the tester does not react to limiting the number of bars in the terminal settings. I.e. it loaded the entire history. As for auxiliary indicators, they work fine in the tester.
 
Why are the calculations performed by the CPU and not the GPU? Maybe I don't understand something, but the efficiency of CUDA and OpenCL is recognised in many industries. Even for medical computing, some measly 2-4-8 agents are just pathetic compared to 128 or more agents from a graphics card
 
madload:

Tell me, why are the computational resources of the CPU and not the GPU? Maybe I don't understand something, but the efficiency of CUDA and OpenCL is recognised in many industries. Even for medical computations. And some measly 2-4-8 agents are just pathetic compared to 128 or more agents from a graphics card.

Who forbids you to use GPU computing resources?

See:

OpenCL: The Bridge to Parallel Worlds

OpenCL: From naive coding to more intelligent coding

 
Reshetov:

Who prevents you from using GPU computing resources?

See:

OpenCL: The Bridge to Parallel Worlds

OpenCL: From naive coding to more meaningful coding

I downloaded the metatester but it only has a CPU. there is no way to connect graphics cards to the calculations - that's what I ask - will there be software for the GPU?
 
madload:
there is no way to connect video cards to calculations

Don't be absurd. I gave you links to two articles where it is written in clear Russian and English how to use GPU capabilities for calculations.

 
Reshetov:

Don't be absurd. I gave you links to two articles where it is written in clear Russian and English how to use GPU capabilities for calculations.


MQ still haven't figured out how to standardize the plethora of vises running on cloud computers.

Problem 1: there are several CPU cores on the computer and one video card, all agents will go to the card asking for resources.

Problem 2: the vises differ a lot both in memory and number of cores (writing code for a custom widget is one thing but writing universal code is much harder). Don't forget that the intelligence of the crowd is equal to that of the dumbest sheep. Hence the problem of what bar to set. For one code 128 cores and 512 Mb of memory will be enough, while another code will need not less than 2GB and 2048 cores. Again viscosity varies much more than the CPU, hence the problem with cluding applications. For CPUs the issue is solved through the PR level from which cores are allowed to be used by agents.

madload:

Tell me, why are the calculations done by CPUs and not GPUs? Maybe I'm missing something, but the effectiveness of CUDA and OpenCL is recognised in many industries. Even medical calculations are used. And some measly 2-4-8 agents are just pathetic compared to 128 or more agents from a graphics card.

Cloud doesn't have a measly 2-4-8 agents, it scales up depending on the task, I tested an EA with 512 agents, for serious tasks it could have more.

 
Urain:

Don't bullshit yourself, agents don't use GPUs because MQ still haven't figured out how to standardise on a motley mass of vises on claud computers.

Don't bullshit, GPU is used in local agents. I didn't ask about the claud kettle, I asked about the metatester.

See https://www.mql5.com/ru/forum/6042/page10

Renat:

ilovebtc:

Is the video card already enabled in the new build of the tester or not? If so, where can I see the results?

Yes, of course. You can call OpenCL functions from MQL5 and calculate your tasks.

See https://www.mql5.com/ru/forum/23/page15

MetaTrader 5 Client Terminal build 655

...

25. MetaTester: Added support for using OpenCL programs in testing agents.

OpenCL programs are intended for performing computations on video cards that support OpenCL 1.1 or higher. Modern video cards contain hundreds of small specialized processors that can simultaneously perform simple mathematical operations on incoming data streams. The OpenCL language organizes such parallel computing and provides a huge speed-up for a certain class of tasks.

OpenCL: внутренние тесты реализации в MQL5
OpenCL: внутренние тесты реализации в MQL5
  • www.mql5.com
Мы ведем работу над нативной поддержкой OpenCL прямо в MQL5.
Reason: