how to export indicator values on a file

To add comments, please log in or register
Laurentiu Sorin Tene
714
Laurentiu Sorin Tene  

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 ! 

Sergey Golubev
Moderator
106109
Sergey Golubev  
The script in MT5 CodeBase : Export Indicator's Values
Laurentiu Sorin Tene
714
Laurentiu Sorin Tene  
newdigital:
The script in MT5 CodeBase : Export Indicator's Values
Thanks again; it works !
dkean4
8
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:    
  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

Sergey Golubev
Moderator
106109
Sergey Golubev  
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.



dkean4
8
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

Sergey Golubev
Moderator
106109
Sergey Golubev  
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.

To add comments, please log in or register