<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dabhi Rohit</title>
    <description>The latest articles on DEV Community by Dabhi Rohit (@dabhi_rohit_5ebdeb38bb301).</description>
    <link>https://dev.to/dabhi_rohit_5ebdeb38bb301</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4195108%2Fa9628295-ca59-45bd-be0e-7a83b9dc90ee.png</url>
      <title>DEV Community: Dabhi Rohit</title>
      <link>https://dev.to/dabhi_rohit_5ebdeb38bb301</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dabhi_rohit_5ebdeb38bb301"/>
    <language>en</language>
    <item>
      <title>I Built a Trading Bot That Refuses to Trade</title>
      <dc:creator>Dabhi Rohit</dc:creator>
      <pubDate>Sun, 25 Oct 2026 05:10:51 +0000</pubDate>
      <link>https://dev.to/dabhi_rohit_5ebdeb38bb301/i-built-a-trading-bot-that-refuses-to-trade-4h77</link>
      <guid>https://dev.to/dabhi_rohit_5ebdeb38bb301/i-built-a-trading-bot-that-refuses-to-trade-4h77</guid>
      <description>&lt;p&gt;This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady. Most trading bots are trigger-happy — and most traders lose money for one reason: emotion. FOMO entry, revenge trade, overtrading. My bot has none of that, because it doesn't run on feelings at all. It runs on pure mathematics. Every decision is technical, every step is a calculation.&lt;br&gt;
Week 3's theme is "Slow and Steady" — so I built a bot that says "no trade" far more often than "trade." Meet SteadyTrade AI.&lt;br&gt;
The logic&lt;br&gt;
Step 1 — Market scan. The first AI analyzes the whole market: which stocks have volatility, and which stock is actually worth trading. No trading a dead, flat stock — volatility is where opportunity lives.&lt;br&gt;
Step 2 — Price action analysis. On the selected stock, the AI reads price action and finds where a trade should actually be taken — the levels where the setup makes sense.&lt;br&gt;
Step 3 — Three setups, one confidence score. At that point it builds 3 trade setups based on risk-reward, and gives a confidence score. Below 60%? Stop. Right there. The pipeline ends — no second opinions, no maybes.&lt;br&gt;
Step 4 — The second AI decides. If confidence is 60% or above, the 3 setups go to the second AI — the decision maker. It compares all 3 setups against past trades: in similar conditions, what happened before, and based on that, what is likely now. It picks the single best trade and gives its own confidence level. Above 60%? Only then is a trade plan made.&lt;/p&gt;

&lt;p&gt;Market scan → volatility + stock selection → price action analysis&lt;br&gt;
→ 3 RR setups + confidence (≥60%?) → AI #2 vs past trades (≥60%?)&lt;br&gt;
→ TRADE PLAN ... or silence. Usually silence.&lt;br&gt;
Why this works&lt;br&gt;
No emotion. No overtrading. No revenge trades after a loss, no FOMO entries after a pump. Just mathematics — volatility, price action, risk-reward, and history. A human trader breaks rules when feelings take over; this bot has no feelings to take over.&lt;br&gt;
Open-source AI at the core&lt;br&gt;
•&lt;br&gt;
Laya (Convai's open-weight System-1 decision model) powers AI #2. Real model, local CPU, zero API cost.&lt;br&gt;
•&lt;br&gt;
AI #1 sits behind a clean analyze() interface — it ships with a transparent indicator-based baseline, ready to swap for an open-weight chart/vision model.&lt;br&gt;
No black boxes calling paid APIs. Everything runs on my own machine.&lt;br&gt;
How it's built&lt;br&gt;
•&lt;br&gt;
Data: OHLC market candles.&lt;br&gt;
•&lt;br&gt;
Stack: Python, requests, PyYAML. Every decision is logged to JSON, so the bot's history feeds back into AI #2's next decision.&lt;br&gt;
•&lt;br&gt;
Hard rule: mode: "paper" in the config. This project cannot place real orders — it's educational by design.&lt;br&gt;
First run&lt;br&gt;
Real terminal output from a live test run (python -m src.main), 21 Oct 2026:&lt;/p&gt;

&lt;p&gt;Fetching market data...&lt;br&gt;
  48 candles, last close 83435.07&lt;br&gt;
AI #1 confidence: 85.4%&lt;br&gt;
AI #1 confirmed. Suggested 3 RR setups.&lt;br&gt;
AI #2 (laya) picked setup_1 (RR 1:1.5) with 12.0% confidence.&lt;br&gt;
⛔ AI #2 confidence below gate. No trade.&lt;br&gt;
AI #1 was confident (85.4%) and suggested 3 setups — but Laya only gave the best setup 12.0% confidence, so the gate fired and the bot did nothing. That's the whole point of the design: two gates, and most days the answer is silence. (In an earlier pre-fix run, the fallback path logged PAPER trade #1 at 62.5% — visible in trades/paper_trades.json with "mode": "paper".)&lt;br&gt;
What I learned&lt;br&gt;
I learned that building a bot is easy, but teaching it when NOT to trade is the real work — my two gates said no more often than yes, and that felt right.&lt;br&gt;
The biggest surprise came in my first real run: AI #1 was 85% confident, but Laya gave only 12%, so no trade happened. Two AIs can look at the same data and completely disagree.&lt;br&gt;
I also learned to keep learning safe — paper mode means I can test every idea without risking a single rupee.&lt;br&gt;
What's next&lt;br&gt;
•&lt;br&gt;
Swap AI #1's baseline for a real open-weight chart model.&lt;br&gt;
•&lt;br&gt;
Backtest the two-gate logic on a year of market data.&lt;br&gt;
•&lt;br&gt;
Track how often the gatekeeper says no — and whether the trades it allows actually perform better.&lt;br&gt;
Repo: &lt;a href="https://github.com/rohit-8a/steadytrade-ai" rel="noopener noreferrer"&gt;https://github.com/rohit-8a/steadytrade-ai&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>hacktoberfest</category>
    </item>
  </channel>
</rss>
