If somebody shared with you a block of code to use on ThinkorSwim, most likely that's a thinkScript code. This means you will have to import it manually into ThinkorSwim in order for it to turn into an actual indicator.
For beginners, importing some plain code into a software is difficult. This tutorial should walk you through that process.
How to Import thinkScript code in ThinkorSwim platform
- Launch ThinkorSwim from your computer
- Click on Studies (should be near the top right hand corner)
- Edit Studies > Create
- Give your indicator a name
- Copy and paste the thinkScipt code into the thinkScript Editor
- Click Ok
- Click Apply
And now from a simple block of code, you just turn it into an indicator.
Some screenshots just in case you need extra assistance.