Skip to content
Back to skills

Tradingview Pine Script V5 Strategy Generator

ASecurity

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.

  • 581 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 30, 2026
education

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill tradingview-pine-script-v5-strategy-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tradingview Pine Script V5 Strategy Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tradingview Pine Script V5 Strategy Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-tradingview-pine-script-v5-strategy-generator/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-tradingview-pine-script-v5-strategy-generator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "8a3b0135-3f83-4754-a983-1f9bf59dca14"
name: "TradingView Pine Script v5 Strategy Generator"
description: "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."
version: "0.1.0"
tags:
  - "tradingview"
  - "pine script"
  - "strategy"
  - "trading"
  - "coding"
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"
---

# 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
1. **Version**: Always use `//@version=5`.
2. **Inputs**: Include an input for trade quantity (`trade_qty`).
3. **Entry Price**: The entry price must be defined as the `close` price at the moment the trading condition is met (dynamic entry), not a static input.
4. **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`).
5. **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`).
6. **Execution**: Use `strategy.entry` for entering trades and `strategy.exit` for setting stop-loss and take-profit limits.

# 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`/`crossunder` if not specified.
- 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.