You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The standard CChart class is glitchy.
Run the script and voila, the chart is blown away by the wind :o)
The chart is deleted without any error messages.
I can recommend that before the script terminates, you call
eur.Detach();
Then the chart will not be deleted.
I can recommend that, before the script terminates, you call
eur.Detach();
Then the chart will not be deleted.
Please tell me if there are several charts (indicators) in a single code. How to display them from this one code in several different windows (indicators) (in separate windows under a candlestick chart)?
If "one code calculates several charts (indicators)", then, most likely, indicator buffers for each of these indicators are calculated in the same code. To output the values of indicator buffers in "several different windows (in separate windows below the candlestick chart)", it is sufficient to create MQL5 indicators according to the number of necessary windows, and copy the necessary indicator buffers from the main code to each of these indicators.
If "one code calculates several charts (indicators)", then, most likely, indicator buffers for each of these indicators are calculated in one code. To output the values of indicator buffers in "several different windows (in separate windows below the candlestick chart)", it is sufficient to create MQL5 indicators according to the number of necessary windows, and copy the necessary indicator buffers from the main code into each of these indicators.
-Alexey-:
подскажите пожалуйста, как копировать имеющийся индикаторный буфер, который находится в основном коде, в другой индикатор?
So I've inserted a link to"copy in each of these indicators" in the reply. Here is the link to the documentation itself:https://www.mql5.com/ru/docs/series/copybuffer If anything is unclear on this link, please ask.
Thank you. I'll try to figure it out.
There's nothing complicated there. Each of your indicator buffers is pre-numbered in the source code. You create a new indicator and indicator buffers for it, and then you request the indicator buffer from the source code using the CopyBuffer function and copy the necessary values from it.
-Alexey-:
Кажется, все понятно. Вначале необходимо использовать функцию ICustom, т.к. ее результат Handle нужен функции CopyBuffer, потом использовать функцию CopyBuffer с полученным ранее параметром Handle.
Quite right. I didn't mention the iCustom.
Did I get it right that the code with buffer calculations may not be placed on the chart, but only indicators that copy buffers from it and display them?