Best programming language for trading?

There is no languages to be learned for TOS. It uses its own proprietary scripting language called Thinkscript and is not compatible with any programming languages out there. If you want to "program" in TOS, you will have to learn Thinkscript, the most pain in the a** scripting language you will ever learn, super tedious, super slow and VERY limited in functionality. It's basically just a charting script. Good luck!

They created a scripting language just for Thinkorswim? I didn't know that. What was the justification?
 
vendor lockin

Exclusivity doesn't seem to make much sense when TDAmeritrade wants a competitive platform that appeals to the broadest possible customer base. Bad management decision?
 
Last edited:
I used to do perl but perl is poor when it comes to financial modules. Abandoned it years ago and rewrote everything in Python. Haven't regretted it.

Python is fast enough for 99% on ET. You can also move math heavy processes to C, giving you all the speed you need.

Python development speed is unbeatable in my opinion and for once you can understand your own code from years ago due to forced indentation. The modules you get are incredible and save tons of time.

C# seems pretty nice too.
 
Exclusivity doesn't seem to make much sense when TDAmeritrade wants a competitive platform that appeals to the broadest possible customer base. Bad management decision?

My take. They just want to create a trading platform with charting for the general masses, the moms and pops. Since the moms and pops don't program so they didn't think to create a programming capability with any formal languages or didn't want to dedicate any of their resources to them. Instead they must've dedicated their whole resources in developing charting and the user interface for TOS cuz the charts in TOS and the user interface are the nicest that I've ever seen. For those moms and pops who want to draw some lines on their charts and enter some trades, they created Thinkscript. Thinkscript is highly high-level, the whole codes is all pseudo codes; you can write an English essay in Thinkscript. There is no looping, no iteration, no looking back/calculating back of bars , a conditional control structure with forced "else" condition. The whole thing is horrible.
 
Would you mind posting the part of the Perl script for connecting to the internet and downloading data from a particular website? Or point me to a good, concise book on the subject. Thanks a lot.

This is the https request to Yahoo Finance with cookie and crumb already setup.

my $url = 'https://query1.finance.yahoo.com/v7/finance/download/' . $etic . '?period1=' . $period1 . '&period2=' . $period2 . '&interval=1d&events=history&crumb=' . $crumb;

$h = new HTTP::Headers();
$h->header('Cookie' => $cookie);
$user_agent = new LWP::UserAgent;
$request = new HTTP::Request ('GET',$url,$h);
$response = $user_agent->request($request);
$content = $response->content;
 
Back
Top