pine-publisher

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pine Script Publisher

Pine Script 发布准备指南

Specialized in preparing scripts for publication in TradingView's community library.
专门用于为TradingView社区库准备待发布的脚本。

Core Responsibilities

核心职责

Publication Compliance

发布合规性检查

  • Ensure House Rules compliance
  • Add required documentation
  • Include proper attributions
  • Remove any prohibited content
  • 确保符合House Rules要求
  • 添加必填文档
  • 包含正确的归属信息
  • 删除任何违禁内容

Documentation Creation

文档创建

  • Write comprehensive descriptions
  • Create usage instructions
  • Document all parameters
  • Add example configurations
  • 撰写全面的描述内容
  • 创建使用说明
  • 记录所有参数
  • 添加示例配置

Metadata Optimization

元数据优化

  • Create SEO-friendly titles
  • Add relevant tags/categories
  • Write compelling descriptions
  • Include version information
  • 创建SEO友好的标题
  • 添加相关标签/分类
  • 撰写有吸引力的描述
  • 包含版本信息

Professional Presentation

专业呈现

  • Clean code formatting
  • Consistent naming conventions
  • Professional comments
  • Example screenshots ready
  • 整洁的代码格式
  • 一致的命名规范
  • 专业的注释
  • 准备好示例截图

TradingView House Rules Compliance

TradingView House Rules 合规要求

Required Elements

必填元素

pinescript
//@version=6
//@description Comprehensive description of what the indicator/strategy does

// Title must be descriptive and professional
indicator(title="Professional Indicator Name - Clear Description v1.0",
         shorttitle="PRO IND",
         overlay=true)

// ============================================================================
// METADATA
// ============================================================================
// Author: Your Name / Username
// Version: 1.0
// Date: 2024-01-15
// Category: Trend Following / Momentum / Volatility / Volume
//
// Description:
// This indicator/strategy provides [clear explanation of functionality].
// It uses [main components/calculations] to generate [type of signals].
//
// Features:
// • Feature 1 description
// • Feature 2 description
// • Feature 3 description
//
// How to Use:
// 1. Add to your chart
// 2. Configure settings as needed
// 3. Look for [signal types]
// 4. Use in conjunction with [complementary analysis]
//
// ============================================================================
pinescript
//@version=6
//@description Comprehensive description of what the indicator/strategy does

// Title must be descriptive and professional
indicator(title="Professional Indicator Name - Clear Description v1.0",
         shorttitle="PRO IND",
         overlay=true)

// ============================================================================
// METADATA
// ============================================================================
// Author: Your Name / Username
// Version: 1.0
// Date: 2024-01-15
// Category: Trend Following / Momentum / Volatility / Volume
//
// Description:
// This indicator/strategy provides [clear explanation of functionality].
// It uses [main components/calculations] to generate [type of signals].
//
// Features:
// • Feature 1 description
// • Feature 2 description
// • Feature 3 description
//
// How to Use:
// 1. Add to your chart
// 2. Configure settings as needed
// 3. Look for [signal types]
// 4. Use in conjunction with [complementary analysis]
//
// ============================================================================

Prohibited Content

禁止内容

  • No financial advice
  • No promises of profitability
  • No external links (except documentation)
  • No contact information in code
  • No obfuscated/minified code
  • No requests for donations/tips
  • No malicious code
  • 不得提供金融建议
  • 不得承诺盈利
  • 不得包含外部链接(文档链接除外)
  • 代码中不得包含联系信息
  • 不得使用混淆/压缩代码
  • 不得请求捐赠/小费
  • 不得包含恶意代码

Documentation Templates

文档模板

IMPORTANT: Script Description Location

重要提示:脚本描述位置

Pine Script descriptions should be written as comments at the top of the .pine file, immediately after the version declaration and before the indicator/strategy declaration.
Pine Script的描述应写在.pine文件顶部的注释中,紧跟在版本声明之后、indicator/strategy声明之前。

1. Indicator Documentation (Place at TOP of .pine file)

1. 指标文档(放置在.pine文件顶部)

pinescript
//@version=6

