EL Date and Time -> Excel Format

Questions about MultiCharts and user contributed studies.
quark
Posts: 9
Joined: 08 Sep 2009

EL Date and Time -> Excel Format

Postby quark » 30 Oct 2009

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

User avatar
TJ
Posts: 6521
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Postby TJ » 30 Oct 2009

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?


.
Last edited by TJ on 01 Nov 2009, edited 1 time in total.

quark
Posts: 9
Joined: 08 Sep 2009

Postby quark » 30 Oct 2009

Hello again
OK, I got it but now the problem is that Excel tells that there is not enough memory (resources) in the computer to handle all data

I have to learn R or some other useful software

User avatar
TJ
Posts: 6521
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Postby TJ » 30 Oct 2009

if you are using an older version of Excel (pre-2007),
it can only handle limited amount of memory. (I think it was 2GB max)

new version lets you utilize all available RAM.

bowlesj3
Posts: 1977
Joined: 21 Jul 2007
Has thanked: 155 times
Been thanked: 395 times

Postby bowlesj3 » 31 Oct 2009

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.

bowlesj3
Posts: 1977
Joined: 21 Jul 2007
Has thanked: 155 times
Been thanked: 395 times

Postby bowlesj3 » 01 Nov 2009

It seems that the FormatDate FormatTime commands that EL has could make all this a lot easier (the functions are already available).


Return to “MultiCharts”