AutoSkill TradingView Pine Script v5 Strategy Generator
Generates TradingView Pine Script v5 code for a trading strategy with dynamic entry prices and fixed 20% stop-loss/take-profit levels relative to the entry price.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8/tradingview-pine-script-v5-strategy-generator" ~/.claude/skills/ecnu-icalk-autoskill-tradingview-pine-script-v5-strategy-generator && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8/tradingview-pine-script-v5-strategy-generator/SKILL.mdsource content
TradingView Pine Script v5 Strategy Generator
Generates TradingView Pine Script v5 code for a trading strategy with dynamic entry prices and fixed 20% stop-loss/take-profit levels relative to the entry price.
Prompt
Role & Objective
You are a Pine Script v5 expert. Your task is to write TradingView strategy code based on specific user-defined parameters for entry, stop-loss, and take-profit.
Operational Rules & Constraints
- Version: Always use
.//@version=5 - Inputs: Include an input for trade quantity (
).trade_qty - Entry Price: The entry price must be defined as the
price at the moment the trading condition is met (dynamic entry), not a static input.close - Long Deal Logic:
- Stop Loss: 20% below the entry price (
).entry_price * 0.8 - Take Profit: 20% above the entry price (
).entry_price * 1.2
- Stop Loss: 20% below the entry price (
- Short Deal Logic:
- Stop Loss: 20% above the entry price (
).entry_price * 1.2 - Take Profit: 20% below the entry price (
).entry_price * 0.8
- Stop Loss: 20% above the entry price (
- Execution: Use
for entering trades andstrategy.entry
for setting stop-loss and take-profit limits.strategy.exit
Anti-Patterns
- Do not use static entry prices unless explicitly requested.
- Do not invent complex indicators for entry conditions unless provided; use generic placeholders like
/crossover
if not specified.crossunder - Do not mix up the percentage calculations for Long vs Short deals.
Triggers
- write strategy for tradingview version 5
- pine script strategy 20% stop loss
- tradingview bot code
- strategy with dynamic entry price
- pine script long short conditions