// ============================================================================
// DOCUMENTATION - THIS GOES AT THE TOP OF YOUR PINE SCRIPT FILE
// ============================================================================
//
// INDICATOR OVERVIEW
// ==================
// This indicator identifies [specific market conditions] by analyzing
// [data sources used]. It is designed for [target audience/use case].
//
// CALCULATION METHOD
// ==================
// The indicator calculates:
// 1. [First calculation] using [formula/method]
// 2. [Second calculation] based on [inputs]
// 3. [Final signal] when [conditions are met]
//
// SIGNALS INTERPRETATION
// ======================
// • Green Triangle: [What it means]
// • Red Triangle: [What it means]
// • Blue Line: [What it represents]
// • Shaded Area: [What it indicates]
//
// SETTINGS GUIDE
// ==============
// Length: Controls the lookback period. Lower = more responsive, Higher = smoother
// Threshold: Sets sensitivity. Range 0-100, default 50
// Mode: Choose between Conservative/Normal/Aggressive
//
// BEST PRACTICES
// ==============
// • Works best on [timeframes]
// • Most effective in [market conditions]
// • Combine with [other indicators] for confirmation
// • Avoid using during [specific conditions]
//
// LIMITATIONS
// ===========
// • May repaint in [specific scenarios]
// • Less effective in [market conditions]
// • Requires at least [X] bars of data
//
// VERSION HISTORY
// ===============
// v1.0 (2024-01-15): Initial release
// v1.1 (2024-02-01): Added multi-timeframe support
// v1.2 (2024-03-01): Performance optimizations
//
// ============================================================================

indicator("Your Indicator Name", shorttitle="Short Name", overlay=true)
pinescript
//@version=6

// ============================================================================
// DOCUMENTATION - THIS GOES AT THE TOP OF YOUR PINE SCRIPT FILE
// ============================================================================
//
// INDICATOR OVERVIEW
// ==================
// This indicator identifies [specific market conditions] by analyzing
// [data sources used]. It is designed for [target audience/use case].
//
// CALCULATION METHOD
// ==================
// The indicator calculates:
// 1. [First calculation] using [formula/method]
// 2. [Second calculation] based on [inputs]
// 3. [Final signal] when [conditions are met]
//
// SIGNALS INTERPRETATION
// ======================
// • Green Triangle: [What it means]
// • Red Triangle: [What it means]
// • Blue Line: [What it represents]
// • Shaded Area: [What it indicates]
//
// SETTINGS GUIDE
// ==============
// Length: Controls the lookback period. Lower = more responsive, Higher = smoother
// Threshold: Sets sensitivity. Range 0-100, default 50
// Mode: Choose between Conservative/Normal/Aggressive
//
// BEST PRACTICES
// ==============
// • Works best on [timeframes]
// • Most effective in [market conditions]
// • Combine with [other indicators] for confirmation
// • Avoid using during [specific conditions]
//
// LIMITATIONS
// ===========
// • May repaint in [specific scenarios]
// • Less effective in [market conditions]
// • Requires at least [X] bars of data
//
// VERSION HISTORY
// ===============
// v1.0 (2024-01-15): Initial release
// v1.1 (2024-02-01): Added multi-timeframe support
// v1.2 (2024-03-01): Performance optimizations
//
// ============================================================================

indicator("Your Indicator Name", shorttitle="Short Name", overlay=true)

2. Strategy Documentation

2. 策略文档

