McPete Posted June 11, 2009 Share Posted June 11, 2009 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 More sharing options...
oMBRa Posted June 11, 2009 Share Posted June 11, 2009 can you post an example of the contents of the text file? Link to comment Share on other sites More sharing options...
Inverted Posted June 11, 2009 Share Posted June 11, 2009 If they are comma seperated like your one-line example, then it should be simple. Link to comment Share on other sites More sharing options...
McPete Posted June 11, 2009 Author Share Posted June 11, 2009 yea sure: CODE2008.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 More sharing options...
McPete Posted June 11, 2009 Author Share Posted June 11, 2009 is it even possble to do this?? Link to comment Share on other sites More sharing options...
oMBRa Posted June 11, 2009 Share Posted June 11, 2009 it's totally different from what you asked in the first post... so the output should be like your first or second post? Link to comment Share on other sites More sharing options...
McPete Posted June 11, 2009 Author Share Posted June 11, 2009 :-D sorry for that. i just wanted to make the problem as simple as possible. well the output should be as said in the second post. Link to comment Share on other sites More sharing options...
Valuater Posted June 11, 2009 Share Posted June 11, 2009 it's totally different from what you asked in the first post...so the output should be like your first or second post?I agree... Nowhere near what you asked for!!8) Link to comment Share on other sites More sharing options...
McPete Posted June 11, 2009 Author Share Posted June 11, 2009 hmm well i think i should change my way of explaining things. Still could you please help me do that? Link to comment Share on other sites More sharing options...
Inverted Posted June 11, 2009 Share Posted June 11, 2009 This is for an automatic bidder, right ? I hate those Link to comment Share on other sites More sharing options...
McPete Posted June 11, 2009 Author Share Posted June 11, 2009 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now