Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I am having difficulty finding concise, well orgainzed training materials for Thinkorswim. I've googled and found nothing that was very satisfying. When the help person at Thinkorswim is asked (several; times) the usual answer is something like "Thinkorswim is to complex and convvluted to enable a comprhensive training manual, so just consider individual traing videos that might be apporpriate". I don't believe that constructing a DYI training syllibus is appropriate to such a critical task. So I am looking for suggestions to accomplish my goals. My interest at present is only in stock trading, using personal criteria formulas for stock selection filtering. I have no problem doing this with the Worden TC2000 ploatform, but Thinkorswim remains a mystery. Thinkorswim for Dummies would be great.
I have defined a variable and TOS won't let me use it.
Here is the snippet
def IMHLAmidprice;
switch (timePerProfile) {
case CHART:
IMHLAmidprice = ProfileMid;
case MINUTE:
IMHLAmidprice = if plotsDomain then pc else Double.NaN;
#Tracks Volumeprofile
case HOUR:
IMHLAmidprice = if plotsDomain then pc else Double.NaN;
#Tracks Volumeprofile
case DAY:
IMHLAmidprice = if plotsDomain then pc else Double.NaN;
#Tracks Volumeprofile
case WEEK:
case MONTH:
case "OPT EXP":
case BAR:
}
I receive:
Value never assigned to IMHLAmidprice at line number
I have been a programmer for 40 years and cant even fathom what is incorrect here.
I have seen other people use def varname; it works.
Is it the switch statement that cant be used this way? I have seen other scripts do this. that is why I am trying this.
You could try removing the definition for the variable at the beginning and just have it defined inside the Case. I'm not sure this will help, and it's sloppy code, but I don't suspect your script will ever be big enough to notice any performance issues. I've only just began playing with thinkScript, I've got about 10-15 years of programming behind me, and most was self taught and as a hobby, so it's just a thought. Good luck!