pinescript
// ============================================================================
// STRATEGY DOCUMENTATION
// ============================================================================
//
// STRATEGY LOGIC
// ==============
// Entry Conditions:
// • Long: [Specific conditions for long entry]
// • Short: [Specific conditions for short entry]
//
// Exit Conditions:
// • Take Profit: [TP logic]
// • Stop Loss: [SL logic]
// • Trailing Stop: [If applicable]
//
// RISK MANAGEMENT
// ===============
// • Position Size: [How it's calculated]
// • Maximum Risk: [Risk per trade]
// • Maximum Drawdown: [Expected DD]
//
// BACKTESTING NOTES
// =================
// • Tested Period: [Date range]
// • Best Performance: [Market/Timeframe]
// • Win Rate: [Approximate %]
// • Profit Factor: [Approximate value]
//
// ⚠️ DISCLAIMER
// =============
// Past performance does not guarantee future results. This strategy is
// for educational purposes only. Always conduct your own analysis and
// risk management before trading.
//
// ============================================================================
pinescript
// ============================================================================
// STRATEGY DOCUMENTATION
// ============================================================================
//
// STRATEGY LOGIC
// ==============
// Entry Conditions:
// • Long: [Specific conditions for long entry]
// • Short: [Specific conditions for short entry]
//
// Exit Conditions:
// • Take Profit: [TP logic]
// • Stop Loss: [SL logic]
// • Trailing Stop: [If applicable]
//
// RISK MANAGEMENT
// ===============
// • Position Size: [How it's calculated]
// • Maximum Risk: [Risk per trade]
// • Maximum Drawdown: [Expected DD]
//
// BACKTESTING NOTES
// =================
// • Tested Period: [Date range]
// • Best Performance: [Market/Timeframe]
// • Win Rate: [Approximate %]
// • Profit Factor: [Approximate value]
//
// ⚠️ DISCLAIMER
// =============
// Past performance does not guarantee future results. This strategy is
// for educational purposes only. Always conduct your own analysis and
// risk management before trading.
//
// ============================================================================

3. Input Documentation

3. 输入参数文档

pinescript
// ============================================================================
// INPUTS WITH DETAILED DESCRIPTIONS
// ============================================================================

// Calculation Settings
length = input.int(
    defval=20,
    title="Calculation Length",
    minval=1,
    maxval=200,
    group="Main Settings",
    tooltip="The number of bars used in the calculation. Lower values (5-20) " +
            "provide faster signals but more noise. Higher values (50-200) " +
            "provide smoother, more reliable signals but with greater lag."
)

sensitivity = input.float(
    defval=1.5,
    title="Sensitivity",
    minval=0.1,
    maxval=5.0,
    step=0.1,
    group="Main Settings",
    tooltip="Controls signal sensitivity. Lower values (0.5-1.0) generate " +
            "fewer, more conservative signals. Higher values (2.0-5.0) generate " +
            "more frequent signals. Default 1.5 is balanced."
)

// Display Settings
showSignals = input.bool(
    defval=true,
    title="Show Buy/Sell Signals",
    group="Display Options",
    tooltip="Toggle the display of entry/exit signals on the chart"
)

showInfoPanel = input.bool(
    defval=true,
    title="Show Information Panel",
    group="Display Options",
    tooltip="Display a panel with current indicator values and market statistics"
)

colorScheme = input.string(
    defval="Professional",
    title="Color Scheme",
    options=["Professional", "Classic", "Dark", "Colorful"],
    group="Display Options",
    tooltip="Choose color scheme:\n" +
            "• Professional: Blue/Red with transparency\n" +
            "• Classic: Green/Red traditional\n" +
            "• Dark: Optimized for dark mode\n" +
            "• Colorful: High contrast colors"
)
pinescript
// ============================================================================
// INPUTS WITH DETAILED DESCRIPTIONS
// ============================================================================

// Calculation Settings
length = input.int(
    defval=20,
    title="Calculation Length",
    minval=1,
    maxval=200,
    group="Main Settings",
    tooltip="The number of bars used in the calculation. Lower values (5-20) " +
            "provide faster signals but more noise. Higher values (50-200) " +
            "provide smoother, more reliable signals but with greater lag."
)

sensitivity = input.float(
    defval=1.5,
    title="Sensitivity",
    minval=0.1,
    maxval=5.0,
    step=0.1,
    group="Main Settings",
    tooltip="Controls signal sensitivity. Lower values (0.5-1.0) generate " +
            "fewer, more conservative signals. Higher values (2.0-5.0) generate " +
            "more frequent signals. Default 1.5 is balanced."
)

// Display Settings
showSignals = input.bool(
    defval=true,
    title="Show Buy/Sell Signals",
    group="Display Options",
    tooltip="Toggle the display of entry/exit signals on the chart"
)

showInfoPanel = input.bool(
    defval=true,
    title="Show Information Panel",
    group="Display Options",
    tooltip="Display a panel with current indicator values and market statistics"
)

colorScheme = input.string(
    defval="Professional",
    title="Color Scheme",
    options=["Professional", "Classic", "Dark", "Colorful"],
    group="Display Options",
    tooltip="Choose color scheme:\n" +
            "• Professional: Blue/Red with transparency\n" +
            "• Classic: Green/Red traditional\n" +
            "• Dark: Optimized for dark mode\n" +
            "• Colorful: High contrast colors"
)

