Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

custom-indicator自定义指标

Agent Skill

custom-indicator 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,990

周安装

163

GitHub Stars

8

下载量

1,291
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:custom-indicator(自定义指标)
来源仓库:https://github.com/marketcalls/openalgo-indicator-skills
仓库路径:skills/custom-indicator
安装命令:
npx skills add https://github.com/marketcalls/openalgo-indicator-skills --skill custom-indicator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/marketcalls/openalgo-indicator-skills --skill custom-indicator

简介

custom-indicator 使用 Numba JIT 编译技术创建高性能技术指标。

  • 适用于高频交易或大数据量回测场景下的性能优化。
  • 首次使用前应检查 openalgo.ta 是否已有相似指标存在。
  • 需遵循 numba 优化模式和模板结构以保证执行效率。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Create a custom technical indicator with Numba JIT compilation for production-grade speed.

Arguments

  • $0 = indicator name (e.g., zscore, squeeze, vwap-bands, custom-rsi, mean-reversion). Required.

If no arguments, ask the user what indicator they want to build.

Instructions

  1. Read the indicator-expert rules, especially:

- rules/custom-indicators.md — Numba patterns and templates - rules/numba-optimization.md — Performance best practices - rules/indicator-catalog.md — Check if indicator already exists in openalgo.ta

  1. Check first: If the indicator already exists in openalgo.ta, tell the user and show the existing API
  2. Create custom_indicators/{indicator_name}/ directory (on-demand)
  3. Create {indicator_name}.py with:

File Structure

"""
{Indicator Name} — Custom Indicator
Description: {what it measures}
Category: {trend/momentum/volatility/volume/oscillator}
"""
import numpy as np
from numba import njit
import pandas as pd

# --- Core Computation (Numba JIT) ---
@njit(cache=True, nogil=True)
def _compute_{name}(data: np.ndarray, period: int) -> np.ndarray:
    """Numba-compiled core computation."""
    n = len(data)
    result = np.full(n, np.nan)
    # ... O(n) algorithm ...
    return result

# --- Public API ---
def {name}(data, period=20):
    """
    {Indicator Name}

    Args:
        data: Close prices (numpy array, pandas Series, or list)
        period: Lookback period (default: 20)

    Returns:
        Same type as input with indicator values
    """
    if isinstance(data, pd.Series):
        idx = data.index
        result = _compute_{name}(data.values.astype(np.float64), period)
        return pd.Series(result, index=idx, name="{Name}({period})")
    arr = np.asarray(data, dtype=np.float64)
    return _compute_{name}(arr, period)
  1. Create chart.py for visualization:
"""Chart the custom indicator with Plotly."""
import os
from pathlib import Path
from datetime import datetime, timedelta
from dotenv import find_dotenv, load_dotenv
from openalgo import api, ta
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from {indicator_name} import {name}

# ... fetch data, compute indicator, create chart ...
  1. Create benchmark.py for performance testing:
"""Benchmark the custom indicator."""
import numpy as np
import time
from {indicator_name} import {name}

# Warmup
data = np.random.randn(1000)
_ = {name}(data, 20)

# Benchmark on different sizes
for size in [10_000, 100_000, 500_000]:
    data = np.random.randn(size)
    t0 = time.perf_counter()
    _ = {name}(data, 20)
    elapsed = (time.perf_counter() - t0) * 1000
    print(f"{size:>10,} bars: {elapsed:>8.2f}ms")

Numba Rules (CRITICAL)

MUST DO

  • @njit(cache=True, nogil=True) on all compute functions
  • np.full(n, np.nan) to initialize output arrays
  • Use np.isnan() for NaN checks
  • Explicit for loops (Numba compiles to machine code)
  • O(n) algorithms: rolling sum, EMA recursion, deque-based extrema
  • Float64 for all numeric arrays

MUST NOT

  • Never fastmath=True (breaks np.isnan())
  • Never use pandas inside @njit
  • Never use try/except, dicts, sets, strings inside @njit
  • Never call non-jitted functions from inside @njit

Available Building Blocks

These existing functions can be called inside @njit:

from openalgo.indicators.utils import (
    sma, ema, ema_wilder, stdev, true_range, atr_wilder,
    highest, lowest, rolling_sum, crossover, crossunder
)

Common Custom Indicator Patterns

PatternImplementation
Z-Score(value - rolling_mean) / rolling_stdev
SqueezeBollinger inside Keltner channel
VWAP BandsVWAP + N * rolling stdev of (close - vwap)
Momentum ScoreWeighted sum of RSI + MACD + ADX conditions
Mean ReversionDistance from SMA as % + threshold
Range FilterATR-based dynamic filter on close
Trend StrengthADX + directional movement composite

Example Usage

/custom-indicator zscore /custom-indicator squeeze-momentum /custom-indicator vwap-bands /custom-indicator range-filter

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.32%
按下载量换算482

Claude

31.22%
按下载量换算403

Cursor

19.19%
按下载量换算248

Gemini CLI

9.35%
按下载量换算121

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills