Can I stop code from working but still keep it in the code edit area?

EddieM

New member
Plus
When in the code edit area can i add in something around some lines of code so it stays in the edit area but will not work to show up on the chart.

I tried adding a line and that wouldn't work.
So to disable ares of the code but it is still there so I can turn it back on or off as I am testing different things without removing it.

Thanks.
 
@EddieM Yes, the best way to run TOS while editing scripts is to use a detached window of Tools > Thinkscript... You can have multiple Studies/Strategies open for editing and as soon as you click Save any Charts running that script will instantly update, reflecting your changes... Detach the Thinkscript panel before opening scripts for editing for best results... I sometimes have 4 - 6 scripts open for editing at a time and bounce between them and monitoring Charts... The image below is a detached panel with 3 scripts open for editing... The Save button won't appear in the upper right corner until you have made an edit to the code... Hope this helps...

1728428210486.png


1728427973081.png
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

When in the code edit area can i add in something around some lines of code so it stays in the edit area but will not work to show up on the chart.

I tried adding a line and that wouldn't work.
So to disable ares of the code but it is still there so I can turn it back on or off as I am testing different things without removing it.

Thanks.

i use input to control test codes/labels/bubbles/...
you can do something like this, or add the variable to a plot formula, to control when it is seen.

input test1_label = no;
addlabel(test1_label, " test stuff", color.cyan);
 
My first post, while good information, didn't address your request as I'm reading now...

Another potential solution would be to use the script structure if you are working with a larger block of code... Once you get the hang of them they can come in quite handy...
 
To "comment out" a line of code so that it doesn't do anything put a "#" before the line:
Ruby:
def price = close;
# def price = open;
This will not error out as price is NOT defined twice. The second one is a "comment" and is not parsed by the ThinkScript engine.

Perhaps that helps?
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
351 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top