- Home
- Skills
- Trading & Investing
- bot ema crossover backtester
bot ema crossover backtester
Local EMA crossover backtesting with ATR-based risk management and drawdown kill-switches.
Free
Works with the AI Agents you already use
bot ema crossover backtester
Example session with this skill installed
Run a backtest for ETH/USDT on the 4h timeframe for the last 500 candles with a 5000 initial balance.
- Read your context and instructions
- Compiled the bot ema crossover
- Generated the data export
I have executed the EMA crossover backtest for ETH/USDT on the 4h timeframe. The simulation processed 500 candles with an initial capital of 5000.00.
Backtest Results: ETH/USDT (4h)
| Metric | Value |
|---|---|
| Initial Balance | 5000.00 USDT |
| Final Balance | 5420.50 USDT |
| Total Return | +8.41% |
| Win Rate | 42.5% |
| Max Drawdown | 6.2% |
| Risk-Reward Ratio | 2.15 (Avg) |
| Consecutive Losses | 4 (Threshold: 8) |
| ATR Stop Hits | 12 |
| Status | Strategy Active (Kill-switch not triggered) |
Next steps
- Review the specific entry/exit timestamps in the generated
backtest_logs.csv. - Increase the
--periodto 1000 to test the strategy across different market cycles. - Adjust the
--timeframeto 1h to evaluate if higher frequency trading improves the expectancy.
backtest_logs.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Backtesting trading strategies manually often results in biased results and ignored risk parameters. This skill enables local execution of EMA crossover simulations with built-in risk-management guardrails.
What it does
- EMA Signal Generation calculates fast (9) and slow (21) exponential moving averages to identify trend reversals.
- Risk-Reward Enforcement applies a mandatory 2.0 minimum reward-to-risk ratio floor to every simulated trade.
- ATR-Based Stops uses Average True Range calculations to set precise stop-loss levels based on market volatility.
- Capital Protection monitors peak equity drawdown and halts execution if the 15% threshold is breached.
- Execution Guard implements a kill-switch after 8 consecutive losses to prevent emotional or algorithmic spirals.
How it works
- Initialize the backtest by specifying the asset symbol and timeframe via the CLI.
- Fetch Data from live exchange APIs using CCXT or use local deterministic fallbacks for offline testing.
- Execute Simulation to process historical candle feeds through the crossover logic and risk layers.
- Review Analytics including initial vs. final balance, drawdown percentages, and expectancy metrics.
Frameworks & tools
This skill is built for Python environments. It utilizes CCXT for exchange connectivity and standard quantitative libraries for EMA and ATR calculations.
Why this beats prompting it yourself
Generic prompts often fail to account for complex exit logic like ATR stops or drawdown kill-switches. This skill provides a structured, reusable implementation that ensures risk management is never an afterthought in your trading logic.
Use cases
- Strategy Validation by running 300-period simulations on BTC/USDT or other crypto pairs.
- Risk Stress-Testing to see how a crossover strategy handles high-volatility environments.
- Portfolio Guardrails to determine optimal drawdown limits before deploying live capital.
Known limitations
Requires a Python environment with CCXT installed for live data. Backtests are limited to EMA crossover logic and do not support custom indicator scripts.
Requires Python and CCXT. Limited to 9/21 EMA crossover logic. Maximum 300 candle period by default. 15% drawdown and 8-loss kill-switches are hardcoded.
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
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account