Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Is there a way to test my code without logging onto my account?
SInce the submission of this post, the UDL has been incorporated in the NPP environment.If you prefer Notepad++ (NPP) as a thinkScript editor, I hope you will find the attached files to implement a User Defined Language (UDL) useful. Once installed, the following capabilities are enabled
If a thinkscript language element is not highlighted in the proper color, you should probably look at it.
- Syntax highlighting
- AutoComplete for thinkScript language elements
This will not stop you from coding badly or mismatching parameters, but it will make certain errors jump out.
A few notes:
- This was developed for a Light Themed screen. If you want dark themed, you will need to adjust colors appropriately. NPP help has lots of information about UDLs and setting colors. Who ever takes this on should submit it back to NPP or to me and I will submit it to them.
- I have submitted this to NPP and suspect they will incorporate it in a future build as the 91st language they support.
Manual Installation instructions are as follows
What this UDL (User Defined Language) does
1) Provides Syntax based highlighting of proper language elements
2) Provides Autocomplete source by language keywords
How to Install the UDL
1) Use Notepad++'s Language > User Defined Language > Open User Defined Language folder... menu entry to find the right userDefineLangs\ folder
Place the file thinkScript.xml in that folder.
2) Locate the installation folder for Notepad++. It should be something like C:\Program Files\Notepad++. You will note multiple folders in that folder. Notice "autoCompletion" and "functionlist"
3) Rename autoComplete.xml to thinkScript.xml (i know) and deposit it in the autoComplete folder
4) Rename functionlist.xml to thinkScript.xml (i know) and deposit it in the functionlist folder
5) Enter the functionlist foldere and rename overrideMap.xml to something else
6) Deposit overrideMap.xml I sent you in the functionlist folder.
7) Restart Notepad++
When you open a file with the extension of "ts", it should apply the UDL. You can manually invoke the UDL from the Language menu. You can also select "None" to disable the Syntax highlighting.
Should you decide to back out, just delete the 3 thinkscript.xml files, delete the overrideMap.xml file and restore your original overrideMap.xml.
When coding Think Script do the experienced coders use "Virtual Studio Code" or as I do, the Think or swim, Tools, Thinkscript, and save directly to see the changes in my indicator. I have tried Virtual Studio Code for think script, downloaded all the think script libraries, but I cannot fine a debugger even in the marketplace.
Does the Debugger exist?
It has been said they "Ruby" code is very similar to Think Script cand could be used. It has a debugger available.
I would be so handy to step through the code and see the label contents.
Comments welcome?
Thanks in advance for your time.
| Thread starter | Similar threads | Forum | Replies | Date |
|---|---|---|---|---|
|
|
useThinkScript Copy-Code-toClipboard add-on | Tutorials | 2 | |
| I | How to Add "ShowOnlyLastPeriod" Functionality to a Code In ThinkOrSwim | Tutorials | 0 | |
| T | BubbleMover Code Snippet for ThinkOrSwim | Tutorials | 82 | |
|
|
How to import existing thinkScript code on ThinkorSwim | Tutorials | 94 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.