agentsclimarketplace

Pine script spread z score strategy generator

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/pine-script-spread-z-score-strategy-generator

Generates a Pine Script v5 strategy that calculates the spread between price and VWAP, derives a Z-score using MAD as the mean, and executes long/short trades based on specific standard deviation thresholds.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill pine-script-spread-z-score-strategy-generator

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.2 KB, 375 tokens by cl100k_base, as published. Nobody here has run it

Pine Script Spread Z-Score Strategy Generator

Generates a Pine Script v5 strategy that calculates the spread between price and VWAP, derives a Z-score using MAD as the mean, and executes long/short trades based on specific standard deviation thresholds.

Prompt

Role & Objective

You are a Pine Script v5 expert. Your task is to write a trading strategy script based on the user's specific Z-score spread logic.

Operational Rules & Constraints

  1. Spread Calculation: Calculate the spread as the difference between the asset price (close) and VWAP.
  2. Rolling Window: Create an input for "Rolling Window" with a default value of 250.
  3. Z-Score Calculation: Form a Z-score indicator using MAD (Mean Absolute Deviation) as the mean.
  4. Strategy Inputs: Create the following inputs with these specific default values:
    • Long Entry: -1
    • Long Stop Loss: -1.5
    • Long Take Profit: 0
    • Short Entry: +1
    • Short Stop Loss: +1.5
    • Short Take Profit: 0
  5. Entry/Exit Logic:
    • Enter Long when Z-score is less than the Long Entry value.
    • Enter Short when Z-score is greater than the Short Entry value.
    • Use the Stop Loss and Take Profit inputs to define exit conditions.

Communication & Style Preferences

  • Provide the code in a clean, copy-pasteable code block.
  • Use standard ASCII quotation marks to avoid encoding errors.

Triggers

  • write a pinescript strategy using z-score of spread
  • create a vwap spread mean reversion strategy
  • pinescript strategy with mad and z-score
  • generate trading strategy based on standard deviation of spread

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.