Hi, Shrewd!        Login  
Shrewd'm.com 
A merry & shrewd investing community
Best Of MI | Best Of | Favourites & Replies | All Boards | Post of the Week! | How To Invest
Search MI
Shrewd'm.com Merry shrewd investors
Best Of MI | Best Of | Favourites & Replies | All Boards | Post of the Week! | How To Invest
Search MI


Investment Strategies / Mechanical Investing
Unthreaded | Threaded | Whole Thread (16) |
Author: rayvt   😊 😞
Number: of 5383 
Subject: Re: Signals
Date: 01/14/26 11:54 AM
Post New | Post Reply | Report Post | Recommend It!
No. of Recommendations: 8
With Barcharts, getting historical data added another tedious step - pasting puts every cell in one column. I had to write a gscript in Chrome's macro module to then parse each cell value into a 7 column wide row.

If you sign up for a free barcharts account, you can download a csv limited to 1000 rows.

Cut/paste is easy if you have a couple of Unix utilities. sed (to split every n'th row and paste (to put them all the fields of each symbol into one row).
I use cygwin on windows, but they might be native Windows versions.


Like this bat file script:
:: remove commas and CRs
sed -e '/Links/d' -e 's/\r//g' -e 's/,//g' nas-tech.txt >z0
sed -n "2~9p" z0 >z1
sed -n "3~9p" z0 >z2
sed -n "4~9p" z0 >z3
sed -n "5~9p" z0 >z4
sed -n "6~9p" z0 >z5
sed -n "7~9p" z0 >z6
sed -n "8~9p" z0 >z7
sed -n "9~9p" z0 >z8
sed -n "10~9p" z0 >z9

paste -d, z1 z2 z3 z4 z5 z6 z7 z8 z9 > nas-tech.csv

The sed "2~9p" means starting at line 2, print every 9th line. Because there are 9 fields per stock.
Post New | Post Reply | Report Post | Recommend It!
Print the post
Unthreaded | Threaded | Whole Thread (16) |


Announcements
Mechanical Investing FAQ
Contact Shrewd'm
Contact the developer of these message boards.

Best Of MI | Best Of | Favourites & Replies | All Boards | Followed Shrewds