惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
Vercel News
Vercel News
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
H
Help Net Security
罗磊的独立博客
The Cloudflare Blog
J
Java Code Geeks
博客园 - 叶小钗
I
InfoQ
B
Blog
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
月光博客
月光博客
博客园_首页
雷峰网
雷峰网
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
美团技术团队
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Building a No-Code Trading Bot Builder for Prediction Mar...
Emil Nielsen · 2026-06-19 · via DEV Community

Emil Nielsen

Today I worked on Raven, a no-code trading bot builder for prediction markets. The goal is to improve usability, fix some bugs in the beta system, and experiment with a new strategy creation experience.

Raven is inspired by tools like n8n, but instead of automating APIs, it lets users visually design and deploy trading strategies for platforms like Polymarket.


Why Raven Exists

Right now, creating a trading strategy in Raven requires connecting multiple nodes visually.

While powerful, this approach can feel overwhelming for new users:

  • You must understand how nodes interact
  • You essentially "program visually"
  • Even simple strategies require multiple components

This is great for advanced users, but not ideal for beginners.

So the question became:

How do we keep the power of a node-based system while making it more accessible?


Introducing a Strategy Creation Wizard

To solve this, I’m working on a step-by-step strategy creation wizard.

Instead of starting with a blank canvas full of nodes, users go through guided steps:

Step 1: Select Venue

Choose where to trade:

  • Polymarket (and potentially others later)

Step 2: Market Scope

Define what kind of market strategy you want:

  • Single market
  • Event-based selection
  • Recurring series

Step 3: Market Selection

Users choose or paste a market (e.g. Polymarket URL), and the system extracts relevant options automatically.

This is one of the harder UX problems today, so simplifying input here is a big focus.

Step 4: Entry Strategy

This is where the actual trading logic is defined.

Users can select templates like:

  • Crossover strategy
  • Mean reversion
  • Market making
  • Custom strategy

And configure parameters like:

  • Position size
  • EMA periods
  • Price offsets

Step 5: Exit & Risk Management

Users define how trades close:

  • Exit on reverse signal
  • Exit on target conditions
  • Max hold time
  • Stop-loss / take-profit rules

We also introduce lifecycle hooks, such as:

  • Order filled
  • Order partially filled
  • Order failed or rejected
  • Timeout events

These allow post-trade automation like hedging or follow-up actions.


The Final Idea: From Wizard → Canvas

After completing the wizard:

  • A full strategy is generated automatically
  • It is converted into a node-based canvas
  • Users can still fine-tune everything manually

This keeps both worlds:

  • Beginner-friendly onboarding
  • Advanced flexibility for power users

Current Engineering Work

While building this, I also worked on several backend issues:

1. Stalled Bots Problem

Some bots:

  • Remain marked as “running”
  • But stop producing updates
  • Or lose WebSocket state

This required debugging heartbeat tracking and event queue behavior.

A possible improvement:

  • Auto-detect stalled bots
  • Restart or mark them as failed after a timeout window

2. S3 Session Loading Bug

I investigated an issue where:

  • A bot session shows as running
  • But loading historical data from S3 fails or returns incorrect state

This pointed to inconsistencies between:

  • Live session state
  • Archived session storage

3. P&L Calculation Issues

Another important bug:

  • Some users had incorrect leaderboard balances
  • P&L was not always consistent with closed trades

The system should compute:

P&L = sum(all closed trades in session)

But some cases still relied on snapshots instead of full recomputation.

This is being fixed by validating:

  • Trade history integrity
  • Session carry-over logic between bots in a season
  • Leaderboard correctness

Idea: Telegram Bot Monitoring

One interesting idea that came up:

Instead of only using the web UI, users could:

  • Monitor bots via Telegram
  • Start/stop bots remotely
  • Get status updates and alerts

The UI would still be used for building strategies, but Telegram becomes a lightweight control layer.


Real Trading vs Simulation

One major observation:

Simulation differs from real execution in one key way:

  • Simulation fills are instant
  • Real markets (e.g. Polymarket) have delays of seconds

That delay affects:

  • Stop-loss behavior
  • Take-profit accuracy
  • Market timing strategies

This is unavoidable and part of real-world trading systems.


Testing a Polymarket Bot Strategy

I also tested a simple strategy setup involving:

  • Market selection
  • Signal comparison
  • Entry condition triggers

Goal: verify that signals behave consistently across live execution.


Relevant Resources

Here are some useful references if you’re interested in similar systems:


Closing Thoughts

Raven is still in beta, and a lot of the current work is about:

  • Reducing friction for new users
  • Stabilizing long-running bots
  • Improving correctness of financial state (P&L, leaderboards)
  • Making strategy design more intuitive

The long-term goal is simple:

Make building and testing trading strategies as easy as dragging nodes and answering a few structured questions.