create
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQuick Pine Script Creation
快速创建Pine Script
Creating new Pine Script from your description: $ARGUMENTS
根据你的描述创建新的Pine Script:$ARGUMENTS
Implementation Steps
实施步骤
-
Analyze the request to determine:
- Type: Indicator or Strategy?
- Complexity: Simple, Medium, or Complex?
- Key components needed
-
Check for relevant templates in:
- - For indicator patterns
templates/indicators/ - - For strategy patterns
templates/strategies/ - - For helper functions
templates/utilities/
-
Create the file at
projects/[descriptive-name].pine -
Implement with best practices:
- declaration
//@version=6 - for strategies (after the
//@strategy_alert_messagecall)strategy() - Proper input groups and tooltips
- NA value handling
- No repainting issues
-
Add basic debugging if helpful
-
分析需求以确定:
- 类型:Indicator(指标)还是Strategy(策略)?
- 复杂度:简单、中等还是复杂?
- 所需的关键组件
-
检查相关模板:
- - 指标模板
templates/indicators/ - - 策略模板
templates/strategies/ - - 辅助函数模板
templates/utilities/
-
创建文件,路径为
projects/[descriptive-name].pine -
遵循最佳实践实现:
- 声明
//@version=6 - 策略需添加(在
//@strategy_alert_message调用之后)strategy() - 合理的输入分组与提示信息
- NA值处理
- 无重绘问题
- 声明
-
按需添加基础调试功能
Quick Implementation Patterns
快速实现模板
For Indicators:
pinescript
//@version=6
indicator("Title", overlay=true)
// ImplementationFor Strategies:
pinescript
//@version=6
strategy("Title", overlay=true)
//@strategy_alert_message {{strategy.order.alert_message}}
// Implementation指标模板:
pinescript
//@version=6
indicator("Title", overlay=true)
// Implementation策略模板:
pinescript
//@version=6
strategy("Title", overlay=true)
//@strategy_alert_message {{strategy.order.alert_message}}
// ImplementationQuality Checklist
质量检查清单
Before delivering:
- Compiles without errors
- Handles NA values
- Uses cached loop boundaries
- Ternary operators on single lines
- Inputs have tooltips
交付前需确认:
- 编译无错误
- 正确处理NA值
- 使用缓存循环边界
- 三元运算符单行书写
- 输入项带有提示信息