Jump to content

Text Converter


Recommended Posts

Hey, i know this is probably a simple question but i just cant figurr out how to do it. :-( Well i have a text file in which values wich belong to a chart are listed like this:

"year.month.day , hour:minute , high , low"

so now i want to convert every line to:

"date=year-month-day time=hour:minute high=high low=low"

i would be very thankful if you could help me.

Link to comment
Share on other sites

yea sure:

CODE
2008.07.17,18:05,1.5883,1.5884,1.5878,1.5879,58

2008.07.17,18:10,1.5878,1.5884,1.5875,1.5876,76

2008.07.17,18:15,1.5877,1.5879,1.5873,1.5873,61

2008.07.17,18:20,1.5874,1.5887,1.5874,1.5877,60

2008.07.17,18:25,1.5878,1.5879,1.5864,1.5870,120

2008.07.17,18:30,1.5871,1.5877,1.5869,1.5873,74

2008.07.17,18:35,1.5874,1.5874,1.5863,1.5865,67

2008.07.17,18:40,1.5867,1.5867,1.5856,1.5862,96

2008.07.17,18:45,1.5863,1.5864,1.5858,1.5863,62

to

CODE
<Candle endtime="2009-04-06 03:45:00.0" starttime="2009-04-06 03:40:00.0" openbid="1.5283" highbid="1.5288" lowbid="1.5281" closebid="1.5286" openask="1.5289" highask="1.5291" lowask="1.5286" closeask="1.529" vol="118"/>

<Candle endtime="2009-04-06 03:50:00.0" starttime="2009-04-06 03:45:00.0" openbid="1.5286" highbid="1.5289" lowbid="1.5281" closebid="1.5285" openask="1.5289" highask="1.5293" lowask="1.5286" closeask="1.5288" vol="132"/>

<Candle endtime="2009-04-06 03:55:00.0" starttime="2009-04-06 03:50:00.0" openbid="1.5284" highbid="1.5285" lowbid="1.5275" closebid="1.5275" openask="1.5288" highask="1.5288" lowask="1.5279" closeask="1.5282" vol="180"/>

where "Candle endtime=" is supposed to be the date given inthe first list "starttime=" the date given minus 5 minutes, "openbid" "highbid" "lowbid" "closebid" are the values after the "time" in the first list ( in that order) and "openask" "highask" "lowask" "closeask" are the values fromt first list plus 0.0007

Link to comment
Share on other sites

Nope its not. I just have history data from one program and i want to be able to analyse them in a different program which just needs the data to be like that. And if you are now wondering why i would want to do that: I just like the other program a lot better and i am a lot more used to it

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...