pine-publisher について
pine-publisher は、TradingViewのコミュニティライブラリ向けにPine Scriptを整えるスキルです。ルール確認、ドキュメントやメタデータの作成、公開前のチェックを支援します。
主な機能
- 01TradingView House Rulesの確認
- 02スクリプト説明と使用手順の作成
- 03入力項目とパラメーターの記録
- 04タイトル・タグ・カテゴリの整理
- 05コード整形と公開チェックリスト
活用シーン
- 01インジケーターをコミュニティ公開用に準備
- 02ストラテジーのロジックと入力項目を文書化
- 03House Rulesの要件に照らしてスクリプトを確認
- 04タグとバージョン情報を整理
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ traderspost/ pinescript-agents --skill pine-publisherインストール後、Claude Code で/pine-publisherを入力して読み込まれたか確認します。
詳細
Pine Script パブリッシャー
TradingView のコミュニティライブラリで公開するスクリプトの準備に特化しています。
主な役割
公開ルールへの準拠
- ハウスルールへの準拠を確認します
- 必要なドキュメントを追加します
- 適切なクレジット表記を含めます
- 禁止されているコンテンツを削除します
ドキュメントの作成
- 詳細な説明を作成します
- 使用方法を作成します
- すべてのパラメーターを説明します
- 設定例を追加します
メタデータの最適化
- SEO に適したタイトルを作成します
- 関連するタグやカテゴリーを追加します
- 魅力的な説明を作成します
- バージョン情報を含めます
プロフェッショナルな見せ方
- コードの書式を整えます
- 命名規則を統一します
- プロフェッショナルなコメントを付けます
- サンプルスクリーンショットを用意します
Pine Script v6 の 2025 年公開要件
重要:最新の構文を使用する
公開するスクリプトには、ユーザーエクスペリエンスを高めるため、2025 年の機能を使用してください。
1. 入力の active パラメーター(2025 年 7 月)
// ✅ Professional: Conditional input visibility
showAdvanced = input.bool(false, "Advanced Mode", group="Settings")
advSetting = input.int(10, "Advanced Setting",
group="Settings",
active=showAdvanced, // Grayed out when disabled
tooltip="Only available in Advanced Mode")
2. プロットの線のスタイル(2025 年 9 月)
// ✅ Professional: Visual hierarchy with line styles
plot(mainMA, "Main MA", color.blue, linestyle=plot.linestyle_solid)
plot(signalLine, "Signal", color.yellow, linestyle=plot.linestyle_dashed)
plot(target, "Target", color.green, linestyle=plot.linestyle_dotted)
3. コレクションには for...in を使用(2025 年 3 月)
// ✅ BEST: Use for...in (safe, clean, prevents freezing)
for element in myArray
// Process element directly
// ✅ With index when needed
for [index, element] in myArray
// Have both index and value
// ⚠️ FALLBACK: If traditional for needed, cache boundary
arrSize = array.size(myArray)
for i = 0 to arrSize - 1
// Process...
2025 年版 公開機能チェックリスト
- 条件付き入力に
activeパラメーターを使用している - 視覚的な区別に
linestyleを使用している - ループで
for...in(推奨)またはキャッシュ済みの境界値を使用している - 三項演算子を 1 行に記述している(構文エラーなし)
- 文字列の長さが 40,960 文字の制限内である
TradingView ハウスルールへの準拠
必須要素
インジケーターの場合:
// built with PineScript Agents by TradersPost
//@version=6
//@description Comprehensive description of what the indicator does
indicator(title="Professional Indicator Name - Clear Description v1.0",
shorttitle="PRO IND",
overlay=true)
ストラテジーの場合(重要:アラート注釈を含める):
// built with PineScript Agents by TradersPost
//@version=6
//@description Comprehensive description of what the strategy does
strategy(title="Professional Strategy Name - Clear Description v1.0",
shorttitle="PRO STRAT",
overlay=true)
//@strategy_alert_message {{strategy.order.alert_message}}
// ============================================================================
// 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]
//
// ============================================================================
禁止されているコンテンツ
- 金融に関する助言を含めないでください
- 利益を保証しないでください
- 外部リンクを含めないでください(ドキュメントを除く)
- コードに連絡先情報を含めないでください
- 難読化または圧縮されたコードを含めないでください
- 寄付やチップを求めないでください
- 悪意のあるコードを含めないでください
ドキュメントのテンプレート
重要:スクリプトの説明を記述する場所
Pine Script の説明は、.pine ファイルの先頭で、バージョン宣言の直後、インジケーターまたはストラテジーの宣言の前にコメントとして記述してください。
1. インジケーターのドキュメント(.pine ファイルの先頭に配置)
//@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
// ============================================================================
//
// 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. 入力のドキュメント
// ============================================================================
// 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 の最適化
1. タイトルの最適化
// 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. カテゴリータグ
// 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)
公開チェックリスト
公開前の確認
- コードが Pine Script v6 の標準に準拠している
- ストラテジーに
//@strategy_alert_message {{strategy.order.alert_message}}が含まれている(strategy()呼び出しの後) - 構文エラーや警告がない
- すべての関数が意図どおりに動作する
- リペイントの問題がない(または明確に説明されている)
- パフォーマンスが最適化されている(すばやく読み込める)
ドキュメントの完成度
- 詳細な説明がある
- すべての入力がツールチップ付きで説明されている
- 使用方法が明確である
- 設定例が提示されている
- 制限事項が開示されている
- バージョン情報が含まれている
見た目の仕上がり
- プロフェッショナルな配色である
- チャートが見やすく整っている
- テキストサイズが読みやすい
- モバイルで見やすい表示である
- スクリーンショットの例が用意されている
準拠状況の確認
- 金融に関する助言がない
- パフォーマンスの保証がない
- 外部への宣伝がない
- 連絡先情報がない
- 免責事項が含まれている
- 引用したコードにクレジット表記がある
メタデータの最適化
- SEO に適したタイトルである
- 魅力的な説明がある
- 関連するカテゴリーが選択されている
- 適切なタグが追加されている
- バージョン番号が含まれている
公開準備が整ったスクリプトのヘッダー例
//@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 コミュニティでより多くの閲覧数、いいね、利用を獲得できます。
コメント
Markdown 対応