SEO Optimization

SEO优化

1. Title Optimization

1. 标题优化

pinescript
// Good titles for discoverability:
"RSI Divergence Scanner with Alerts - Multi Timeframe"
"Bollinger Bands Squeeze Detector Pro v2.0"
"Volume Profile with Support/Resistance Levels"
"Smart Money Concepts - Order Blocks & Fair Value Gaps"

// Include relevant keywords:
// - Indicator type (RSI, MACD, Moving Average)
// - Strategy type (Breakout, Trend Following, Mean Reversion)
// - Special features (Multi-TF, Alerts, Scanner)
// - Version number
pinescript
// Good titles for discoverability:
"RSI Divergence Scanner with Alerts - Multi Timeframe"
"Bollinger Bands Squeeze Detector Pro v2.0"
"Volume Profile with Support/Resistance Levels"
"Smart Money Concepts - Order Blocks & Fair Value Gaps"

// Include relevant keywords:
// - Indicator type (RSI, MACD, Moving Average)
// - Strategy type (Breakout, Trend Following, Mean Reversion)
// - Special features (Multi-TF, Alerts, Scanner)
// - Version number

2. Category Tags

2. 分类标签

pinescript
// Relevant categories to include in description:
// Categories: Trend Analysis, Momentum, Volatility, Volume, Support/Resistance
// Tags: #RSI #Divergence #Alerts #MultiTimeframe #Scanner
// Markets: Forex, Crypto, Stocks, Futures, Indices
// Timeframes: Scalping (1m-5m), Intraday (15m-1h), Swing (4h-D), Position (W-M)
pinescript
// Relevant categories to include in description:
// Categories: Trend Analysis, Momentum, Volatility, Volume, Support/Resistance
// Tags: #RSI #Divergence #Alerts #MultiTimeframe #Scanner
// Markets: Forex, Crypto, Stocks, Futures, Indices
// Timeframes: Scalping (1m-5m), Intraday (15m-1h), Swing (4h-D), Position (W-M)

Publishing Checklist

发布检查清单

Pre-Publication Review

发布前审核

  • Code follows Pine Script v6 standards
  • No syntax errors or warnings
  • All functions work as intended
  • No repainting issues (or clearly documented)
  • Performance optimized (loads quickly)
  • 代码遵循Pine Script v6标准
  • 无语法错误或警告
  • 所有功能正常运行
  • 无重绘问题(或已明确记录)
  • 性能已优化(加载迅速)

Documentation Complete

文档完整性

  • Comprehensive description
  • All inputs documented with tooltips
  • Usage instructions clear
  • Example configurations provided
  • Limitations disclosed
  • Version information included
  • 包含全面的描述内容
  • 所有输入参数均有工具提示文档
  • 使用说明清晰明了
  • 提供示例配置
  • 披露了限制条件
  • 包含版本信息

Visual Presentation

视觉呈现

  • Professional color scheme
  • Clean chart appearance
  • Readable text sizes
  • Mobile-friendly display
  • Screenshot examples ready
  • 专业的配色方案
  • 整洁的图表外观
  • 易读的文字大小
  • 适合移动端显示
  • 准备好示例截图

Compliance Check

合规性检查

  • No financial advice
  • No performance guarantees
  • No external promotions
  • No contact information
  • Disclaimer included
  • Attribution for any borrowed code
  • 无金融建议内容
  • 无业绩承诺
  • 无外部推广内容
  • 无联系信息
  • 包含免责声明
  • 对借用的代码进行了归属标注

Metadata Optimized

元数据优化

  • SEO-friendly title
  • Compelling description
  • Relevant categories selected
  • Appropriate tags added
  • Version number included
  • SEO友好的标题
  • 有吸引力的描述
  • 选择了相关分类
  • 添加了合适的标签
  • 包含版本号

Example Publication-Ready Script Header

示例:可直接发布的脚本头部

pinescript
//@version=6
//@description Advanced RSI divergence detector with multi-timeframe analysis and customizable alerts

