Best Trading Bot Strategies: What Works and What Fails
Best trading bot strategies

The best trading bot strategies are custom built automations of existing trading methods, not purchased magic systems, and they require continuous human oversight to adapt to changing market conditions.
Effective strategies often use regime filters to avoid trading in unfavorable conditions, such as skipping trades when SPY is below its 50 day simple moving average, and some bots are designed to trade only during specific market phases like uptrends for bullish assets.
A simple breakout approach based on previous day high and low levels combined with 50 and 200 EMA crosses can work well, but thorough backtesting is essential to distinguish a genuine market edge from curve fit noise that fails in live trading.
Key strategy elements
- Automate existing strategies Bots automate methods you already use, they do not invent new money making systems.
- Add regime filters Stop the bot from trading when indicators like SPY below SMA50 signal unfavorable conditions.
- Trade specific conditions only Some bots trade gold exclusively in longs during uptrends rather than in all conditions.
- Use breakout and EMA logic Previous day high low breakout combined with 50 EMA crossing 200 EMA is a simple effective script.
- Avoid overtrading Small unnecessary trades compound fees and slippage into negative expectancy.
- Backtest robustly Test across various conditions and timeframes to avoid curve fitting historical data.

General Principles for Trading Bots
Common Strategy Elements
Challenges and Considerations
Are you looking for strategies for a specific market or asset type?
Bottom line
Users discussions indicate that successful trading bot strategies are highly customized, continuously monitored, and often developed by individuals with deep market understanding or programming skills.
Community answers 26
What others in the community said:
After months of backtesting and refining my logic, I’ve finally managed to fully automate my day trading strategy. It’s been a long journey of trial and error, but seeing the bot execute trades exactly as planned is incredibly satisfying. In this video, you can see how it identifies the setup, manages the risk, and hits the TP without any emotional interference.
Not selling anything in this post just sharing what I built. Happy to answer questions.
I had no coding background and no trading experience. I spent a weekend using Claude AI as my coding assistant and built PIP-9 a fully automated forex trading bot that:
- Trades 7 currency pairs including Gold automatically
- Runs 5 trading strategies simultaneously
- Sets stop loss and take profit on every trade
- Only trades during London/NY sessions for best results
- Emails me every time a trade opens, closes, wins or loses
The bot is connected to a free OANDA demo account with $100,000 virtual money so I could test it risk-free first.
I documented the entire process step by step. Happy to answer any questions about how it works.
UPDATE:
The app has a bug where it does not show the progress of the last 3 months, but only shows the progress of the last day. I am working on a polymarket update that does much more than the current stack.
This is not tool for sale. Making it clear. There is nothing to be sold here, so stop calling it a scam. Its just progress of personal work, portfolio.
......
3 months of operation
Been working on this bot for 3 months now. Actually trades crypto and analyzes bets with proper chances straight from polymarket.
- Extremely cheap, less than 10cents per day
- Very sophisticated (6-7/10 wins per day)
- Runs on mobile and browser
- Runs 24/7
At the moment i am showing only specific parts of the bot -there are more screens that reveal more details and strategies running in the background, but i am not going to show those.
This is not a for sale product, its only for personal use and will always be.
Just wanted to share this as i am sure more people are willing to build one. My point is..dont listen to negativity, try, test, rework and it might work.
Thats all.
They worth it when they work and not worth it when you only wish for them to work.
Project Overview
- Data source: CoinGecko’s free API.
- Messaging: Discord Webhook (no bot token required).
- Signal: RSI(14) on 1-minute closes. Alert when RSI < 30.
We’ll go from blank to working in four short phases.
Phase 1 — Infrastructure Setup Option A: Replit (fastest)- Go to Replit → create a new Python repl.
- In the left sidebar, open Secrets (lock icon) and add:
DISCORD_WEBHOOK_URL→ your Discord webhook URL (from the step below).COINGECKO_API_KEY→ your CoinGecko API Demo key.
- You’ll paste the code (later in this post) into
main.pyand press Run.
- Open a new notebook (for example with
colab.new). - Add a cell at the top for your secrets (replace placeholders):
import os
os.environ["DISCORD_WEBHOOK_URL"] = "
os.environ["COINGECKO_API_KEY"] = "YOUR_DEMO_KEY"
- You’ll put the main script in a second cell and run it from there.
In any Discord server where you have permission:
- Go to Server Settings → Integrations → Webhooks → New Webhook.
- Choose the channel to send messages to.
- Click Copy Webhook URL.
That URL is the “address” the bot will send alerts to. Treat it like a password — don’t share it publicly.
Get a free CoinGecko API key- Sign up for a free CoinGecko account.
- Create a Demo API key.
- You’ll get a key you pass via the header
x-cg-demo-api-key.
We’ll call CoinGecko about once per minute, which is comfortably within free-tier limits.
Phase 2 — Feeding the Machine (live price)We’ll fetch the latest BTC price in USD using CoinGecko’s Simple Price endpoint.
At a high level, our script will:
- Call the API every minute.
- Read
bitcoinprice inusd. - Also grab a timestamp so we can show it in the Discord message.
You don’t need to know the full API docs by heart; the script below handles the details.
Phase 3 — Programming the Logic (RSI trigger) What is RSI?Very short version:
- RSI = Relative Strength Index, a momentum indicator that moves between 0 and 100.
- It’s usually calculated over 14 periods (we’ll use 14 minutes).
- Common rule of thumb:
- RSI < 30 → “oversold” (price has fallen quickly).
- RSI > 70 → “overbought” (price has risen quickly).
We’ll implement RSI using Wilder’s original smoothing method so your numbers are close to what you see on charting platforms.
Our trigger logic:
We’ll also send a “condition cleared” message when RSI moves back above 30.
Phase 4 — Launching Your BotPaste the script below into your environment (Replit main.py, or a Colab cell) and run it.
import os
import time
import math
import json
import logging
from datetime import datetime, timezone
from collections import deque
import requests
# ----------------------------
# Configuration (env-first)
# ----------------------------
DISCORD_WEBHOOK_URL = os.getenv("DISCORD_WEBHOOK_URL")
CG_API_KEY = os.getenv("COINGECKO_API_KEY") # CoinGecko Demo key
COIN_ID = "bitcoin"
FIAT = "usd"
RSI_PERIOD = 14
RSI_ALERT_LEVEL = 30.0
CHECK_EVERY_SECONDS = 60 # 1/min keeps us under free API limits
if not DISCORD_WEBHOOK_URL:
raise SystemExit("Missing DISCORD_WEBHOOK_URL environment variable.")
if not CG_API_KEY:
raise SystemExit("Missing COINGECKO_API_KEY (CoinGecko Demo API key).")
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s: %(message)s",
)
# ----------------------------
# RSI (Wilder) streaming calc
# ----------------------------
class RSIWilder:
def __init__(self, period=14):
self.period = period
self.prev_price = None
self.avg_gain = None
self.avg_loss = None
self._init_gains = deque(maxlen=period)
self._init_losses = deque(maxlen=period)
self.ready = False
def update(self, price: float):
if self.prev_price is None:
self.prev_price = price
return None # need at least 2 prices
change = price - self.prev_price
gain = max(change, 0.0)
loss = max(-change, 0.0)
if not self.ready:
# Build the initial averages over 'period'
self._init_gains.append(gain)
self._init_losses.append(loss)
if len(self._init_gains) == self.period:
self.avg_gain = sum(self._init_gains) / self.period
self.avg_loss = sum(self._init_losses) / self.period
self.ready = True
else:
# Wilder smoothing
self.avg_gain = (self.avg_gain * (self.period - 1) + gain) / self.period
self.avg_loss = (self.avg_loss * (self.period - 1) + loss) / self.period
self.prev_price = price
if self.ready:
if self.avg_loss == 0:
return 100.0 # no losses -> RSI max
rs = self.avg_gain / self.avg_loss
rsi = 100.0 - (100.0 / (1.0 + rs))
return rsi
return None
# ----------------------------
# Data + Alerts
# ----------------------------
def fetch_btc_price_usd():
"""Fetch BTC price (USD) using CoinGecko Simple Price (Demo API key)."""
url = "
headers = {"x-cg-demo-api-key": CG_API_KEY}
params = {
"ids": COIN_ID,
"vs_currencies": FIAT,
"include_last_updated_at": "true",
"precision": "full",
}
r = requests.get(url, headers=headers, params=params, timeout=10)
r.raise_for_status()
data = r.json()
price = float(data[COIN_ID][FIAT])
ts = data[COIN_ID].get("last_updated_at")
updated_at = (
datetime.fromtimestamp(ts, tz=timezone.utc).isoformat()
if isinstance(ts, (int, float)) else None
)
return price, updated_at
def send_discord_embed(title: str, description: str, color: int = 0):
"""Send a professional-looking embed to Discord via Webhook."""
payload = {
"username": "RSI Alert Bot",
"embeds": [
{
"title": title,
"description": description,
"timestamp": datetime.now(timezone.utc).isoformat(),
"color": color, # any int; leave as-is if unsure
"footer": {"text": "Educational alert • Not financial advice"},
}
],
}
r = requests.post(DISCORD_WEBHOOK_URL, json=payload, timeout=10)
if r.status_code >= 300:
logging.error("Discord webhook error: %s %s", r.status_code, r.text)
def main():
rsi = RSIWilder(period=RSI_PERIOD)
was_oversold = False # used to avoid spam; alert on crossing below 30
logging.info("Starting… waiting ~%d minutes to initialize RSI.", RSI_PERIOD)
while True:
start = time.time()
try:
price, updated_at = fetch_btc_price_usd()
rsi_value = rsi.update(price)
human_ts = updated_at or datetime.now(timezone.utc).isoformat()
log_msg = (
f"Price ${price:,.2f} | RSI={rsi_value:.2f}"
if rsi_value is not None
else f"Price ${price:,.2f} | RSI=… (warming up)"
)
logging.info("%s | %s", human_ts, log_msg)
if rsi_value is not None:
# Trigger once when we CROSS below the threshold
if (rsi_value < RSI_ALERT_LEVEL) and (not was_oversold):
was_oversold = True
desc = (
f"**BTC Oversold?** RSI({RSI_PERIOD}) just fell below {RSI_ALERT_LEVEL}.\n\n"
f"**Price**: ${price:,.2f}\n"
f"**RSI**: {rsi_value:.2f}\n"
f"**Time**: {human_ts}\n\n"
f"Use this as a heads-up, not a signal to buy. Consider trend and risk."
)
send_discord_embed(
"BTC Oversold Alert (RSI < 30)",
desc,
color=15158332,
)
# Reset when RSI recovers
elif (rsi_value >= RSI_ALERT_LEVEL) and was_oversold:
was_oversold = False
send_discord_embed(
"BTC Oversold Condition Cleared",
f"RSI({RSI_PERIOD}) back to {rsi_value:.2f}. Price ${price:,.2f}.",
color=3066993,
)
except requests.HTTPError as e:
logging.error("HTTP error: %s", e)
except Exception as e:
logging.exception("Unexpected error: %s", e)
# Sleep until the next minute boundary
elapsed = time.time() - start
sleep_for = max(1.0, CHECK_EVERY_SECONDS - elapsed)
time.sleep(sleep_for)
if __name__ == "__main__":
main()
What You’ll See in Discord (example)
When RSI drops below 30, you’ll get an embed that looks something like:
- Title:
BTC Oversold Alert (RSI < 30) - Body:
You’ll also see a “condition cleared” alert when RSI moves back above 30.
You’ve Built It — Now What? 1. Adapt it for stocks or other assets- For stocks, swap out CoinGecko for a stock price API (or your broker’s API) and keep the RSI logic.
- For other crypto, change:
COIN_ID = "bitcoin"
to any other supported coin ID (e.g. ethereum, etc.).
Once the plumbing is working, you can play with more complex rules, for example:
- RSI < 30 and price above a 200-period moving average.
- Only alert if RSI < 30 and BTC is in an overall uptrend.
- Add your own filters: volatility, volume spikes, etc.
Later, if you want true “AI”, you can:
- Collect historical data.
- Compute features (RSI, moving averages, volatility, etc.).
- Train a simple model that outputs “strong buy / weak buy / ignore” and plug that into the same Discord alert pipeline.
- Replit and Colab sessions can sleep or restart. For a 24/7 bot, consider:
- A small VPS,
- A cheap cloud VM, or
- A scheduled cloud function that runs every minute.
- If you care about perfect continuity, save RSI state to a file (or small DB) so you can resume without a long warm-up.
- This design hits the API once per minute, which is gentle for free tiers.
- If you scale to more coins or faster intervals, keep an eye on rate limits or upgrade your plan.
- Paper trade first. Let the bot run to a private Discord channel. Log outcomes for a few weeks: what happens after each alert? Would you really have wanted to trade those?
- Use context, not just RSI. RSI can stay oversold in heavy downtrends. Treat it as an early warning, not a “buy now” button.
- Risk management. Before you connect this to real trades, answer:
- How big is each position?
- What’s your max daily or weekly loss?
- When do you ignore signals (e.g. during crazy news events)?
- Fail safely. Add:
- Retries with backoff if the API returns errors.
- A cooldown between alerts (e.g. at most one alert per 10 minutes).
- Basic monitoring (even just logging to console or a file).
That’s it — you now have a working crypto alert bot that uses a classic indicator, runs in the cloud, and posts to Discord. You can keep the overall shape (fetch data → compute signal → send webhook) and swap in whatever assets, indicators, or ML models you want.
Professional bot developer here,
What you are describing is unfortunately not a bot, but a magic money making machine. No bots can work 100% of the time under all conditions.
Typically, I have a bot trading gold, but it trades exclusively in longs / uptrends. Therefore, when I see the price of gold is falling, I simply turn it off.
It's been going for 4 years non stop with no issues; as long as I turn it off when gold is on a downtrend or range.
The reason I choose to only trade during uptrends is simply due to the nature of gold being a bullish asset.
I’ve been experimenting with AI trading bots since ChatGPT first came out a couple of years ago, and I’ve tested a lot of different setups since then.
Here’s what I’ve learned.
First — simply giving AI full authority to trade will not magically make you profitable.
A lot of people assume that more inputs = better decisions. That’s not always true. In fact, overloading a model with too many signals can reduce clarity and increase overtrading.
And overtrading is the silent killer.
Fees bleed slowly. Small unnecessary trades compound into negative expectancy.
What actually matters:
• Testing different prompts and structures
• Keeping inputs focused and intentional
• Stress-testing across different market regimes (chop vs trend, low vs high volatility, leverage vs spot)
• Measuring performance across time, not just short bursts
Only when a strategy survives multiple environments can you call it robust.
We’ve already seen public experiments (like Alpha Arena and others) where AI strategies achieved decent returns — for example, ~30% over a competition period. That proves one thing:
AI can generate edge under structured conditions.
But the real shift AI brings isn’t “easy money.”
It lowers the barrier.
Someone without a deep financial background can now experiment with structured strategies and iterate much faster than before.
The real question isn’t:
“Can AI make money trading?”
Under the right structure, yes.
The real question is:
Do you know how to structure and iterate your AI so it adapts to market conditions instead of overfitting to one regime?
Personally, what frustrated me most was iteration.
Every tiny adjustment meant editing code, redeploying, restarting processes, re-running backtests.
So I ended up building a platform to simplify that workflow — mainly to remove the constant infrastructure friction and focus on strategy logic instead. It’s more about experimentation and structured AI execution than “auto-profit.”
I’ve also been running an Arena-style environment (virtual capital, live market data, AI-only execution) to see how different structured strategies perform over time. The results are competitive, but more importantly, they’re realistic — including volatility and drawdowns.
Curious to hear from others here:
• Are you running AI bots live?
• What’s been your biggest challenge — model quality, structure, risk, or iteration?
• Do you think the edge is in the model itself or in how it’s deployed?
Happy to discuss.
I develop bots professionally and have been doing so for 7 years now.
Yes, some actually work, but remember that bots are not magic money making machines. They are only automations of already existing trading strategies.
Not only that, but they aren't full automated. In the sense that they will always, and I mean always, need some kind of monitoring. It is very complicated (impossible) to have a bot working under any market conditions.
Otherwise yes, bots can and many do work, myself and my clients have been profitable for multiple years now, in a relatively stable manner, with just a few months ending up in losses due to strong market changes (covid and stuff like that).
But it is true that many of the bots available on usual markets are scams. And generally speaking, if you see it being too good to be true, it usually is.
It just automates a strategy. If your strategy is profitable, then the bot is in theory.
Did you use AI to write this post
So I’ve been testing an automated strategy for the last few weeks and the results surprised me.
I’m averaging around 9.2% per month with this bot (screenshot attached).
No over-leveraging, no martingale, no stupid risky nonsense.
Just a clean, rule-based system that trades only high-quality setups.
A few highlights:
✔️ Fully automated
✔️ No repainting indicators
✔️ Trades both directions
✔️ Backtested & forward tested
✔️ Smooth equity curve
✔️ Works even in ranging markets
I’m still refining it, but honestly… this is the first time I’m seeing consistent returns that actually make sense without taking insane risk.
If anyone wants more details or wants to test it, just comment “follow” or DM me and I’ll share everything.
Happy trading 🚀📊
I’m continually seeing people advertising trading bots, however there’s lots of people bashing them online. Are they a scam? Do any actually work?
Be cautious and aware building script and logic with Ai. The AI and in my case it was Gemini, has an inherent nanny mode protocol that will inhibit your bots trading ability based on its risk assessment. I back tested my script and logic with great results and as soon as Gemini assumed it was going to be live trading, she would add restraints and cripple it. Make sure your always saying its just for "Simulation" or your just testing it in the sandbox. Has anyone else encountered it? Grok seems better, but I think Gemini has better code building capabilities.
Maybe, but you will never get near it. Anything for sale is a scam.
Most of the market is traded by bots and for decades actually have been extremely profitable but they typically take years to develop and done by profitable traders or a team of smart people who program them. There’s constant competition as in the bots are trading against themselves mainly essentially the battle of the bots
Anyone give me advice on if these AI trading bots actually work to make profits or if you can successfully vibe code a winning strategy? Curious if this works and what kind of advice someone can give someone looking to get started doing this?
What's strategy is based upon care to explain?
I would love to check it out
Did everybody forget what AI does? Why put a bot in the way, you could have spent the time training an AI model
I read a lot that the bots work but when there is a change in market phase, they loss.
Hi! Does anyone know what strategies i should use for a trading bot on ES? i'm already using my personal strategy but the bot enters in very few trades and i dont know what filler strategies i should use
Replies (0)
No replies yet. Be the first to reply.