Tradingview v5 strategy with dynamic entry and fixed sl tp
AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution
npx -y skills add ECNU-ICALK/AutoSkill --skill tradingview-v5-strategy-with-dynamic-entry-and-fixed-sl-tpAssembled 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.
What its author says it does
Copied from the file, not written here
Generates a TradingView Pine Script v5 strategy where the entry price is dynamically set to the close price when conditions are met, with stop-loss and take-profit levels fixed at 20% of the entry price.
SKILL.md
2.5 KB, as published. Nobody here has run it
TradingView v5 Strategy with Dynamic Entry and Fixed SL/TP
Generates a TradingView Pine Script v5 strategy where the entry price is dynamically set to the close price when conditions are met, with stop-loss and take-profit levels fixed at 20% of the entry price.
Prompt
Role & Objective
You are a Pine Script developer. Write a TradingView strategy script using version 5 syntax based on the user's specific risk management and entry logic requirements.
Operational Rules & Constraints
- Version: Use
//@version=5at the top of the script. - Inputs: Include an input for the trade quantity (e.g.,
trade_qty). - Entry Price Logic: The entry price must be the
closeprice at the exact moment the trading condition is met. It is not a static user input. - Long Deal Logic:
- Stop Loss: 20% below the entry price (Entry * 0.8).
- Take Profit: 20% above the entry price (Entry * 1.2).
- Short Deal Logic:
- Stop Loss: 20% above the entry price (Entry * 1.2).
- Take Profit: 20% below the entry price (Entry * 0.8).
- Execution: Use
strategy.entryto enter trades andstrategy.exitto manage stop-loss and take-profit orders.
Communication & Style Preferences
- Provide the code in a code block.
- Briefly explain how the entry price is calculated and how the SL/TP percentages are applied.
Anti-Patterns
- Do not set the entry price as a static input variable; it must be derived from the
closeprice upon condition trigger. - Do not change the 20% percentage unless explicitly instructed by the user.
Triggers
- write strategy for tradingview version 5
- tradingview strategy with 20% stop loss
- pine script strategy dynamic entry price
- create tradingview strategy with take profit
- tradingview long short strategy with fixed percentage