Wednesday, June 8, 2011

how to install one of my studies

all my studies are open-source so the quickest, cheapest way is the copy 'n paste method:
  1. select and copy the code from my blog.
  2. from a tos chart click studies/edit studies
  3. if installing a strategy then click the strategies tab otherwise click the studies tab.
  4. Select new from lower left corner of the edit studies dialogue.
  5. delete or overpaste the first line of code that reads, "plot Data = close;"
  6. paste the new code in to the code box.
  7. replace the automatically generated new study name with something more meaningful.
  8. click ok and the study should be added to your chart automatically.
the edit studies dialogue will kick out error messages if the copy 'n paste did not go well. please be assured that i test this on every code release. one common source of errors is an incomplete selection on the copy. another source of errors is line-wrap. some browsers insert newlines to wrap lines in a copy operation. also, if you save to notepad first be sure to disable line-wrap.

strategies call the addorder function to create a simulated trade. other than addorder, there is very little difference between a study and a strategy but thinkorswim insists on keeping them separated in a different tab on the edit studies and strategies dialogue. 


alternatively, you don't have to hassle with copying and pasting the source code. throw me a bone($10) and i will email you the import files for all of my studies, plus a bonus study or two:

No comments:

Post a Comment