ThinkScript Custom Code - Fall Cleaning and Change Management

D

diazlaz

Well-known member
2019 Donor
VIP
Hi Everyone,

So.. I made a decision this afternoon, to save off ~600 custom scripts I've accumulated and built over the last 2 years and deleted all custom code from the platform. I found myself with duplication of code, various versions, unmanaged, unclassified and decided to go thru all the code and start cleaning up and classifying the code and scripts to make better use and structure my strategies, trading plans and backtest.

Curious has anyone else done this? 600+ has become difficult to even understand what I have. how do you all manage this from becoming a mess and managing change and awareness to the code you have?

I want to start leveraging devops processes, and start putting all my ideas and development into backlog, and start working thru it in a prioritized order.

Any recommended practices or ideas you all use please share. I will certainly share as I being this journey.
 
D

diazlaz

Well-known member
2019 Donor
VIP
So thinking of 2 ways of managing the code so far, comments always welcome:

1) Currently using a mindmap software and saving off snippets of code in the text field such as:



2) Leverage Visual Studio Code + GitHub to manage scripts.
 
BenTen

BenTen

Administrative
Staff
VIP
This is a great question. Thank you for bringing it up. I was facing this problem awhile ago when I was messing with code conversion and trying to keep track of all the custom indicators that I was able to put together.

What I'm currently doing:
  1. For coding, I start with Visual Studio
  2. Then I plug the code into the default ThinkorSwim editor for debugging
  3. Once the indicator is finished, I upload it to a private Github repo.
Github is extremely useful because I can keep track of all the revisions and make notes of changes. I can also create different folders for completed indicators, WIP (work in progress), and "broken" indicators (lol).

Note: I'm not a native developer, so this process might not be the best solution :)
 
korygill

korygill

Active member
VIP
Great idea here. I think Github would be great. I have a pro account and would gladly host the new repo. I started this for myself at https://github.com/korygill/technical-analysis but then kind of migrated to this site, but navigating and comparing all the different indicators is cumbersome sometimes, and it's very hard to easily compare similar indicators. So I am with @diazlaz and @BenTen here that this might be a good way to organize things (and also expose scripts for other languages like TradingView, back testing with Python or PowerShell, and more). Great thread.

I should also add that this would not diminish this site, but rather enhance it. Instead of posting code here, we could point to github for code, and the articles around things can still be here, and maybe also in readme.md (markup) documents too.

Curious to learn what others think.
 
Last edited:
S

skynetgen

Active member
Warehouse
Yeah quite a difficult task. There is also the other thing - indicator and code tracking is great. but really indicators without tuning to specific timeframe as part of system are quite useless ( I mean we are not really doing it just for pretty charts are we?) . So there is backtesting of specific settings and signals. Personally I just track it for me personally in excel spreadsheet and save as complete layouts in thinkorswim.
 
mc01439

mc01439

Well-known member
2019 Donor
VIP
Hi Everyone,

So.. I made a decision this afternoon, to save off ~600 custom scripts I've accumulated and built over the last 2 years and deleted all custom code from the platform. I found myself with duplication of code, various versions, unmanaged, unclassified and decided to go thru all the code and start cleaning up and classifying the code and scripts to make better use and structure my strategies, trading plans and backtest.

Curious has anyone else done this? 600+ has become difficult to even understand what I have. how do you all manage this from becoming a mess and managing change and awareness to the code you have?

I want to start leveraging devops processes, and start putting all my ideas and development into backlog, and start working thru it in a prioritized order.

Any recommended practices or ideas you all use please share. I will certainly share as I being this journey.
A yearly archive and throw out all the junk. The archives have painted a picture of my journey through the years.
 
D

diazlaz

Well-known member
2019 Donor
VIP
A yearly archive and throw out all the junk. The archives have painted a picture of my journey through the years.
Great suggestion. As I review all my legacy code, I'm classifying, recreating new scripts in TOS, tagging and archieve older code and keeping it as code outside the platform for future evaluation.
 
D

diazlaz

Well-known member
2019 Donor
VIP
Thanks for all your suggestions. If anyone has any good meta data or tagging organization for code classification please share.

At some point during the upcoming holidays will see if I can write a small tutorial on how to use visual Studio code and git to manage thinkscript.
 
korygill

korygill

Active member
VIP
Here is a git repo I followed a while ago that has some organization of indicators. No tagging that I know of, but some ideas for how organizing indicators can be done.

 

Top