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);
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