Join useThinkScript to post your question to a community of 21,000+ developers and traders.
ThinkScript Drives Me Crazy
Why is it that the compiler does not complain about top1 and bot1 but it complains about st?
View attachment 19536
Think of it this way.I also find it disappointing that ThinkScript will not allow plot statements, AddVertical, AddCloud, etc as part of conditional statements.
Good to know. Thank you halcyonguy you're always very helpful.next time post whole code.
was probably a missing st = ... line after those lines.
thinkscript is horrible about highlighting errors. usually the problem is after the red highlights.
You know, I've tried to access that wizard but it is always grayed out.Think of it this way.
The Condition Widget is uniform across watchlists, scans, conditional orders, etc...
The formatting statements such as plot statements, AddVertical, AddCloud can't be used in any of the other modules.
That is why the Condition Wizard requires all conditions be defined before formatting.
This way all the logic is interchangeable throughout all modules.
After that, the unique simple straight-forward formatting statements can be appended when the condition script is used for displaying on a chart.
You can define conditions on the plot statement itself, like every scripting language, TOS scripting has its limitations.Thanks to both of you. I blew away the code and started over. Not sure what is different from the first time other than there must have been some type of syntax error somewhere else in the code.
I did try the DEF inside the conditional statement and IIRC, it said that was not allowed.
I also find it disappointing that ThinkScript will now allow plot statements, AddVertical, AddCloud, etc as part of conditional statements.
Sure thing. Still learning so I'm sure all of it is on me.You can define conditions on the plot statement itself, like every scripting language, TOS scripting has its limitations.
You know, I've tried to access that wizard but it is always grayed out.
My background is C++, EasyLanguage, MQL4 and a little Pine Script and so far ThinkScript just hasn't impressed. Even the editor is lacking and buggy (try to arrow quickly to a piece of code and it jumps to line 1). Once I get more experience maybe my opinion will change. I hate asking for help and trust me I try to solve things on my own before posting but I do appreciate the community here and their willingness to help.
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.