- Home
- Skills
- Trading & Investing
- Trading Bot Script Architect
Works with the AI Agents you already use
Trading Bot Script Architect
Designs, writes, audits, debugs, and improves rule-based trading bot scripts for indicators, strategies, alerts, backtests, paper trading, webhooks, and authorized execution workflows.
$5
Trading Bot Script Architect
Example session with this skill installed
Platform
TradingView Pine Script
Asset class
Cryptocurrency
Symbol or market
BTCUSDT
Timeframe
15 minutes
Strategy type
Trend and momentum strategy
Long, short, or both:
Both
Entry rules
Long when EMA 20 crosses above EMA 50 and RSI is above 55.
Short when EMA 20 crosses below EMA 50 and RSI is below 45.
Signals must be confirmed at bar close.
Exit rules
Exit at stop loss or take profit.
Close the position if an opposite confirmed signal appears.
Do not reverse immediately unless the current position has been closed first.
Stop-loss rule
1.5 times ATR from the entry reference price
Take-profit rule
2:1 reward-to-risk ratio based on the initial stop distance
Position sizing
Percent equity risk
Maximum risk per trade
1% of strategy equity
Maximum daily loss
3%
Maximum open positions
1
Pyramiding
Not allowed
Reversal behavior
Close the current position first, then allow a new opposite entry on a later confirmed signal
Session and timezone
Configurable session input
Default timezone should follow the exchange timezone
Indicator parameters
EMA fast length: 20
EMA slow length: 50
RSI length: 14
ATR length: 14
ATR multiplier: 1.5
Multi-timeframe inputs
Optional higher-timeframe EMA 200 filter
Use only confirmed higher-timeframe values
Order type
Market simulation in the TradingView strategy tester
Commission assumption
0.1% per order
Slippage assumption
User-configurable input
Spread assumption
Not directly modeled unless approximated through slippage
Alert or webhook requirements
Create alert conditions for long entry, short entry, long exit, and short exit.
Include symbol, timeframe, action, reference price, stop loss, take profit, timestamp, and signal reason.
Do not include credentials.
Backtest date range
User-configurable start and end date
Need output
Complete Pine Script strategy, configuration guide, backtest notes, non-repainting notes, alert payload examples, test cases, and paper-trading checklist
Special constraints
No repainting
Bar-close confirmation only
No future data
No lookahead
No pyramiding
Clear comments
Safe defaults
Do not guarantee profitability
- Read your context and instructions
- Compiled the trading bot script
=== TRADING BOT SCRIPT SPECIFICATION ===
Platform
TradingView Pine Script
Strategy Name
EMA Trend and RSI Momentum Bot
Market
BTCUSDT
Timeframe
15 minutes
Direction
Long and short
Execution Timing
Confirmed bar close only
Pyramiding
Disabled
Maximum Open Positions
One
=== STRATEGY LOGIC ===
Long Entry
- EMA 20 crosses above EMA 50.
- RSI is greater than 55.
- The configured trading session is active.
- The optional higher-timeframe filter is satisfied.
- The signal is confirmed at bar close.
- No position is currently open.
- The maximum daily loss guard has not been triggered.
Short Entry
- EMA 20 crosses below EMA 50.
- RSI is less than 45.
- The configured trading session is active.
- The optional higher-timeframe filter is satisfied.
- The signal is confirmed at bar close.
- No position is currently open.
- The maximum daily loss guard has not been triggered.
Long Stop Loss
Entry reference price minus 1.5 times ATR.
Long Take Profit
Entry reference price plus two times the initial stop distance.
Short Stop Loss
Entry reference price plus 1.5 times ATR.
Short Take Profit
Entry reference price minus two times the initial stop distance.
Opposite Signal Behavior
Close the current position first. Do not reverse on the same signal event. A new opposite entry may occur only on a later confirmed signal.
=== RISK MANAGEMENT ===
Risk Per Trade
1% of strategy equity
Maximum Daily Loss
3%
Maximum Open Positions
One
Invalid Trade Guard
Reject the trade if ATR, stop distance, or calculated quantity is zero, negative, or unavailable.
Pyramiding
Not allowed
Daily Guard Behavior
Stop submitting new entries after the daily loss threshold is reached.
=== NON-REPAINTING RULES ===
- Evaluate signals only on confirmed bars.
- Do not use future-looking pivots.
- Do not use lookahead.
- Use only confirmed higher-timeframe values.
- Do not generate entries from incomplete higher-timeframe candles.
- Trigger alerts only on new signal transitions.
- Keep historical and real-time signal logic consistent.
=== SCRIPT ARCHITECTURE ===
- Strategy declaration
- Grouped user inputs
- Session and date filters
- EMA, RSI, and ATR calculations
- Optional higher-timeframe filter
- Confirmed long and short signals
- Risk and quantity calculations
- Entry logic
- Stop and target management
- Daily loss guard
- Alert conditions
- Visual plots and diagnostics
=== ALERT PAYLOAD EXAMPLE ===
{
"event_id": "EMA_RSI_BTCUSDT_15M_LONG_{{time}}",
"strategy_id": "EMA_RSI_TREND_BOT",
"symbol": "{{ticker}}",
"timeframe": "{{interval}}",
"action": "buy",
"order_type": "market",
"reference_price": "{{close}}",
"stop_loss": "calculated_long_stop",
"take_profit": "calculated_long_target",
"timestamp": "{{time}}",
"bar_confirmed": true,
"reason": "EMA20 crossed above EMA50 and RSI exceeded 55"
}
Security Note
Do not include API keys, exchange secrets, passwords, seed phrases, or unrestricted credentials in the webhook payload.
=== TEST CASES ===
Test 1 — Valid Long Signal:
EMA 20 crosses above EMA 50, RSI is above 55, session is active, and no position is open.
Expected result: One long entry.
Test 2 — Repeated Long Condition:
The long condition remains true for multiple bars.
Expected result: No duplicate entries.
Test 3 — Invalid Session:
A valid crossover occurs outside the configured session.
Expected result: No entry.
Test 4 — Invalid Stop Distance:
ATR is unavailable or zero.
Expected result: Trade rejected.
Test 5 — Opposite Signal While Long:
A confirmed short signal appears while a long position is open.
Expected result: Close the long position. Do not open a short position during the same event.
Test 6 — Daily Loss Limit:
The daily loss threshold is reached.
Expected result: No new entries until the daily guard resets.
Test 7 — Higher-Timeframe Filter:
The higher-timeframe EMA condition is not satisfied.
Expected result: Entry blocked.
Test 8 — Real-Time Bar:
The current bar has not closed.
Expected result: No confirmed signal or alert.
=== BACKTEST GUIDANCE ===
- Use realistic commission.
- Add a conservative slippage assumption.
- Test multiple date ranges.
- Test bullish, bearish, and sideways regimes.
- Compare results across more than one symbol.
- Test parameter stability rather than one optimized setting.
- Use an out-of-sample period.
- Review trade count and maximum drawdown.
- Compare long and short performance separately.
- Do not interpret historical performance as a guarantee.
=== PAPER-TRADING CHECKLIST ===
- Confirm the script compiles.
- Confirm all inputs work.
- Confirm session filtering.
- Confirm date filtering.
- Confirm plotted stops and targets.
- Confirm quantity calculations.
- Confirm no duplicate entries.
- Confirm no duplicate alerts.
- Compare alerts with chart signals.
- Test webhook payload formatting.
- Validate timestamp freshness.
- Validate symbol and action fields.
- Run in paper trading before any live consideration.
- Record discrepancies between historical and live behavior.
=== KNOWN LIMITATIONS ===
- TradingView strategy fills are simulated.
- Real broker fills may differ.
- Spread is not directly modeled unless approximated.
- Slippage may vary substantially.
- Percent-risk sizing may require broker-specific adjustment.
- Higher-timeframe confirmation introduces delay.
- Market conditions can change.
- Historical performance does not guarantee future results.
=== FINANCIAL RISK NOTICE ===
This script is for research, education, backtesting, and authorized automation. It does not guarantee profitability. Test with realistic costs, out-of-sample data, replay, and paper trading before considering live deployment.
Connects securely to your tools. The creator never sees your data.
About this skill
Trading Bot Script Architect helps traders, strategy developers, TradingView users, MetaTrader users, Python developers, funded-account traders, educators, agencies, and technical teams turn trading ideas into explicit, testable, maintainable, and risk-controlled scripts.
The skill creates TradingView indicators and strategies, Pine Script alerts, MQL4 and MQL5 Expert Advisor specifications, Python strategy modules, backtesting logic, signal engines, webhook schemas, position-sizing systems, stop-loss and take-profit modules, trailing stops, breakeven rules, partial exits, time-based exits, session filters, volatility filters, trend filters, multi-timeframe systems, maximum-loss controls, strategy dashboards, code audits, debugging reports, repainting audits, and backtest-integrity reviews.
It is designed for users who need more than a basic code generator. The agent formalizes strategy rules before coding, separates signal logic from execution and risk logic, defines bar timing, prevents duplicate entries and alerts, documents pyramiding and reversal behavior, and makes all assumptions visible.
The skill supports rule-based trend, breakout, momentum, mean-reversion, market-structure, intraday, swing, scalping, volatility, and session-based systems. It can also convert indicators into strategies, convert strategies into indicators, create webhook payloads, review historical versus live behavior, and produce paper-trading test plans.
It emphasizes non-repainting logic, lookahead-bias prevention, realistic commission and slippage assumptions, bounded position sizing, symbol-specific constraints, code readability, credential safety, out-of-sample testing, and transparent limitations.
The agent does not guarantee profitability. Its purpose is to help users create safer, clearer, more testable, and more professionally structured trading scripts.
This skill creates trading code, strategy specifications, audits, debugging guidance, risk modules, webhook structures, and testing plans. It does not guarantee profitability, win rate, funded-account approval, broker execution, exchange execution, low drawdown, regulatory compliance, or production readiness.
Generated code must be compiled, reviewed, backtested with realistic costs, tested out of sample, validated in replay or simulation, and paper traded before any live consideration.
Broker-specific sizing, margin rules, tick value, pip value, stop-level constraints, minimum quantity, lot step, contract value, order behavior, and API requirements may require platform-specific verification.
Historical performance may differ substantially from live performance because of slippage, spread, latency, liquidity, data quality, order-fill assumptions, market regime changes, and execution differences.
The skill should not be used to embed API keys, exchange secrets, seed phrases, passwords, or unrestricted account credentials inside shared source code.
The skill does not replace qualified financial, legal, tax, compliance, cybersecurity, quantitative research, or software-engineering review.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 months ago
Permissions
File Scopes
This skill uses file access to read user-provided trading strategy notes, Pine Script files, MQL4 and MQL5 files, Python strategy code, indicator specifications, entry and exit rules, risk-management requirements, position-sizing requirements, backtest reports, trade logs, compiler errors, runtime errors, alert payloads, webhook schemas, broker documentation, exchange documentation, market data samples, configuration files, parameter files, test cases, research notes, performance metric exports, paper-trading results, and code audit notes. It uses write access to create structured Markdown, text, JSON, Pine Script, MQL4, MQL5, and Python outputs such as trading indicators, strategies, Expert Advisor specifications, signal engines, backtesting modules, risk-management modules, position-sizing logic, stop-loss systems, take-profit systems, trailing-stop logic, breakeven rules, partial-exit systems, session filters, volatility filters, alert payloads, webhook schemas, debugging reports, repainting audits, backtest-integrity reports, paper-trading plans, test cases, configuration guides, deployment checklists, and SKILL.md files. Browser access is useful when the host environment allows public platform documentation review, public broker rule checking, public exchange specification review, public library documentation review, public syntax verification, or public market-structure research. Network access may be useful only in approved workflows where the agent is allowed to access public pages or authorized systems. Terminal or local code execution may be useful for compiling, linting, testing, validating, or simulating code in an approved environment. It should not be used to place live trades unless the user has explicitly configured a separate authorized execution environment with appropriate controls. The default safe setup does not require unrestricted broker access, unrestricted exchange access, live-trading permission, withdrawal permission, private keys, seed phrases, passwords, production credentials, payment access, database administration, or unrestricted API access. The skill is intended for research, education, backtesting, simulation, paper trading, code review, and authorized automation. It does not guarantee profitability, win rate, funded-account approval, execution quality, low drawdown, regulatory compliance, or production readiness.