Hi
I'm trying to create an indicator that in each bar write the price (or anything else) and and date and time to a file.
Then I want to import it from excel.
The problem is that their format are different.
I've tried different Easylanguage in order to write to a file and many Excel date&time commands in order to manipulate them, but it's quite difficult for me.
Could someone send me the EL date and time -> Excel proper instructions, please
I'm not sure if the best way would be to break down TS output to year, month, day, hour and minutes,
or export everything as string
or use the Julian format.
thanks
EL Date and Time -> Excel Format
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Excel is pretty smart in parsing dates.
it can interpret almost anything that resembles a date/time.
you set the format at the Excel column, and Excel will handle the rest.
what is the date/time format your are extracting from your indicator right now?
.
it can interpret almost anything that resembles a date/time.
you set the format at the Excel column, and Excel will handle the rest.
what is the date/time format your are extracting from your indicator right now?
.
Last edited by TJ on 01 Nov 2009, edited 1 time in total.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
In the EL help under "contents" then "text manipulation" are all the commands you need. A full read and study of all of them is obviously needed.
1/ first convert the number to a string
2/ for dates then split the string date into parts which are in the proper order adding the digits which are missing from the year. The "+" is used to concatenate each part together in the proper order.
2/ time is harder because it comes in different lengths. Use strLen to determine the length. You have to have a set of split commands for each of the lenghts (each split of course has the concatenation after).
In the end you will have a function for date and for time (time and time_s actually).
Once you get things in proper order of course you use the print to file command or the file append command.
1/ first convert the number to a string
2/ for dates then split the string date into parts which are in the proper order adding the digits which are missing from the year. The "+" is used to concatenate each part together in the proper order.
2/ time is harder because it comes in different lengths. Use strLen to determine the length. You have to have a set of split commands for each of the lenghts (each split of course has the concatenation after).
In the end you will have a function for date and for time (time and time_s actually).
Once you get things in proper order of course you use the print to file command or the file append command.