Martingale42/nautilus-dev / skills/nt-signals
nt-signals
UnverifiedUse when working with indicators, signal generation, bar aggregation, custom data types, analysis statistics, or tearsheets in NautilusTrader.
templates/custom_data.py
View on GitHub# -------------------------------------------------------------------------------------------------
# NautilusTrader Custom Data Template
#
# Use @customdataclass to define custom data types for signal pipelines,
# market features, or any structured data flowing through the system.
#
# The decorator auto-generates:
# - to_dict() / from_dict()
# - to_bytes() / from_bytes()
# - to_arrow() / from_arrow()
# - ts_event and ts_init fields (auto-prepended to __init__)
# -------------------------------------------------------------------------------------------------
from nautilus_trader.model.custom import customdataclass
from nautilus_trader.model.identifiers import InstrumentId
@customdataclass
class MySignalData:
"""
TODO: Describe what this data represents.
Fields
------
instrument_id : InstrumentId
The instrument this signal relates to.
signal_value : float
TODO: Describe the signal value.
confidence : float
TODO: Describe the confidence metric.
Notes
-----
- ts_event and ts_init are auto-provided (do NOT define them)
- InstrumentId fields are auto-serialized to/from strings
- All fields need type annotations
"""
instrument_id: InstrumentId
signal_value: float
confidence: float
# TODO: Add additional fields as needed
# Usage:
#
# Creating:
# signal = MySignalData(
# ts_event=self.clock.timestamp_ns(),
# ts_init=self.clock.timestamp_ns(),
# instrument_id=self.instrument_id,
# signal_value=1.5,
# confidence=0.85,
# )
#
# Publishing (from Actor/Strategy):
# self.publish_data(data_type=DataType(MySignalData), data=signal)
#
# Subscribing (in on_start):
# self.subscribe_data(data_type=DataType(MySignalData))
#
# Receiving (in on_data):
# def on_data(self, data):
# if isinstance(data, MySignalData):
# print(data.signal_value)
#
# Serialization (automatic):
# d = signal.to_dict()
# restored = MySignalData.from_dict(d)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |