Dislikedhello,
i know there are several program that save ascii data file, e.g. .csv .txt .prn.
how do i change year format, for example, year 2009 to 1999?
year is only thing i concern. i want date and time not changed at all.
THANK YOU.Ignored
Implied volatility data for Forex options in .CSV format 3 replies
How do I include the date in my CSV output? 2 replies
Exporting & importing Global variables to CSV Files 3 replies
Dislikedhello,
i know there are several program that save ascii data file, e.g. .csv .txt .prn.
how do i change year format, for example, year 2009 to 1999?
year is only thing i concern. i want date and time not changed at all.
THANK YOU.Ignored
[color="#ff0000"]datetime d = Time[i]; d = StrToTime((TimeYear(d) - 10) + StringSubstr(TimeToStr(d),4)); // subtracts 10 years from d[/color] string date1 = TimeToStr([color="#ff0000"]d,[/color]TIME_DATE); date1 = StringSubstr(date1,5,2) + "-" + StringSubstr(date1,8,2) + "-" + StringSubstr(date1,0,4); string time1 = TimeToStr([color="Red"]d[/color],TIME_MINUTES); FileWrite(handle, date1, time1, Open[i], High[i], Low[i], Close[i], Volume[i]);
DislikedTry the two scripts attached below (download them into your .....experts/scripts folder and restart MT4).Ignored
Dislikedahmed, this is a script, not an indicator. Hence every time you open mt4 (or want to refresh the csv files with the latest data) you must open the navigator (press ctrl-n) and drag the script back onto the chart. That will re-run the script and hence completely re-build the csv files with whatever data is in mt4's history files at that time.
DavidIgnored