Exporting historical data from ThinkorSwim for external analysis

A

Azimuth

New member
I think this is failing @Azimuth because you are on Windows 7 and that version of PowerShell does not have ::new() for ArrayList. I have a few updated scripts, and plan on updating this post, but I am doubtful this will work on as Windows 7 machine.
@korygill thanks for the reply, what OS are you using?
 
V

velocity12345

New member
Kory,
Thanks for posting this, but I am struggling a bit. I have followed your directions EXACTLY but I am getting an error as shown below.

D:\tos-data> : The term 'D:\tos-data>' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
  • D:\tos-data> $data = .\Get-OHLC.ps1 .\StrategyReports_SPX_12620.csv
  • ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:\tos-data>:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException


Any thoughts?

I think it has to do with the ">" after D:\tos-data

thanks,
 
korygill

korygill

Active member
VIP
I see the confusion in my post.
The 'D:\tos-data>' is my prompt. Just use this part:
$data = .\Get-OHLC.ps1 .\StrategyReports_SPX_12620.csv
 
V

velocity12345

New member
Thanks!
I got it to work and really appreciate your help.
 
I

IFRPilot541

New member
Can this be used on other indicators? I am wondering about the AdvancingDecline indicator in particular
 
korygill

korygill

Active member
VIP
yes, you can if you get the calculation of that indicator in your strategy code and add the value to the metadata you add to the string along with open/close/etc data.
 
S

star900

New member
these are very smart scrips, I tried it and it works, thanks!. just a question, when I try to copy the Thinkscript code and put it on my account (studies->edit studies-> create) instead of using your Opened shared item it does not work on my chart (the script does not show errors but it shows nothing), how can I fix it? (and prevent it from opening real trades with the AddOrder command) Thanks!
 
korygill

korygill

Active member
VIP
@star900, not 100% sure what you are asking. This needs to be a Strategy not a Study so you can have AddOrder show the metadata we are exporting from TOS.
 
S

star900

New member
Thanks, I made a mistake and I put your script in the studies tab instead of in the strategies tab. now it is o.k. thanks again. by the way, is there a way to implement automation in the process of saving the data from Thinkorswim to the desktop? (e.g. every 5 minutes?)
 

Top