Query - Export Data With Indicator Values without using File --> Export?

Questions about MultiCharts and user contributed studies.
svfutures24
Posts: 19
Joined: 19 Dec 2023
Has thanked: 1 time

Query - Export Data With Indicator Values without using File --> Export?

Postby svfutures24 » 05 May 2024

I am unable to find information on this so I am posting it here. Hope someone can help.

I am aware that MC has a feature of exporting data with indicators from the File Menu.

However, I have a code file that allows me to export data:

Code: Select all

Inputs: iPrint(False), iFileName("C:\XYZ\ES_Data.csv"), iPrecision(4); Variables: dateInDateTimeFormat(0), timeInDateTimeFormat(0), dateReadable(""), timeReadable(""); Once begin Print(File(iFileName),"Date,Time,Open,High,Low,Close,Vol,OI"); end; dateInDateTimeFormat = ELDateToDateTime(Date); timeInDateTimeFormat = eltimetodatetime(Time); dateReadable = FormatDate("MM/dd/yyyy",dateInDateTimeFormat); timeReadable = FormatTime("HH:mm:ss",timeInDateTimeFormat); if iPrint = True then Print(File(iFileName),dateReadable + "," + timeReadable + "," + NumToStr(O,iPrecision) + "," + NumToStr(H,iPrecision) + "," + NumToStr(L,iPrecision) + "," + NumToStr(C,iPrecision) + "," + NumToStr(Volume,0) + "," + NumToStr(OpenInt,0) + NewLine);
I wanted to know if there is a way of referencing subchart data without having to re-code the indicators into this file or creating a function to call to get the values? If I have 3 subcharts with indicators plotted and I wanted to get the Value of each e.g. value1, value2, value3, from the subchart in code is there a way to refer to the subchart values directly?

As opposed to recreating the indicator / calling the function and saving their values to then use it inside of the above code..

Please let me know.

Thanks

Return to “MultiCharts”