templates

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pine Script Templates

Pine Script 模板

Browse available templates for quick project starts.
浏览可用模板以快速启动项目。

Instructions

使用说明

When this skill is invoked:
  1. List all templates from the
    templates/
    directory
  2. Organize by category:
    • templates/indicators/
      - Indicator patterns
    • templates/strategies/
      - Strategy patterns
    • templates/utilities/
      - Helper functions
  3. Show template details:
    • Name and purpose
    • Key features included
    • Customization points
调用此技能时:
  1. 列出所有模板:从
    templates/
    目录中列出所有模板
  2. 按类别整理
    • templates/indicators/
      - 指标模式
    • templates/strategies/
      - 策略模式
    • templates/utilities/
      - 辅助函数
  3. 展示模板详情
    • 名称与用途
    • 包含的关键特性
    • 可自定义点

Template Categories

模板类别

Indicators

指标类

  • Momentum (RSI, MACD variations)
  • Trend (Moving averages, channels)
  • Volatility (ATR-based, Bollinger)
  • Volume (Volume profiles, OBV)
  • 动量类(RSI、MACD变体)
  • 趋势类(移动平均线、通道)
  • 波动率类(基于ATR的指标、布林带)
  • 成交量类(成交量分布、OBV)

Strategies

策略类

  • Trend Following (MA crossover, breakout)
  • Mean Reversion (Bollinger, RSI extremes)
  • Momentum (MACD, RSI strategies)
  • 趋势跟踪(均线交叉、突破)
  • 均值回归(布林带、RSI极值)
  • 动量策略(MACD、RSI策略)

Utilities

工具类

  • Debug panels
  • Risk management helpers
  • Session filters
  • Alert builders
  • 调试面板
  • 风险管理辅助工具
  • 时段过滤器
  • 警报构建器

Using a Template

使用模板

When user selects a template:
  1. Copy to projects/:
    • Rename to descriptive project name
    • E.g.,
      templates/indicators/rsi-divergence.pine
      projects/my-rsi-scanner.pine
  2. Explain customization points:
    • Which inputs to adjust
    • Where to add custom logic
    • How to modify visuals
  3. Help customize based on user needs
当用户选择一个模板时:
  1. 复制到projects/目录
    • 重命名为描述性项目名称
    • 示例:
      templates/indicators/rsi-divergence.pine
      projects/my-rsi-scanner.pine
  2. 说明自定义点
    • 哪些输入参数可调整
    • 何处添加自定义逻辑
    • 如何修改可视化效果
  3. 根据用户需求协助自定义

Quick Start

快速入门

Suggest popular templates based on common requests:
  • "RSI indicator" →
    templates/indicators/rsi-momentum.pine
  • "Moving average strategy" →
    templates/strategies/ema-cross.pine
  • "Volume analysis" →
    templates/indicators/volume-profile.pine
根据常见需求推荐热门模板:
  • "RSI指标" →
    templates/indicators/rsi-momentum.pine
  • "移动平均线策略" →
    templates/strategies/ema-cross.pine
  • "成交量分析" →
    templates/indicators/volume-profile.pine