I want to write a script to export the values of the current indicators on the chart, but I cannot give them nice label names because there is no function to get the buffer name.
- Questions from Beginners MQL5 MT5 MetaTrader 5
- Detect arrows and issue an alert
- How to get with mql5 a list of all indicators attached to the chart...
In many platforms like MetaTrader 4/5 (MT4/MT5), you may encounter issues with getting the buffer names of indicators since there's no built-in function to retrieve them. However, you can work around this by manually assigning label names based on the indicator's buffer index.
Manual Label Assignment: Since you can't retrieve buffer names directly, you can manually map the buffer index to a label based on the indicator you're using.
Ian Worthington:
I want to write a script to export the values of the current indicators on the chart, but I cannot give them nice label names because there is no function to get the buffer name.
I want to write a script to export the values of the current indicators on the chart, but I cannot give them nice label names because there is no function to get the buffer name.
Because MetaQuotes didn't think beforehand to your needs.
But I do agree, there are a lot of things which are missing in MQL, certainly about indicators, but we have to deal with it as it is.
Hi
I’m not sure what you want to do here. But I don’t think there is a function which can export values from indicators from the chart directly. You can write a script and in the script choose indicators you want to export, so then you can access buffers simply by the numbers (you don’t need names) and you can add your own names in the files export (for example based on indicator name)
Have a nice day👍📊
Ian Worthington:
I want to write a script to export the values of the current indicators on the chart, but I cannot give them nice label names because there is no function to get the buffer name.
I want to write a script to export the values of the current indicators on the chart, but I cannot give them nice label names because there is no function to get the buffer name.
There is a function to retrieve buffers and it is CopyBuffer in combination with iCustom. You don't need them to be the same name. You just need to use the correct buffer numbers in copybuffer
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