indicator(title="RSI Divergence Pro - MTF Scanner with Alerts v2.0",
         shorttitle="RSI Div Pro",
         overlay=true,
         max_labels_count=500)

// ╔═══════════════════════════════════════════════════════════════════════╗
// ║                        RSI DIVERGENCE PRO v2.0                         ║
// ║                    Multi-Timeframe Scanner with Alerts                 ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║ Author: TradingView_Username                                           ║
// ║ Version: 2.0                                                           ║
// ║ Release Date: January 15, 2024                                         ║
// ║ Category: Momentum Indicators                                          ║
// ║ License: Mozilla Public License 2.0                                    ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║                            DESCRIPTION                                 ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║ This indicator identifies bullish and bearish RSI divergences across   ║
// ║ multiple timeframes. It features:                                      ║
// ║                                                                         ║
// ║ • Regular and hidden divergence detection                              ║
// ║ • Multi-timeframe confluence analysis                                  ║
// ║ • Customizable alert system                                            ║
// ║ • Visual divergence lines and labels                                   ║
// ║ • Performance statistics table                                         ║
// ║                                                                         ║
// ║ Perfect for: Swing traders, reversal traders, multi-TF analysts        ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║                          HOW TO USE                                    ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║ 1. Add indicator to chart                                              ║
// ║ 2. Configure RSI settings (default: 14)                                ║
// ║ 3. Set divergence sensitivity (1-5)                                    ║
// ║ 4. Enable desired timeframes for scanning                              ║
// ║ 5. Look for divergence signals:                                        ║
// ║    - Green lines/labels: Bullish divergence                            ║
// ║    - Red lines/labels: Bearish divergence                              ║
// ║ 6. Use confluence table for multi-TF confirmation                      ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║                          DISCLAIMER                                    ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║ This indicator is for educational purposes only. Past performance     ║
// ║ does not guarantee future results. Always do your own analysis.       ║
// ╚═══════════════════════════════════════════════════════════════════════╝
A well-published script with proper documentation gets more views, likes, and usage in the TradingView community.
pinescript
//@version=6
//@description Advanced RSI divergence detector with multi-timeframe analysis and customizable alerts

indicator(title="RSI Divergence Pro - MTF Scanner with Alerts v2.0",
         shorttitle="RSI Div Pro",
         overlay=true,
         max_labels_count=500)

// ╔═══════════════════════════════════════════════════════════════════════╗
// ║                        RSI DIVERGENCE PRO v2.0                         ║
// ║                    Multi-Timeframe Scanner with Alerts                 ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║ Author: TradingView_Username                                           ║
// ║ Version: 2.0                                                           ║
// ║ Release Date: January 15, 2024                                         ║
// ║ Category: Momentum Indicators                                          ║
// ║ License: Mozilla Public License 2.0                                    ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║                            DESCRIPTION                                 ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║ This indicator identifies bullish and bearish RSI divergences across   ║
// ║ multiple timeframes. It features:                                      ║
// ║                                                                         ║
// ║ • Regular and hidden divergence detection                              ║
// ║ • Multi-timeframe confluence analysis                                  ║
// ║ • Customizable alert system                                            ║
// ║ • Visual divergence lines and labels                                   ║
// ║ • Performance statistics table                                         ║
// ║                                                                         ║
// ║ Perfect for: Swing traders, reversal traders, multi-TF analysts        ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║                          HOW TO USE                                    ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║ 1. Add indicator to chart                                              ║
// ║ 2. Configure RSI settings (default: 14)                                ║
// ║ 3. Set divergence sensitivity (1-5)                                    ║
// ║ 4. Enable desired timeframes for scanning                              ║
// ║ 5. Look for divergence signals:                                        ║
// ║    - Green lines/labels: Bullish divergence                            ║
// ║    - Red lines/labels: Bearish divergence                              ║
// ║ 6. Use confluence table for multi-TF confirmation                      ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║                          DISCLAIMER                                    ║
// ╠═══════════════════════════════════════════════════════════════════════╣
// ║ This indicator is for educational purposes only. Past performance     ║
// ║ does not guarantee future results. Always do your own analysis.       ║
// ╚═══════════════════════════════════════════════════════════════════════╝
一份具备规范文档的优质发布脚本,在TradingView社区中会获得更多的浏览量、点赞和使用量。