How Can We Help?
Publishing and Sharing Scripts
Publishing to TradingView Community
- Create and save your script
- Click “Publish Script” in the Pine Editor
- Fill in the description and tags
- Choose visibility (public or private)
- Add screenshots of your indicator in action
- Click “Publish”
Script Visibility Options
- Public: Available to all TradingView users
- Private: Only available to you
- Protected: Public but source code is hidden
Finding and Using Community Scripts
- Click “Indicators” in the top toolbar
- Select “Public Library” tab
- Browse categories or search for specific indicators
- Click on an indicator to add it to your chart
- Adjust settings in the popup dialog
- To see the code: right-click on the indicator name in the chart → “View Source”
Best Practices for Pine Script
- Comment your code: Add
//comments to explain complex logic - Use descriptive variable names: Makes code easier to understand
- Start simple: Begin with basic scripts and add complexity gradually
- Leverage existing code: Study public scripts to learn techniques
- Test thoroughly: Check your script on different timeframes and symbols
- Optimize performance: Avoid unnecessary calculations
- Version control: Save iterations of your scripts with version numbers
Debugging Pine Script
- Use
plot()to visualize intermediate values - Add
strategy.close_all()at the beginning of your strategy for clean backtests - Use
varkeyword for variables that should be initialized only once - Check Pine Script error messages carefully
- Test on different symbols and timeframes
Learning Resources
- Official TradingView Pine Script documentation
- Pine Script Reference (available in Pine Editor)
- TradingView public scripts (study how others code)
- TradingView Pine Script community forum
- Video tutorials on TradingView’s YouTube channel
TradingView Mobile App
The mobile app offers most desktop features on the go:
- Download from App Store (iOS) or Google Play (Android)
- Log in with your TradingView account
- Access your watchlists, saved layouts, and alerts
- Perform basic analysis with indicators and drawing tools
- Receive alerts on your mobile device