how to export indicator values on a file

 

Hello,

Please, I need to export the indicator values from a specific chart on a file (txt, csv...)

All suggestions are welcome !

Thanks in advance ! 

 
The script in MT5 CodeBase : Export Indicator's Values
 
newdigital:
The script in MT5 CodeBase : Export Indicator's Values
Thanks again; it works !
 
Hi Sergey.  That script runs fine, but it always comes up with EURUSD right at the start as soon as it runs the line:    
  string sSymbol=Symbol();

Somehow I do not know how to change that symbol, to EURJPY.  Can you tell me where the Symbol() method resides so I can inspect it and find where it fetches the EURUSD symbol?  It is probably set in some default setting... a file or some global buffer.   This is my first attempt at coding with MT5, though I have years of experience with other languages.

Any help would be appreciated.


Dennis K

 
dkean4:
Hi Sergey.  That script runs fine, but it always comes up with EURUSD right at the start as soon as it runs the line:    

Somehow I do not know how to change that symbol, to EURJPY.  Can you tell me where the Symbol() method resides so I can inspect it and find where it fetches the EURUSD symbol?  It is probably set in some default setting... a file or some global buffer.   This is my first attempt at coding with MT5, though I have years of experience with other languages.

Any help would be appreciated.


Dennis K

As I see -

ExtFileName=sSymbol;

it means: if you attach this script to EURJPY so this script will create the file with the name as "EURJPY_PERIOD_H1(RSI,14)"

Example: I attached the script to USDJPY chart, and I found USDJPY_PERIOD_H1(RSI,14) file in the file's folder.



 

Sergey, you said:   

 "if you attach this script to EURJPY so this script will create the file with the name as "EURJPY_PERIOD_H1(RSI,14)"


Thanks for the reply...   I may not know how to attach the script to the chart.  In the MetaEditor I click on the round green button with the arrow to launch the script.  That seems to change my Currency choice in the active Chart, from EURJPY to EURUSD for the duration that the script runs, and then it returns back to EURJPY.

So, is it possible to attach the script directly from the MetaEditor or do I need to drag the compiled file and drop it on the chart?

(Elementary question... sorry!)


Dennis K

 
dkean4:

Sergey, you said:   

 "if you attach this script to EURJPY so this script will create the file with the name as "EURJPY_PERIOD_H1(RSI,14)"


Thanks for the reply...   I may not know how to attach the script to the chart.  In the MetaEditor I click on the round green button with the arrow to launch the script.  That seems to change my Currency choice in the active Chart, from EURJPY to EURUSD for the duration that the script runs, and then it returns back to EURJPY.

So, is it possible to attach the script directly from the MetaEditor or do I need to drag the compiled file and drop it on the chart?

(Elementary question... sorry!)


Dennis K

  • Open Metatrader 5;
  • go to 'Files' - 'Open data Folder' and find 'Scripts' folder; download the file (exportindicatorwsvalues_v2.mq5) from here and place this file to 'Scripts' folder;
  • open MetaEditor, find this on the left side, open the file in MetaEditor and compile.
  • go to Metatrader 5, open the chart and attach the script to the chart;
  • after that -  'Files' - 'Open data Folder' and find 'Files' folder with file create by the script.

 
Sergey Golubev:
The script in MT5 CodeBase : Export Indicator's Values

Any further comments regarding the script that Sergey has linked to, please comment in the dedicated thread.

Link

Scripts: Export Indicator's Values v1
Scripts: Export Indicator's Values v1
  • 2011.01.21
  • www.mql5.com
Export Indicator's Values v1: Author: NFTrader...
 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".