<?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: Precious Lyna Anusiem</title>
    <description>The latest articles on DEV Community by Precious Lyna Anusiem (@preciousanusiem).</description>
    <link>https://dev.to/preciousanusiem</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2327065%2F51d8d8b6-a2cf-47ea-bb7a-aca33bdb4da4.jpg</url>
      <title>DEV Community: Precious Lyna Anusiem</title>
      <link>https://dev.to/preciousanusiem</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/preciousanusiem"/>
    <language>en</language>
    <item>
      <title>I was building my own tools" energy, since that audience responds to maker/builder framing</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 04:44:33 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/i-was-building-my-own-tools-energy-since-that-audience-responds-to-makerbuilder-framing-4o1a</link>
      <guid>https://dev.to/preciousanusiem/i-was-building-my-own-tools-energy-since-that-audience-responds-to-makerbuilder-framing-4o1a</guid>
      <description>&lt;p&gt;I blew a $3,000 account in six weeks.&lt;/p&gt;

&lt;p&gt;Not because I didn't know what I was doing. I'd watched hundreds of hours of content, I understood support and resistance, I could explain R:R ratios in my sleep. The problem was simpler and more embarrassing than that: I had absolutely no idea what my actual numbers were.&lt;/p&gt;

&lt;p&gt;I thought my win rate was around 60%. It was 41%.&lt;/p&gt;

&lt;p&gt;I thought my average winner was bigger than my average loser. It wasn't — I was cutting winners short and letting losers run, classic textbook mistake, and I couldn't see it because I never actually looked.&lt;/p&gt;

&lt;p&gt;That's the thing nobody tells you when you start trading: the market doesn't care how good your strategy looks on paper. What matters is whether your strategy, as you actually execute it, has positive expectancy. And the only way to know that is to track every single trade with enough detail to do the math.&lt;/p&gt;

&lt;p&gt;The tracking problem&lt;/p&gt;

&lt;p&gt;Most traders track trades in one of three ways:&lt;/p&gt;

&lt;p&gt;They don't track at all (the majority)&lt;/p&gt;

&lt;p&gt;They screenshot good trades for social media and quietly forget the bad ones&lt;/p&gt;

&lt;p&gt;They use a broker's built-in history export, which gives you raw P&amp;amp;L but nothing about the quality of your trades&lt;/p&gt;

&lt;p&gt;None of these tell you what you actually need to know. What's my profit factor? What's my expectancy in R? Which session am I most profitable in — London open or New York? Am I better on trend days or ranging markets? Is my win rate consistent, or did I just get lucky for three weeks?&lt;/p&gt;

&lt;p&gt;These questions are what separate traders who survive from traders who blow up and quit.&lt;/p&gt;

&lt;p&gt;What I built instead&lt;/p&gt;

&lt;p&gt;After my second blown account I stopped trading live for two months and focused on one thing: understanding my own data. I built a backtesting spreadsheet in Excel that would do all the math automatically. I wanted to log a trade in 30 seconds and immediately see how it affected every key metric.&lt;/p&gt;

&lt;p&gt;The result is something I've been refining for over a year. It has seven sheets:&lt;/p&gt;

&lt;p&gt;The Trade Log is where everything starts. You fill in the blue cells — date, pair, direction, entry, stop loss, take profit, result, and P&amp;amp;L. That's it. Every other column calculates itself: your R:R ratio, your R multiple, your running equity, your drawdown percentage, consecutive wins and losses.&lt;/p&gt;

&lt;p&gt;The Dashboard pulls everything together. Win rate, profit factor, expectancy, max drawdown, Sharpe ratio, average R:R — all live, all updated the moment you add a trade. There's a pass/fail benchmark system so you can see at a glance if your numbers meet the minimums a funded trader or prop firm would expect.&lt;/p&gt;

&lt;p&gt;The Strategy Analyzer is where things get interesting. It breaks your performance down by strategy, by pair, by session, and by day of the week. When I first ran my own numbers through this, I discovered I was profitable on London session trades and consistently losing on Asian session trades. I stopped trading Asian session. My overall performance improved immediately.&lt;/p&gt;

&lt;p&gt;The Equity Curve gives you a visual chart of your cumulative P&amp;amp;L so you can see the shape of your trading — smooth and consistent, or spikey and lucky. These look very different and they matter.&lt;/p&gt;

&lt;p&gt;The R:R Calculator works out your ideal position size based on your account balance and your risk percentage per trade. It also shows you the minimum win rate required to be profitable at any given R:R ratio. (At 1:1, you need to win more than 50% of trades. At 2:1, you only need to win 34%. This is not a small difference.)&lt;/p&gt;

&lt;p&gt;The Monthly Summary breaks everything down month by month, which is essential if you're trading a prop firm challenge or keeping a trading journal for tax purposes.&lt;/p&gt;

&lt;p&gt;Settings is where you configure your account size, your risk percentage, and your performance benchmarks — then everything across the entire spreadsheet updates automatically.&lt;/p&gt;

&lt;p&gt;The numbers that changed how I trade&lt;/p&gt;

&lt;p&gt;Here's what I mean when I say this changed things concretely.&lt;/p&gt;

&lt;p&gt;After three months of logging with this system, I knew:&lt;/p&gt;

&lt;p&gt;My win rate was 54%, not the 60% I'd assumed&lt;/p&gt;

&lt;p&gt;My profit factor was 1.3 — technically profitable, but fragile&lt;/p&gt;

&lt;p&gt;My expectancy was 0.21R per trade — low, but positive&lt;/p&gt;

&lt;p&gt;My max drawdown was 14% — acceptable&lt;/p&gt;

&lt;p&gt;I won 68% of trades I took on Tuesday and Wednesday. I lost money net on Mondays and Fridays.&lt;/p&gt;

&lt;p&gt;Monday and Friday trades disappeared from my plan. My profit factor went from 1.3 to 1.7 in the following two months without changing anything else about my strategy.&lt;/p&gt;

&lt;p&gt;That's what data does. It removes the guesswork and the ego. You can't argue with your own numbers.&lt;/p&gt;

&lt;p&gt;Who actually needs this&lt;/p&gt;

&lt;p&gt;If you're a complete beginner who just opened a demo account last week, you probably don't need this yet. Come back when you have 50 trades to analyse.&lt;/p&gt;

&lt;p&gt;But if you've been trading for three months or more — live or demo — and you can't immediately answer the following questions from memory, you need a proper tracking system:&lt;/p&gt;

&lt;p&gt;What is your current win rate?&lt;/p&gt;

&lt;p&gt;What is your profit factor over your last 100 trades?&lt;/p&gt;

&lt;p&gt;What is your expectancy in R?&lt;/p&gt;

&lt;p&gt;Which pair or asset are you most profitable on?&lt;/p&gt;

&lt;p&gt;What is your maximum historical drawdown?&lt;/p&gt;

&lt;p&gt;Most traders can't answer more than one of these. If that's you, you're trading blind. You might be profitable right now for reasons that have nothing to do with your edge, and you won't know until the market shifts.&lt;/p&gt;

&lt;p&gt;One last thing&lt;/p&gt;

&lt;p&gt;The spreadsheet is available for instant download. It works in Microsoft Excel and Google Sheets, costs less than a trading book, and you'll have data on your own performance within the first week of using it.&lt;/p&gt;

&lt;p&gt;If you're serious about trading — not serious about watching trading content, but serious about actually improving — tracking your trades properly is the single highest-leverage thing you can do. Everything else is noise until you know your numbers.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://anusiempreciouso.gumroad.com/l/Forex_Crypto_Backtesting_Spreadsheet" rel="noopener noreferrer"&gt;Download Trade Backtest Pro here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>nocode</category>
      <category>beginners</category>
      <category>web3</category>
    </item>
    <item>
      <title>Automating Trades on Deriv Without Writing a Single Line of Code</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 04:36:31 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/automating-trades-on-deriv-without-writing-a-single-line-of-code-53k9</link>
      <guid>https://dev.to/preciousanusiem/automating-trades-on-deriv-without-writing-a-single-line-of-code-53k9</guid>
      <description>&lt;h1&gt;
  
  
  Automating Trades on Deriv Without Writing a Single Line of Code
&lt;/h1&gt;

&lt;p&gt;Before you scroll past — this isn't about algorithmic trading requiring a Bloomberg terminal and a computer science degree. This is about a free, browser-based tool that Deriv (one of the world's largest online trading platforms, 3M+ users) gives every account holder, and that almost nobody actually uses.&lt;/p&gt;

&lt;p&gt;It's called DBot. And once it clicked for me, I couldn't believe I'd been clicking trades manually for months.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quick context: what even is Deriv?
&lt;/h2&gt;

&lt;p&gt;Deriv is a regulated online trading platform that offers binary options, multipliers, accumulators, and a category of instruments called Synthetic Indices — simulated assets that run 24/7 including weekends, modelled on real market volatility without being tied to actual underlying assets.&lt;/p&gt;

&lt;p&gt;The Synthetic Indices part is relevant because they're what make DBot practical for most beginners. You're not fighting forex news events at 2am. The market just... runs. Constantly. Which means your bot can too.&lt;/p&gt;




&lt;h2&gt;
  
  
  So what is DBot exactly?
&lt;/h2&gt;

&lt;p&gt;DBot is Deriv's visual, drag-and-drop strategy builder. Think Blockly (the open-source visual programming tool — because it's literally built on top of Blockly). You construct trading logic by connecting blocks that represent actions, conditions, and data.&lt;/p&gt;

&lt;p&gt;No IDE. No dependencies. No environment setup. Just blocks.&lt;/p&gt;

&lt;p&gt;Here's what the core execution structure looks like conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Initialization]
  set stake = 1.00
  set loss_count = 0

[Loop]
  check_stop_conditions()
  → if conditions met: stop()
  → else: execute_trade()

[On Win]
  reset_stake()
  reset_loss_count()
  loop()

[On Loss]  
  increment_loss_count()
  update_stake()  // e.g., multiply by 2.2 for Martingale
  loop()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the mental model. Everything else — conditions, tick analysis, variable management — is detail layered on top of this loop.&lt;/p&gt;




&lt;h2&gt;
  
  
  The blocks that matter
&lt;/h2&gt;

&lt;p&gt;DBot has a lot of block categories. Here's the honest breakdown of what beginners actually need:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trade Definition&lt;/strong&gt; — Defines the instrument (market, contract type, duration, stake). The skeleton every bot is built on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Purchase&lt;/strong&gt; — Executes a trade. Dead simple, but it must be connected correctly inside your result handlers or nothing happens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On Finish&lt;/strong&gt; — Two versions: On Win and On Loss. These are event handlers that fire after each trade resolves. All your strategy logic lives in here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logic / If-Else&lt;/strong&gt; — Your conditionals. "If total profit &amp;gt;= 5, stop. Else, purchase." Straightforward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Math&lt;/strong&gt; — Arithmetic blocks. Multiply stake by 2.2, add 0.50, subtract 1.00. Used for stake progression calculations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variables&lt;/strong&gt; — Named storage. Create variables for things like &lt;code&gt;current_stake&lt;/code&gt;, &lt;code&gt;consecutive_losses&lt;/code&gt;, &lt;code&gt;session_profit&lt;/code&gt;. Initialize them at bot start. Read and write them throughout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tick Analysis&lt;/strong&gt; — Read market data. Last tick price, last digit (0–9), whether last n ticks were rising or falling. This is how you build condition-based entries instead of blind-firing every tick.&lt;/p&gt;




&lt;h2&gt;
  
  
  Building the loop correctly
&lt;/h2&gt;

&lt;p&gt;The most common beginner mistake is building a bot that executes one trade and stops. It looks right — Trade Definition block, Purchase block, done. But that bot doesn't loop. You press Run, one trade executes, and then silence.&lt;/p&gt;

&lt;p&gt;The correct pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Run Once at Start
└── Purchase(initial_stake)

On Finish (Win)
├── Reset stake and loss count
├── IF stop condition met → Stop Bot
└── ELSE → Purchase(current_stake)

On Finish (Loss)
├── Increment loss count
├── Update stake
├── IF stop condition met → Stop Bot
└── ELSE → Purchase(current_stake)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Purchase blocks inside On Finish are what create the loop. Each trade result triggers the handler, the handler evaluates conditions, and then either stops or buys again.&lt;/p&gt;

&lt;p&gt;Every Purchase must be preceded by stop condition checks. If you forget this, the bot runs until one of three things happens: your account empties, the browser crashes, or you manually hit Stop. None of these are the conditions you want controlling your session.&lt;/p&gt;




&lt;h2&gt;
  
  
  Stop conditions — the part everyone treats as optional
&lt;/h2&gt;

&lt;p&gt;They're not optional. Here's the template I use before every Purchase call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IF (total_profit &amp;gt;= take_profit_target
    OR total_profit &amp;lt;= stop_loss_limit
    OR consecutive_losses &amp;gt;= max_streak
    OR current_stake &amp;gt; max_stake_cap)
THEN
    Stop Bot
ELSE
    Purchase(current_stake)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Four conditions. Each one independently capable of saving your session. Together they form a circuit breaker that no losing streak can bypass.&lt;/p&gt;

&lt;p&gt;Set these values before you run. Not during. Not after three losses when your judgment is compromised. Before.&lt;/p&gt;




&lt;h2&gt;
  
  
  Martingale — the honest explanation
&lt;/h2&gt;

&lt;p&gt;Martingale is the most talked-about DBot strategy and also the most misunderstood.&lt;/p&gt;

&lt;p&gt;The mechanic: after each loss, multiply your stake by approximately 2.2. The first win recovers all previous losses plus a small profit. On win, reset to initial stake.&lt;/p&gt;

&lt;p&gt;The math works cleanly in theory. In practice, the failure mode is consecutive losses. Here's what happens at a starting stake of $1 with a 2.2 multiplier:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Trade 1: $1.00 stake  → Loss → Running total lost: $1.00
Trade 2: $2.20 stake  → Loss → Running total lost: $3.20
Trade 3: $4.84 stake  → Loss → Running total lost: $8.04
Trade 4: $10.65 stake → Loss → Running total lost: $18.69
Trade 5: $23.43 stake → Loss → Running total lost: $42.12
Trade 6: $51.54 stake → WIN  → Net profit: ~$1.19
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Six trades. $51 stake on trade six. ~$1.19 net profit.&lt;/p&gt;

&lt;p&gt;Five consecutive losses is not a rare event. On Volatility 75 Index it happens regularly enough that an uncapped Martingale without a loss streak limit will blow your account in a matter of sessions.&lt;/p&gt;

&lt;p&gt;The fix is simple: cap consecutive losses at 4 or 5. When the cap hits, stop the bot entirely. Accept the session loss. Return another day. Don't try to chase with a larger stake — that's exactly the spiral Martingale bots fall into without hard limits.&lt;/p&gt;




&lt;h2&gt;
  
  
  The market I'd recommend starting on
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Volatility 25 Index (V25).&lt;/strong&gt; Here's why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs 24/7 — build and test any time&lt;/li&gt;
&lt;li&gt;Lower volatility means smaller, more predictable tick movements&lt;/li&gt;
&lt;li&gt;Less likely to trigger long loss streaks on Rise/Fall contracts vs V75&lt;/li&gt;
&lt;li&gt;Minimum stakes work fine — you can test with $0.35 per trade&lt;/li&gt;
&lt;li&gt;The 5-tick contract duration gives enough time for movement without excessive exposure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you understand your bot's behaviour on V25, you can migrate to faster or more volatile instruments if your strategy warrants it. Start where the risk is lowest.&lt;/p&gt;




&lt;h2&gt;
  
  
  Testing before you go live
&lt;/h2&gt;

&lt;p&gt;DBot doesn't have a native historical backtester. Testing means running on Demo, and running enough trades to see your strategy across different market conditions — not just cherry-picked favourable ones.&lt;/p&gt;

&lt;p&gt;My minimum: 500 Demo trades before any live consideration. 200 is not enough. You'll hit a favourable patch of 200 trades that makes any strategy look profitable.&lt;/p&gt;

&lt;p&gt;Things to track during Demo testing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Win rate %&lt;/strong&gt; — for Rise/Fall on V25, expect 48–52% on a strategy with no conditions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maximum consecutive losses&lt;/strong&gt; — what's the worst streak you observed?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maximum drawdown&lt;/strong&gt; — what's the largest drop in account balance from peak?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stop loss trigger frequency&lt;/strong&gt; — how often does your daily stop loss activate?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session consistency&lt;/strong&gt; — do 10 consecutive sessions all end in similar ranges?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your bot can't produce consistent Demo results over 500+ trades, it won't produce consistent live results either. No amount of "maybe it'll be different with real money" makes that math work out.&lt;/p&gt;




&lt;h2&gt;
  
  
  What this actually looks like in production
&lt;/h2&gt;

&lt;p&gt;A well-configured bot session on V25 with a $100 Demo account might look like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Starting stake: $0.50&lt;/li&gt;
&lt;li&gt;Target: +$5 for the session, then stop&lt;/li&gt;
&lt;li&gt;Hard stop: -$10 for the session, then stop&lt;/li&gt;
&lt;li&gt;Max consecutive losses before stopping: 4&lt;/li&gt;
&lt;li&gt;Max single stake: $10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At those parameters, the bot typically reaches its take profit target before the stop loss on sessions with average variance. When stop loss triggers, it's a contained loss. No single session can cause a cascading wipeout.&lt;/p&gt;

&lt;p&gt;That's the goal. Not maximum profit. Consistent, contained, repeatable sessions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where to learn more / go deeper
&lt;/h2&gt;

&lt;p&gt;I put together a complete walkthrough guide — 9 chapters covering DBot from account setup through live deployment, including block-by-block build instructions, five strategy templates, Martingale configured safely, risk management tables by account size, and a troubleshooting reference.&lt;/p&gt;

&lt;p&gt;If you're building on Deriv and want a proper foundation rather than piecing it together from forum posts: &lt;strong&gt;&lt;a href="https://anusiempreciouso.gumroad.com/l/deriv-bot-guide" rel="noopener noreferrer"&gt;https://anusiempreciouso.gumroad.com/l/deriv-bot-guide&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's aimed at beginners but detailed enough that intermediate traders have found the strategy templates and risk frameworks useful.&lt;/p&gt;




&lt;p&gt;Questions? Drop them in the comments. Happy to dig into specific block configurations, strategy mechanics, or anything else DBot-related.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Standard disclaimer: trading involves risk, this is not financial advice, always use Demo before real funds, etc. — but also: actually read the risk warnings in that guide. The Martingale section in particular.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building a Profitable Deriv Bot Without Writing a Single Line of Code</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 04:29:16 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/building-a-profitable-deriv-bot-without-writing-a-single-line-of-code-5fi5</link>
      <guid>https://dev.to/preciousanusiem/building-a-profitable-deriv-bot-without-writing-a-single-line-of-code-5fi5</guid>
      <description>&lt;h1&gt;
  
  
  Building a Profitable Deriv Bot Without Writing a Single Line of Code
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;What I actually learned after testing 200+ trades on Volatility 25&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Quick context before we get into this: I am primarily a software developer and AI engineer. I build production systems for a living. When I started exploring Deriv bots I approached it the way I approach every system — figure out the architecture first, implement second, test thoroughly before trusting it with real resources.&lt;/p&gt;

&lt;p&gt;That approach saved me from a lot of the mistakes I see beginners make. Not all of them. But most.&lt;/p&gt;

&lt;p&gt;This article is the technical breakdown I wish had existed when I started. It covers the architecture of a working bot, the logic behind every major decision, and how to avoid the traps that waste most beginners' time and money.&lt;/p&gt;

&lt;p&gt;I am also going to be honest about what the win rate numbers mean and what they do not — because I think the trading content space has a serious problem with people presenting cherry-picked results as if they are guarantees.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Architecture Problem
&lt;/h2&gt;

&lt;p&gt;Most Deriv bot tutorials show you what to click. Very few explain why, or what the underlying computational model actually looks like.&lt;/p&gt;

&lt;p&gt;Here is the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;STATE MACHINE
├── Initial State
│   ├── current_stake    = BASE_STAKE
│   ├── total_profit     = 0
│   ├── consecutive_loss = 0
│   └── is_active        = true
│
├── Loop (while is_active == true)
│   ├── Safety Guard
│   │   ├── if profit &amp;gt;= TARGET → is_active = false
│   │   └── if consecutive_loss &amp;gt;= MAX_STREAK → is_active = false
│   │
│   ├── Signal Evaluation
│   │   ├── Fetch: last_tick, prev_tick
│   │   ├── Compute: direction (UP or DOWN)
│   │   └── Optional: RSI filter check
│   │
│   ├── Trade Execution
│   │   └── Place CALL (UP) or PUT (DOWN) on R_25, 5t duration
│   │
│   └── Result Handler
│       ├── WIN  → stake = BASE_STAKE, consecutive_loss = 0
│       └── LOSS → stake *= RECOVERY_MULT, consecutive_loss += 1
│
└── Terminal State
    └── Bot stopped (profit target or loss limit hit)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every profitable Deriv bot I have built or analysed maps to this state machine. The differences between strategies live inside the Signal Evaluation node. The skeleton is constant.&lt;/p&gt;

&lt;p&gt;Understanding this up front means you are not staring at a blank DBot canvas wondering where to begin. You are translating a known data structure into visual blocks.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why V25 and 5-Tick Duration: The Actual Reasoning
&lt;/h2&gt;

&lt;p&gt;I see a lot of bot content that recommends V75 or V100 because the dramatic price action looks impressive in short demo sessions. Let me explain why this is usually a mistake for systematic strategies.&lt;/p&gt;

&lt;p&gt;Volatility in synthetic indices is controlled by Deriv's pricing engine. V25 has a 25% volatility parameter. V100 has a 100% volatility parameter. Higher volatility means larger per-tick price movements and less predictable direction.&lt;/p&gt;

&lt;p&gt;For a tick-direction entry signal — which is what we are building here — higher volatility means more noise relative to signal. The tick comparison that gives you a meaningful 52-56% edge on V25 becomes much closer to 50% on V75 because the signal is getting drowned in randomness.&lt;/p&gt;

&lt;p&gt;5-tick duration is chosen for similar reasons. Below 5 ticks, the contract expires before the signal has time to resolve. Above 10 ticks, holding time is long enough that mean reversion starts to work against trend-following logic.&lt;/p&gt;

&lt;p&gt;These are not arbitrary choices. They are the result of running the same strategy across multiple markets and durations and measuring which combination produces the most stable signal-to-noise ratio.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Entry Signal: What It Does and What It Does Not Do
&lt;/h2&gt;

&lt;p&gt;The entry signal in this guide is a tick direction confirmation. Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;signal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;last_tick&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;prev_tick&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;CALL&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PUT&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the simplest possible entry signal. On its own it generates roughly 50-55% win rate on V25 — barely above chance. The reason it works at all is that Deriv's synthetic indices do exhibit short-term autocorrelation (the tendency for a tick moving in a direction to be slightly more likely to continue in that direction on the next tick). This is not a large edge, but it is measurable and consistent.&lt;/p&gt;

&lt;p&gt;The basic signal alone is not what makes the strategy worth running. The risk management structure is what converts a slim edge into consistent profitability over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On the RSI filter:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Adding a simplified RSI calculation over the last 14 ticks as a second confirmation condition filters out a significant portion of entries that would be caught by tick direction but are entering into an exhausted move. In my testing this raises the win rate to 68-72% on V25.&lt;/p&gt;

&lt;p&gt;I am not including the full RSI implementation in this article because it requires array variables, loop calculations, and conditional logic that goes beyond beginner level. I cover it in complete detail in the guide I linked at the end.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Risk Management Mathematics
&lt;/h2&gt;

&lt;p&gt;This is where I want to be precise because the numbers matter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Base stake: 0.35% of account balance.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The choice of 0.35% is not random. I ran the loss streak probability calculations for a strategy with a 55% win rate (conservative baseline) and determined the maximum consecutive loss streak I needed to survive without breaching 20% account drawdown.&lt;/p&gt;

&lt;p&gt;Consecutive loss probability for a 55% win rate strategy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3 losses in a row: (0.45)^3 = 9.1% per session&lt;/li&gt;
&lt;li&gt;4 losses in a row: (0.45)^4 = 4.1% per session&lt;/li&gt;
&lt;li&gt;5 losses in a row: (0.45)^5 = 1.8% per session&lt;/li&gt;
&lt;li&gt;6 losses in a row: (0.45)^6 = 0.8% per session&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A 4-loss hard stop with 1.8x recovery multiplier means the worst-case sequence is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Trade 1: 0.35  (loss)
Trade 2: 0.63  (loss)
Trade 3: 1.13  (loss)
Trade 4: 2.04  (loss — bot stops)
Total exposure: 4.15 units on 0.35 base = ~4.2% of account
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is survivable. With standard 2x martingale the same 4-loss sequence exposes 5.25 units — and if you do not have a hard stop, 6 losses exposes 22.05 units. That destroys accounts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why 1.8x not 2x:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;2x martingale is theoretically elegant — one win recovers all previous losses exactly. In practice the growth rate of the stake sequence becomes dangerous faster than a 55-70% win rate can compensate for in bad sessions.&lt;/p&gt;

&lt;p&gt;1.8x gives you slightly incomplete single-win recovery (you need approximately 1.1 wins to fully recover after 4 losses) but the stake sequence stays within manageable bounds significantly longer. The tradeoff is worth it.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Live Results — The Numbers and The Context
&lt;/h2&gt;

&lt;p&gt;17 wins. 7 losses. 71% win rate. 24 trades. Live account.&lt;/p&gt;

&lt;p&gt;I want to give you both the honest positive interpretation and the honest skeptical one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Positive:&lt;/strong&gt; The win rate is tracking above the theoretical baseline of the strategy (which I model at 65-72% with the RSI filter). No session ended in net loss. Maximum consecutive loss streak was 3, well within the hard stop limit. The risk management worked exactly as designed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Skeptical:&lt;/strong&gt; 24 trades is a small sample. In any strategy with a genuine 65% win rate, you would expect the observed win rate across 24 trades to vary widely — somewhere between 45% and 85% would not be statistically surprising. I cannot prove from 24 trades that the underlying win rate is not 55% or 75%.&lt;/p&gt;

&lt;p&gt;What I can say is that the results are consistent with the theoretical model, they were achieved on a live account, and the risk management structure ensured no individual session was damaging regardless of outcome.&lt;/p&gt;

&lt;p&gt;I have run a much larger number of demo trades over multiple sessions. The win rate in extended demo testing sits in the 62-68% range. Live conditions introduce some variation.&lt;/p&gt;

&lt;p&gt;Run your own 200-trade demo sequence before drawing conclusions. Treat anything less than that as preliminary data.&lt;/p&gt;




&lt;h2&gt;
  
  
  What the DBot Build Actually Looks Like
&lt;/h2&gt;

&lt;p&gt;The guide I am linking below covers the complete build in 8 steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Access DBot at app.deriv.com/dbot — confirm demo account selected&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Understand the four workspace areas before placing any blocks&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; The universal bot structure — map the state machine to blocks&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Build step by step&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;4.1: Run-once block and variable initialisation&lt;/li&gt;
&lt;li&gt;4.2: Main trading loop (Repeat while is_active = true)&lt;/li&gt;
&lt;li&gt;4.3: Safety guard as first block inside loop&lt;/li&gt;
&lt;li&gt;4.4: Entry signal — tick comparison logic&lt;/li&gt;
&lt;li&gt;4.5: Trade placement for CALL and PUT&lt;/li&gt;
&lt;li&gt;4.6: Result handler — win and loss branches&lt;/li&gt;
&lt;li&gt;4.7: Wait block to prevent API rate errors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Visual map of complete structure&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Save and export as XML backup&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Demo run — what to watch for&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Reading results — the metrics that matter&lt;/p&gt;

&lt;p&gt;It also covers the five most common DBot errors I see beginners hit, and a troubleshooting section for each one.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Guide
&lt;/h2&gt;

&lt;p&gt;I put everything above into a structured PDF that walks through the complete build. It is aimed at someone who has never opened DBot before but can follow logical instructions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://anusiempreciouso.gumroad.com/l/deriv-bot-guide" rel="noopener noreferrer"&gt;How to Build Your First Deriv DBot From Scratch — $27&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What is inside:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The complete step-by-step build process with every block explained&lt;/li&gt;
&lt;li&gt;Risk management framework with the actual mathematics&lt;/li&gt;
&lt;li&gt;Complete bot structure visual map&lt;/li&gt;
&lt;li&gt;Demo testing guide and results interpretation&lt;/li&gt;
&lt;li&gt;Five most common mistakes and how to avoid them&lt;/li&gt;
&lt;li&gt;Introduction to the RSI filter for advanced win rates&lt;/li&gt;
&lt;li&gt;Troubleshooting guide for common DBot errors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;30-day refund policy. Instant download.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you have questions after going through it, you can reach me at &lt;a href="mailto:preciousanusiem.o.1@gmail.com"&gt;preciousanusiem.o.1@gmail.com&lt;/a&gt;.
&lt;/h2&gt;

&lt;h2&gt;
  
  
  A Note on Algorithmic Trading Honestly
&lt;/h2&gt;

&lt;p&gt;I want to end with something that does not get said enough in this space.&lt;/p&gt;

&lt;p&gt;Algorithmic trading is not a reliable income replacement. It is a tool that, used correctly by someone who understands it, can generate consistent returns in a specific niche. Used incorrectly by someone who does not understand it, it loses money systematically.&lt;/p&gt;

&lt;p&gt;The difference between those two outcomes is almost entirely about understanding your system. Not about having the best signal. Not about the most sophisticated strategy. About genuinely knowing what your bot is doing and why, so you can recognise when it is working correctly versus when something is wrong.&lt;/p&gt;

&lt;p&gt;This guide is designed to give you that understanding from scratch. Everything else can be improved over time once the foundation is solid.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Precious Anusiem — AI/ML Engineer, SaaS Founder, MQL5 Published Developer. Stanford ML certified. Google certified in Cybersecurity (93.71%) and Data Analytics (98.3%). IBM Generative AI Engineering certified. Builder of Dr. Choice, GlimTalk, InvestPropty, MeqxAI.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:preciousanusiem.o.1@gmail.com"&gt;preciousanusiem.o.1@gmail.com&lt;/a&gt;*&lt;/p&gt;

&lt;p&gt;&lt;em&gt;⚠ Risk disclaimer: Trading synthetic indices involves substantial risk of loss. This content is educational only. Past performance does not guarantee future results. Not financial advice.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>I Spent 6 Months Building a News Trading EA That Doesn't Suck (Here's What I Learned)</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 04:15:41 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/i-spent-6-months-building-a-news-trading-ea-that-doesnt-suck-heres-what-i-learned-4f76</link>
      <guid>https://dev.to/preciousanusiem/i-spent-6-months-building-a-news-trading-ea-that-doesnt-suck-heres-what-i-learned-4f76</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted by a forex trader who got tired of losing money to bad EAs&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Look, I'm just going to be honest with you right from the start. I've probably bought and tested at least 20 different forex EAs over the past 3 years. Most of them were garbage. Some worked for a week, then blew my account. Others never even opened a single trade. And the few that actually made money? They'd get absolutely destroyed during news events.&lt;/p&gt;

&lt;p&gt;So about 6 months ago, I decided to stop buying other people's junk and build something myself. This is the story of how I went from complete MQL5 noob to building an EA that's actually profitable (and yes, I'm sharing the code at the end).&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem With Most Trading Bots
&lt;/h2&gt;

&lt;p&gt;Here's the thing nobody talks about: most forex EAs are designed to pass backtests, not to actually trade profitably. They're optimized on historical data until they look amazing, then they fall apart on live markets.&lt;/p&gt;

&lt;p&gt;I realized this after my third blown account. The EA that looked perfect in backtesting (78% win rate! 3:1 R:R!) lasted exactly 11 days live before hitting my 20% drawdown limit. The issue? Fixed stop losses.&lt;/p&gt;

&lt;p&gt;During the UK inflation report (which I forgot was happening), volatility spiked. My EA opened a trade with its usual 30-pip stop loss. The market moved 80 pips in 4 minutes. I got stopped out at -30 pips, then it reversed and would've hit my +60 pip TP. This happened THREE TIMES that day.&lt;/p&gt;

&lt;p&gt;That's when I understood: &lt;strong&gt;fixed stops are broken&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting From Scratch (Sort Of)
&lt;/h2&gt;

&lt;p&gt;I'm primarily a Python guy. I've built ML models for sentiment analysis, written scrapers, done the usual data science stuff. But MQL5? That was new territory.&lt;/p&gt;

&lt;p&gt;First attempt: I tried to build everything from scratch. News detection via web scraping, custom indicators, the whole nine yards. Spent 3 weeks on it. It compiled with 47 errors. I gave up.&lt;/p&gt;

&lt;p&gt;Second attempt: I looked at how other people structure their EAs. Turns out the MQL5 community has some really solid standard libraries (&lt;code&gt;Trade.mqh&lt;/code&gt;, &lt;code&gt;SymbolInfo.mqh&lt;/code&gt;, etc.). Started using those. Much better.&lt;/p&gt;

&lt;p&gt;Third attempt: I focused on solving ONE problem first - the fixed stop loss issue. Everything else could come later.&lt;/p&gt;

&lt;h2&gt;
  
  
  The ATR Breakthrough
&lt;/h2&gt;

&lt;p&gt;I'd read about ATR (Average True Range) before but never really understood WHY it mattered. Then I ran this simple test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Measure volatility on EURUSD for 1 month
double atr_values[];
for(int i = 0; i &amp;lt; 30; i++) {
    double atr = iATR(_Symbol, PERIOD_H1, 14);
    Print("Day ", i, " ATR: ", atr);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The results were eye-opening. During low volatility periods, ATR was around 0.0010 (10 pips). During news events, it jumped to 0.0035 (35 pips). That's &lt;strong&gt;3.5x difference&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So if I'm using a fixed 30-pip stop loss:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Low volatility: 30 pips is probably fine&lt;/li&gt;
&lt;li&gt;High volatility: 30 pips gets hit immediately, then the trade works&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The solution was obvious: &lt;strong&gt;multiply stop loss by current ATR&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;double atr = iATR(_Symbol, PERIOD_H1, 14);
double dynamic_sl = atr * 2.0;  // 2x ATR for stop loss
double dynamic_tp = atr * 4.0;  // 4x ATR for take profit (2:1 R:R)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ran this in strategy tester. Win rate dropped from 78% to 62%, but the profit factor went from 1.2 to 2.4. The EA was finally adapting to market conditions instead of fighting them.&lt;/p&gt;

&lt;h2&gt;
  
  
  But Wait, There's More (The Partial Close Secret)
&lt;/h2&gt;

&lt;p&gt;Even with dynamic stops, I still had a problem: I'd be up +50 pips, then market would reverse and I'd close at +10 pips. Felt like I was constantly giving back profits.&lt;/p&gt;

&lt;p&gt;One day I was reading about professional traders' tactics and came across this idea: &lt;strong&gt;partial position closing&lt;/strong&gt;. The concept is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Hit first profit target&lt;/li&gt;
&lt;li&gt;Close 50% of the position&lt;/li&gt;
&lt;li&gt;Let the other 50% run to full TP&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This does something psychologically important: it &lt;strong&gt;guarantees&lt;/strong&gt; you bank some profit, even if the market reverses. You're never in a situation where a +50 pip trade becomes a +5 pip trade.&lt;/p&gt;

&lt;p&gt;Implementing this in MQL5 was actually pretty straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(current_profit &amp;gt;= partial_target) {
    double close_volume = position_volume * 0.5;
    trade.PositionClosePartial(ticket, close_volume);
    // Remaining 50% stays open to full TP
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Backtested this addition. Win rate stayed at 62%, but &lt;strong&gt;average win increased by 40%&lt;/strong&gt;. Now when trades worked, they REALLY worked.&lt;/p&gt;

&lt;h2&gt;
  
  
  The News Trading Problem (And Solution)
&lt;/h2&gt;

&lt;p&gt;News trading is weird. Everyone knows high-impact news creates volatility and big moves. But most EAs either:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Turn off completely during news (miss opportunities)&lt;/li&gt;
&lt;li&gt;Trade through news with no adjustment (get destroyed)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I wanted something smarter. The MQL5 calendar API actually makes this possible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MqlCalendarValue values[];
int count = CalendarValueHistory(values, start_time, end_time);

for(int i = 0; i &amp;lt; count; i++) {
    MqlCalendarEvent event;
    CalendarEventById(values[i].event_id, event);

    if(event.importance == CALENDAR_IMPORTANCE_HIGH) {
        // We have a high impact event
        // Measure pre-news range and trade the breakout
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My approach: during the 30 minutes before high-impact news, measure the price range. Then wait for a breakout of 150% of that range. This filters out fake moves and only catches the real explosive breakouts.&lt;/p&gt;

&lt;p&gt;The results in backtesting were honestly surprising. News strategy alone had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Win rate: 58%&lt;/li&gt;
&lt;li&gt;Avg win: 2.1x avg loss&lt;/li&gt;
&lt;li&gt;Profit factor: 1.8&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not amazing, but consistent. Combined with the trend-following strategy (EMA + RSI + ADX), the overall system became much more robust.&lt;/p&gt;

&lt;h2&gt;
  
  
  What About Breakeven?
&lt;/h2&gt;

&lt;p&gt;This one's personal preference, but I found it helps psychologically. Once a trade is up +20 pips, I move the stop loss to breakeven +2 pips.&lt;/p&gt;

&lt;p&gt;Why +2 and not exactly breakeven? Spreads. If you move to exact breakeven, you can get stopped out by spread widening. The +2 pip buffer prevents that.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(profit_pips &amp;gt;= 20 &amp;amp;&amp;amp; current_sl &amp;lt; open_price) {
    double new_sl = open_price + (2 * pip_size);
    trade.PositionModify(ticket, new_sl, current_tp);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The psychological benefit is huge: once you hit +20 pips, the trade is "free." Even if it reverses, you can't lose. This lets you be more patient with winners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons I Learned The Hard Way
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Don't optimize on training data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I made this classic ML mistake with my EA. Optimized parameters on 2023 data, got 85% win rate. Tested on 2024 data, got 42% win rate. Oops. Overfitting isn't just a machine learning problem.&lt;/p&gt;

&lt;p&gt;Solution: Use walk-forward analysis. Optimize on 3 months, test on next month, repeat.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Broker differences matter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My EA worked great on my demo account (IC Markets). Moved to live with a different broker (won't name them), and suddenly spreads were 2-3x higher. Many trades that were profitable on demo became losers because of spread.&lt;/p&gt;

&lt;p&gt;Solution: Always backtest with realistic spreads for YOUR broker.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Trailing stops are tricky&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First implementation of trailing stop: moved SL every tick. Result: EA tried to modify position 47 times in one minute. Broker got annoyed, I got errors.&lt;/p&gt;

&lt;p&gt;Better implementation: only move SL if price moved at least 5 pips (the trailing step) AND the new SL is more favorable than current.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;double new_sl = bid - trail_distance;
if(new_sl &amp;gt; current_sl + trail_step) {
    // OK to modify
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Test with small position sizes first&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I finally went live, I started with 0.01 lots even though my account could handle 0.1. Good thing too, because I discovered a bug in my lot size calculation that only showed up with certain account balances. Would've cost me real money.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Keep detailed logs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The MQL5 &lt;code&gt;Print()&lt;/code&gt; function is your best friend:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Print("Opening BUY trade: Lot=", lot, " SL=", sl, " TP=", tp, " ATR=", atr);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When something goes wrong (and it will), these logs are the only way to figure out what happened. Save them. Review them weekly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Final Result
&lt;/h2&gt;

&lt;p&gt;After 6 months of development, testing, and iteration, here's what I ended up with:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ATR-based dynamic stops and targets&lt;/li&gt;
&lt;li&gt;Partial profit taking (50% at +25 pips)&lt;/li&gt;
&lt;li&gt;Automatic breakeven management&lt;/li&gt;
&lt;li&gt;Three strategies: news breakout, trend following, scalping&lt;/li&gt;
&lt;li&gt;Multi-indicator filters (EMA, RSI, ADX)&lt;/li&gt;
&lt;li&gt;Session-based trading (London/NY preferred)&lt;/li&gt;
&lt;li&gt;Full risk management (daily limits, margin checks)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Performance (last 3 months live):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Win rate: 61%&lt;/li&gt;
&lt;li&gt;Average R:R: 1.9:1&lt;/li&gt;
&lt;li&gt;Monthly return: 12-18% (on 1% risk per trade)&lt;/li&gt;
&lt;li&gt;Max drawdown: 14%&lt;/li&gt;
&lt;li&gt;Trades: 150 total&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Is it perfect? No. Does it make consistent money? Yeah, actually it does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Different About This EA
&lt;/h2&gt;

&lt;p&gt;Look, I'm not trying to sell you some magic money printer. This isn't going to make you rich overnight. But here's what makes it different from the 20 other EAs I've tested:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It adapts to volatility&lt;/strong&gt; - No more getting stopped out during news because the EA uses last century's fixed stops&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It protects profit&lt;/strong&gt; - Partial closes and breakeven management mean you actually keep money when trades work&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It's transparent&lt;/strong&gt; - Full source code. You can see exactly what it's doing, modify it, learn from it&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It's been tested properly&lt;/strong&gt; - Walk-forward analysis, multiple market conditions, real broker spreads&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It's still evolving&lt;/strong&gt; - I use this EA with my own money. When I improve it, you get the updates free&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  You Can Check It Out (If You Want)
&lt;/h2&gt;

&lt;p&gt;I put the whole thing (source code + documentation) on Gumroad. It's $97 right now as a launch price. Honestly, I priced it there because I figure if you're serious about algo trading, $97 is nothing - that's like two losing trades. But if you're just curious and not committed, $97 is enough to make you think twice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you get:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full MQL5 source code (NewsFilterEA v2.0 PRO)&lt;/li&gt;
&lt;li&gt;150+ page documentation (I may have gone overboard here)&lt;/li&gt;
&lt;li&gt;Quick start guide for the "just let me use it" crowd&lt;/li&gt;
&lt;li&gt;Optimized settings for EURUSD, GBPUSD, XAUUSD&lt;/li&gt;
&lt;li&gt;All my testing notes and optimization tips&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Link: &lt;a href="https://anusiempreciouso.gumroad.com/l/Advanced_News_Trend_Robot" rel="noopener noreferrer"&gt;https://anusiempreciouso.gumroad.com/l/Advanced_News_Trend_Robot&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But honestly? Even if you don't buy it, I hope this article helps you think differently about building trading systems. The key insights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dynamic stops &amp;gt; fixed stops&lt;/li&gt;
&lt;li&gt;Partial profit taking &amp;gt; holding full position&lt;/li&gt;
&lt;li&gt;Multiple strategies &amp;gt; single strategy&lt;/li&gt;
&lt;li&gt;Adaptation &amp;gt; optimization&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Questions I Know You're Going to Ask
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Q: Is this going to make me rich?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. It's a tool. A good tool, but still a tool. You need proper risk management, the right broker, realistic expectations. This isn't a lottery ticket.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q: Why are you selling it if it works?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because I'm one person with limited capital. I can make maybe $1-2K/month with my account size. Selling the EA for $97 to 100 people = $9,700. That's more than I'd make in 6 months of trading. Plus, I enjoy building this stuff.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q: Can I use it on MT4?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No, it's MT5 only. I'm not going backward to a platform that's been outdated for years.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q: Will it work on [exotic currency pair]?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tested on majors: EURUSD, GBPUSD, USDJPY, XAUUSD. Should work on other pairs but you'll need to optimize settings. Not recommended for exotics with huge spreads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q: What if I can't get it working?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Email me: &lt;a href="mailto:lynaplaodi@gmail.com"&gt;lynaplaodi@gmail.com&lt;/a&gt;. I actually respond. Usually within 24 hours. I built this thing, I can help you set it up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Building this EA taught me more about trading than the previous 3 years of manual trading. There's something about having to codify your strategy that forces you to think clearly about what actually works vs. what you THINK works.&lt;/p&gt;

&lt;p&gt;If you're a developer who trades (or a trader who codes), I highly recommend going through this exercise. Build something. It doesn't have to be complex. Just make it adaptive, make it protect profit, and test it properly.&lt;/p&gt;

&lt;p&gt;And if you want to start with what I built, you know where to find it.&lt;/p&gt;

&lt;p&gt;Happy trading, and may your stops never get hunted.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. - I'm working on adding a feature for multi-timeframe confirmation. If you grab the EA, you'll get that update free when it's ready. Probably in the next month or so.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.P.S. - Yes, I know some of you are going to ask "why not use machine learning?" I tried. Twice. Both times I ended up with overfit models that looked amazing in training and awful in practice. Sometimes simpler is better.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt; #forex #algotrading #metatrader5 #mql5 #trading #automation #fintech #programming&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect:&lt;/strong&gt; Found this useful? I occasionally write about trading and code. Drop your email if you want updates.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>devjournal</category>
      <category>showdev</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>I Spent a Weekend Building Python Scrapers for 10 Websites. Here's Everything I Learned.</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 04:05:05 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/i-spent-a-weekend-building-python-scrapers-for-10-websites-heres-everything-i-learned-57d6</link>
      <guid>https://dev.to/preciousanusiem/i-spent-a-weekend-building-python-scrapers-for-10-websites-heres-everything-i-learned-57d6</guid>
      <description>&lt;p&gt;&lt;em&gt;There's a shortcut at the end — but the lessons in between are genuinely worth reading.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Last spring, I needed eBay sold price data for about 200 items I was researching before an estate sale. Nothing complicated — just what did this thing actually sell for, recently, in used condition.&lt;/p&gt;

&lt;p&gt;I figured it would take an hour. Maybe two.&lt;/p&gt;

&lt;p&gt;Three hours later I had data on maybe 40 items, a stiff neck, and the particular kind of frustration that only comes from doing the same repetitive action several hundred times. Open tab. Search. Filter to sold listings. Scan prices. Write down number. Close tab. Repeat.&lt;/p&gt;

&lt;p&gt;There had to be a better way.&lt;/p&gt;

&lt;p&gt;So I did what any mildly annoyed person with a Python tutorial under their belt does: I automated it.&lt;/p&gt;

&lt;p&gt;That one scraper turned into a weekend project. That weekend project turned into ten scrapers — covering Amazon, eBay, Indeed, LinkedIn, Zillow, Twitter, Reddit, Yelp, Google News, and a price tracker that emails me alerts when something drops below my target price.&lt;/p&gt;

&lt;p&gt;Here's everything I learned along the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Stack I Used (Deliberately Boring)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;requests&lt;/code&gt; — HTTP calls&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;BeautifulSoup&lt;/code&gt; — HTML parsing
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fake-useragent&lt;/code&gt; — rotating user-agent strings&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tweepy&lt;/code&gt; and &lt;code&gt;praw&lt;/code&gt; — for the two sites with decent free APIs (Twitter and Reddit)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;csv&lt;/code&gt; — built-in, no install needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No Selenium. No Playwright. No headless Chrome running in the background eating RAM. I made a deliberate choice to keep everything as simple as possible, and I'll explain why that was the right call.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Most Useful Thing I Learned: Look for JSON Before You Scrape HTML
&lt;/h2&gt;

&lt;p&gt;There's a pattern that almost no scraping tutorial covers, and it saved me hours.&lt;/p&gt;

&lt;p&gt;Modern websites built on React or Next.js often embed the initial page data as a JSON blob inside a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag. This is the data the frontend uses to render what you see. And it's sitting right there in the page source — structured, predictable, and usually more complete than what ends up in the rendered HTML.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;script&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;soup&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;script&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;application/ld+json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}):&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;script&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="c1"&gt;# Your data is in here more often than you'd expect
&lt;/span&gt;    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;JSONDecodeError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;continue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zillow uses this pattern heavily. So does Yelp. Parsing JSON is infinitely more reliable than chasing CSS class names that change whenever someone on the frontend team refactors a component. I build JSON-first parsing with an HTML fallback in every scraper where this is available.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Delay Is Not Optional (And It Has to Be Random)
&lt;/h2&gt;

&lt;p&gt;Every scraper I built has a randomized delay between requests. Not fixed — random. This distinction matters more than most people realize.&lt;/p&gt;

&lt;p&gt;A fixed &lt;code&gt;time.sleep(2)&lt;/code&gt; is a fingerprint. Every request spaced exactly two seconds apart is a signal. &lt;code&gt;time.sleep(random.uniform(2, 5))&lt;/code&gt; looks like a human who gets distracted between clicks.&lt;/p&gt;

&lt;p&gt;I also found that slightly longer delays on the first request — simulating someone waiting for a page to load and actually reading it — helped on sites with more aggressive rate limiting.&lt;/p&gt;

&lt;p&gt;Is any of this foolproof? No. But it's the difference between scraping 500 results cleanly and getting blocked on page three.&lt;/p&gt;




&lt;h2&gt;
  
  
  Two Sites Have Good Free APIs — Use Them Instead of Scraping
&lt;/h2&gt;

&lt;p&gt;Reddit and Twitter both offer free developer API access that most people don't bother with because they assume it's complicated or expensive. It's neither.&lt;/p&gt;

&lt;p&gt;Reddit's API (via the &lt;code&gt;praw&lt;/code&gt; library) is excellent. Upvote ratios, comment trees, post metadata — all clean, structured, and reliable. Setup takes about five minutes at reddit.com/prefs/apps.&lt;/p&gt;

&lt;p&gt;Twitter's free tier is more restricted than it used to be, but for pulling public profile data and recent tweets it's still perfectly usable. The alternative — scraping Twitter's frontend — is a much harder problem. The API route is just better.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;praw&lt;/span&gt;

&lt;span class="n"&gt;reddit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;praw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Reddit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;client_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_ID&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;client_secret&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_SECRET&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="n"&gt;user_agent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;MyBot/1.0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;reddit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subreddit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;entrepreneur&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;hot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;upvote_ratio&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thirty lines of code. Real data. No parsing, no fragile selectors.&lt;/p&gt;




&lt;h2&gt;
  
  
  The eBay Sold Listings Scraper Is the One People Don't Know They Need
&lt;/h2&gt;

&lt;p&gt;This was the scraper that started everything, and it remains the one I use most regularly.&lt;/p&gt;

&lt;p&gt;The key insight: eBay separates &lt;em&gt;completed&lt;/em&gt; listings (things that actually sold) from active listings. Most people browse active listings and assume those prices reflect reality. They don't. The completed listings show you what real buyers actually paid — which is often meaningfully different.&lt;/p&gt;

&lt;p&gt;The URL parameter that unlocks this: &lt;code&gt;LH_Sold=1&amp;amp;LH_Complete=1&lt;/code&gt;. Once you have that, you're pulling real transaction data.&lt;/p&gt;

&lt;p&gt;I also added automatic price statistics at the end of each run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;📈 PRICE SUMMARY (147 sold listings):
   Minimum:  $23.00
   Maximum:  $312.00
   Average:  $87.43
   Median:   $74.00
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The median versus average comparison is more useful than it might seem. A few high-priced outlier sales can pull the average up significantly. Median tells you what you'll realistically see.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Price Tracker Changed My Daily Behavior
&lt;/h2&gt;

&lt;p&gt;Of the ten scripts, the price tracker is the one that earns its keep most consistently.&lt;/p&gt;

&lt;p&gt;You give it a list of product URLs and target prices. It checks prices on a schedule, logs everything to CSV, and sends an email when something drops below your threshold. I run it every morning via a cron job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;0 9 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; python /path/to/05_price_tracker.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What surprised me was how quickly I stopped thinking about it. It just runs. It shows up in your inbox when something matters. That's the ideal version of automation — invisible until it's useful.&lt;/p&gt;

&lt;p&gt;I've used it to catch drops on headphones, a camera lens that almost never goes on sale, and a mechanical keyboard I'd been watching for months. None of those would have happened if I'd had to remember to check manually.&lt;/p&gt;




&lt;h2&gt;
  
  
  Yelp Is an Underrated Lead Generation Tool
&lt;/h2&gt;

&lt;p&gt;I built the Yelp scraper mostly as an afterthought. It turned out to be one of the most immediately practical ones.&lt;/p&gt;

&lt;p&gt;Pull every business in a category and city — with name, rating, review count, phone number, address, and website. Ten minutes of runtime gets you a spreadsheet that a data broker would charge hundreds of dollars for.&lt;/p&gt;

&lt;p&gt;The angle I find most useful: filter for businesses with no website listed. Those are your warm prospects — established enough to have a Yelp presence, but clearly not prioritizing their online presence. If you sell any kind of digital service, that's your list.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Packaged Up
&lt;/h2&gt;

&lt;p&gt;After cleaning everything up, commenting every non-obvious line, and adding a &lt;code&gt;CONFIGURE HERE&lt;/code&gt; block at the top of each script so non-developers can use them without reading the whole thing, I put the pack together.&lt;/p&gt;

&lt;p&gt;Ten scripts total:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Amazon product search results&lt;/li&gt;
&lt;li&gt;Indeed job listings
&lt;/li&gt;
&lt;li&gt;Zillow for-sale and rental listings&lt;/li&gt;
&lt;li&gt;Twitter/X public profiles and recent tweets&lt;/li&gt;
&lt;li&gt;Cross-site price tracker with email alerts&lt;/li&gt;
&lt;li&gt;LinkedIn public job board (no login needed)&lt;/li&gt;
&lt;li&gt;eBay sold listings with automatic price statistics&lt;/li&gt;
&lt;li&gt;Google News for any topic&lt;/li&gt;
&lt;li&gt;Yelp business listings&lt;/li&gt;
&lt;li&gt;Reddit posts and comments&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every script outputs a clean CSV. Every one has random delays and rotating user-agents built in. Every one is commented well enough to modify without deep Python knowledge. There's a full README with setup instructions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The full pack is $19 → &lt;a href="https://anusiempreciouso.gumroad.com/l/Python_WebScraping_Templates_Pack" rel="noopener noreferrer"&gt;anusiempreciouso.gumroad.com/l/Python_WebScraping_Templates_Pack&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If any script doesn't work as described, I'll fix it or refund you — no back-and-forth.&lt;/p&gt;




&lt;h2&gt;
  
  
  One Honest Note on Legality
&lt;/h2&gt;

&lt;p&gt;Web scraping public data sits in a legal grey area, and I'd rather address that directly than bury a disclaimer.&lt;/p&gt;

&lt;p&gt;US courts have generally upheld the legality of scraping publicly visible data — the hiQ v. LinkedIn ruling being the most significant example. But "generally legal" is not the same as universally fine, and each site has its own Terms of Service.&lt;/p&gt;

&lt;p&gt;My personal guidelines: don't hammer servers (the built-in delays handle this), don't scrape behind authentication, don't republish scraped data as your own product. The scripts are built with these principles as defaults.&lt;/p&gt;




&lt;h2&gt;
  
  
  Going Further
&lt;/h2&gt;

&lt;p&gt;A few things worth knowing if you want to extend any of these:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proxies&lt;/strong&gt; — For high-volume scraping, rotating residential proxies reduce blocking significantly. For the casual research use cases these scripts are built for, you probably don't need them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Playwright/Selenium&lt;/strong&gt; — For sites that render content entirely client-side via JavaScript, you'll eventually need a headless browser. Playwright is the current best option. None of the ten sites I targeted required this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQLite&lt;/strong&gt; — CSV is fine for one-off pulls. If you're running scrapers on a schedule and want queryable historical data, &lt;code&gt;sqlite3&lt;/code&gt; is built into Python and requires no configuration.&lt;/p&gt;

&lt;p&gt;Questions on any of the techniques? Drop them in the comments.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: python, webdev, automation, tutorial, beginners&lt;/em&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>productivity</category>
      <category>python</category>
      <category>webscraping</category>
    </item>
    <item>
      <title>I Got Tired of Checking 4 Websites Before Every Trading Session, So I Automated All of It</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 04:00:08 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/i-got-tired-of-checking-4-websites-before-every-trading-session-so-i-automated-all-of-it-2jjb</link>
      <guid>https://dev.to/preciousanusiem/i-got-tired-of-checking-4-websites-before-every-trading-session-so-i-automated-all-of-it-2jjb</guid>
      <description>&lt;p&gt;Every Sunday evening I'd do the same ritual.&lt;/p&gt;

&lt;p&gt;Open Investing.com for the economic calendar. Check what's dropping Monday morning — NFP, CPI, a Fed speech. Then over to Yahoo Finance to see which earnings reports were coming up that week. Then a crypto tracker to get a feel for where Bitcoin sentiment was sitting. Then back to my notes app to paste everything together so I could actually look at it in one place.&lt;/p&gt;

&lt;p&gt;Forty minutes. Every single week. Just copying data into a doc so I could see the full picture before markets opened.&lt;/p&gt;

&lt;p&gt;I'm a developer. I build things for a living. Why was I doing this manually?&lt;/p&gt;




&lt;h2&gt;
  
  
  The actual problem
&lt;/h2&gt;

&lt;p&gt;The issue isn't that the data doesn't exist. It's everywhere. Investing.com has a great economic calendar. Yahoo Finance has earnings dates. CoinGecko has solid crypto data. The Fear &amp;amp; Greed index from alternative.me is surprisingly useful as a sentiment proxy.&lt;/p&gt;

&lt;p&gt;But each source speaks a different language, has a different layout, and wants you to stay on their site. None of them talk to each other. You can't go to one place and say "show me every high-impact thing happening in markets this week."&lt;/p&gt;

&lt;p&gt;So you end up doing it manually. And if you're trading (even casually), that manual effort is death by a thousand paper cuts.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I wrote a Python scraper that handles all three in one shot. Run one command, get everything.&lt;/p&gt;

&lt;p&gt;Here's what it pulls:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Economic Calendar&lt;/strong&gt; — upcoming events with impact level (1–3), forecast, previous value, and actual once it's released. You can filter by &lt;code&gt;--min-impact 3&lt;/code&gt; to only see the high-impact stuff (NFP, CPI, Fed decisions, etc.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Earnings Calendar&lt;/strong&gt; — upcoming earnings report dates, whether they're BMO (before market open) or AMC (after market close), EPS estimates, revenue estimates, market cap. Works for any ticker or does a broad scan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Crypto Sentiment&lt;/strong&gt; — current price, 24h/7d/30d % change, market cap, volume, and a computed sentiment signal that blends price action with the Fear &amp;amp; Greed index.&lt;/p&gt;

&lt;p&gt;The whole thing exports to CSV, JSON, or Excel. Run it once or schedule it to auto-refresh every hour while you sleep.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install&lt;/span&gt;
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;span class="c"&gt;# Run everything&lt;/span&gt;
python src/trading_scraper.py &lt;span class="nt"&gt;--mode&lt;/span&gt; all

&lt;span class="c"&gt;# Just high-impact economic events, next 2 weeks&lt;/span&gt;
python src/trading_scraper.py &lt;span class="nt"&gt;--mode&lt;/span&gt; economic &lt;span class="nt"&gt;--days&lt;/span&gt; 14 &lt;span class="nt"&gt;--min-impact&lt;/span&gt; 3 &lt;span class="nt"&gt;--output&lt;/span&gt; csv

&lt;span class="c"&gt;# Earnings for specific tickers&lt;/span&gt;
python src/trading_scraper.py &lt;span class="nt"&gt;--mode&lt;/span&gt; earnings &lt;span class="nt"&gt;--ticker&lt;/span&gt; AAPL MSFT NVDA GOOGL

&lt;span class="c"&gt;# Auto-refresh every hour, save everything&lt;/span&gt;
python src/trading_scraper.py &lt;span class="nt"&gt;--mode&lt;/span&gt; all &lt;span class="nt"&gt;--output&lt;/span&gt; all &lt;span class="nt"&gt;--schedule&lt;/span&gt; 3600
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The terminal output looks like this (Rich tables with color-coded impact levels and sentiment):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    📅  Economic Calendar
 ──────────────────────────────────────────────────────────
  Date / Time         Country         Event            Impact
  2024-04-19 12:30    United States   CPI m/m          ●●●
  2024-04-19 18:00    European Union  ECB Rate Decision ●●●
  2024-04-22 12:30    United States   Non-Farm Payrolls ●●●
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The engineering stuff that matters
&lt;/h2&gt;

&lt;p&gt;The first version I wrote was brittle. It worked on my machine on a Tuesday afternoon, and broke the next morning because Investing.com returned a 429 and the whole script died.&lt;/p&gt;

&lt;p&gt;So I rebuilt it properly:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rate limiting per domain&lt;/strong&gt; — each source has its own rate limiter with a configurable delay. Hit the limit and it backs off cleanly rather than hammering the endpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exponential back-off retry&lt;/strong&gt; — three attempts by default, with increasing wait times between them. Transient network errors don't kill your run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-source fallback&lt;/strong&gt; — if the primary source for economic data (FinancialModelingPrep) fails, it falls back to Investing.com. If that fails too, you get demonstration data with a clear warning. The script never just crashes and leaves you with nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structured logging&lt;/strong&gt; — daily log files in a &lt;code&gt;logs/&lt;/code&gt; directory. When something goes wrong at 3am during your overnight run, you have something to debug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;.env&lt;/code&gt; config&lt;/strong&gt; — all tunable settings (request delay, timeout, max retries, API keys) live in a &lt;code&gt;.env&lt;/code&gt; file. No hardcoded values you have to hunt through the code to change.&lt;/p&gt;

&lt;p&gt;The source data is all free. The main optional upgrade is a FinancialModelingPrep API key (free tier, 250 requests/day) which enriches the economic calendar data. Everything else — Yahoo Finance, CoinGecko, alternative.me — works without any key at all.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why not just use a financial data API?
&lt;/h2&gt;

&lt;p&gt;Fair question. Services like Polygon.io, Quandl, or Alpha Vantage exist. But they're either paid, rate-limited to the point of uselessness on free tiers, or they don't cover all three categories I cared about (macro events + earnings + crypto sentiment in one place).&lt;/p&gt;

&lt;p&gt;Building the scraper took longer upfront, but now I have exactly the data I want, in the exact format I want, available whenever I want it. No per-call billing, no dependency on someone else's pricing decisions.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I use it for now
&lt;/h2&gt;

&lt;p&gt;Before I built this, I was checking 4 tabs. Now my Sunday evening routine is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python src/trading_scraper.py &lt;span class="nt"&gt;--mode&lt;/span&gt; all &lt;span class="nt"&gt;--output&lt;/span&gt; all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the Excel file. Three sheets — Economic, Earnings, Crypto. Ten minutes to review, close the laptop, done.&lt;/p&gt;

&lt;p&gt;During the week, I have a cron job that runs it every morning at 7am and drops the fresh data into a folder my Notion integration picks up. Fully hands-off.&lt;/p&gt;

&lt;p&gt;If you trade options, knowing which earnings are BMO vs AMC that week is actually critical — it changes your IV crush timing completely. And having high-impact economic events pre-loaded means you're not caught off guard by a surprise CPI print when you're sitting in a delta-sensitive position.&lt;/p&gt;




&lt;h2&gt;
  
  
  The code + packaged version
&lt;/h2&gt;

&lt;p&gt;I've cleaned this up, added a full test suite (17 tests, all passing), and packaged it with documentation. If you want to use it as-is without digging through the source, I put it on Gumroad: &lt;a href="https://anusiempreciouso.gumroad.com/l/Trading-Data-Scraper-Pro" rel="noopener noreferrer"&gt;https://anusiempreciouso.gumroad.com/l/Trading-Data-Scraper-Pro&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you'd rather build something similar yourself, the approach is pretty standard: &lt;code&gt;requests&lt;/code&gt; + &lt;code&gt;BeautifulSoup&lt;/code&gt; + &lt;code&gt;rich&lt;/code&gt; for the terminal UI. The CoinGecko and alternative.me APIs are both free and well-documented. The trickiest part is the rate limiting — if you skip that, you'll get banned from sources within a few runs.&lt;/p&gt;

&lt;p&gt;Happy to answer questions about the implementation. Specifically around the FMP vs Investing.com source strategy, the rate limiter design, or the scheduler — those were the parts that took the most iteration to get right.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The packaged version includes the scraper, full CLI reference, .env config, unit tests, and a README. No mandatory API key required to start running.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>productivity</category>
      <category>showdev</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>The Maths Behind Prop Firm Challenge Failures (And How to Fix It With Code)</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 03:48:52 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/the-maths-behind-prop-firm-challenge-failures-and-how-to-fix-it-with-code-4pon</link>
      <guid>https://dev.to/preciousanusiem/the-maths-behind-prop-firm-challenge-failures-and-how-to-fix-it-with-code-4pon</guid>
      <description>&lt;p&gt;Most prop firm challenge post-mortems I've read online are vague. "I overtraded." "I didn't respect my drawdown." "I was emotional."&lt;/p&gt;

&lt;p&gt;Helpful. Thanks.&lt;/p&gt;

&lt;p&gt;This post is going to be specific. I want to walk through the actual numbers behind why challenges fail, show you the formulas that fix the most common problems, and share how an MT5 expert advisor can enforce the rules you already know but consistently break under pressure.&lt;/p&gt;

&lt;p&gt;If you trade or are thinking about attempting a prop firm challenge, this is the quantitative breakdown nobody writes.&lt;/p&gt;




&lt;h2&gt;
  
  
  First: What the Challenge Structure Actually Optimises For
&lt;/h2&gt;

&lt;p&gt;A standard two-phase prop firm challenge looks like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;Profit Target&lt;/th&gt;
&lt;th&gt;Max Daily Loss&lt;/th&gt;
&lt;th&gt;Max Total Drawdown&lt;/th&gt;
&lt;th&gt;Min Trading Days&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Phase 1&lt;/td&gt;
&lt;td&gt;8–10%&lt;/td&gt;
&lt;td&gt;4–5%&lt;/td&gt;
&lt;td&gt;8–10%&lt;/td&gt;
&lt;td&gt;4–10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 2&lt;/td&gt;
&lt;td&gt;4–5%&lt;/td&gt;
&lt;td&gt;4–5%&lt;/td&gt;
&lt;td&gt;8–10%&lt;/td&gt;
&lt;td&gt;4–10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Funded&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;4–5%&lt;/td&gt;
&lt;td&gt;8–10%&lt;/td&gt;
&lt;td&gt;Ongoing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The asymmetry here is worth noticing. The profit target is fixed and achievable. The drawdown limits are permanent (total DD doesn't reset) and zero-tolerance (one breach and it's over).&lt;/p&gt;

&lt;p&gt;This structure rewards consistency over aggression. The optimal play is not to maximise profit per unit time — it's to maximise the probability of staying within the loss boundaries while accumulating gains.&lt;/p&gt;

&lt;p&gt;Which means it's fundamentally an optimisation problem, not a prediction problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Position Sizing Formula (And Why Most Traders Get It Wrong)
&lt;/h2&gt;

&lt;p&gt;The most common quantitative mistake I see in challenge attempts is fixed lot sizing. "I trade 0.1 lots on EUR/USD" — regardless of what the market is doing.&lt;/p&gt;

&lt;p&gt;The correct formula:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Position Size (lots) = (Account Balance × Risk %) ÷ (Stop Loss in pips × Pip Value per lot)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's run this properly for a few scenarios on a $10,000 account at 1% risk:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EUR/USD — Low Volatility Day (ATR: 35 pips)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Stop Loss = 1.5 × 35 = 52.5 pips
Position Size = $100 ÷ (52.5 × $10) = 0.19 lots
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;EUR/USD — High Volatility Day (ATR: 80 pips)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Stop Loss = 1.5 × 80 = 120 pips
Position Size = $100 ÷ (120 × $10) = 0.08 lots
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same instrument, same 1% risk, same entry logic — and the position size varies by more than 2×. If you're using a fixed 0.1 lot size, on high-volatility days you're actually risking ~1.9%, and on low-volatility days you're leaving risk on the table or being stopped out by normal noise.&lt;/p&gt;

&lt;p&gt;This is why ATR-based stop losses matter so much in a challenge context. Your risk per trade needs to be real, not nominal.&lt;/p&gt;




&lt;h2&gt;
  
  
  Simulating the Drawdown Risk at Different Position Sizes
&lt;/h2&gt;

&lt;p&gt;Let's model what consecutive losing trades look like at different risk percentages on a $10,000 challenge account with a 10% total drawdown limit ($1,000 max loss):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;simulate_drawdown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;risk_pct&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n_losses&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_dd_pct&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;max_dd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_dd_pct&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;current_balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt;
    &lt;span class="n"&gt;total_loss&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n_losses&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;loss&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current_balance&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;risk_pct&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;current_balance&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="n"&gt;loss&lt;/span&gt;
        &lt;span class="n"&gt;total_loss&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;loss&lt;/span&gt;
        &lt;span class="n"&gt;remaining_buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;max_dd&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;total_loss&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Loss &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: Balance $&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;current_balance&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; | &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
              &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Total DD: $&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;total_loss&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; | Buffer left: $&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;remaining_buffer&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;total_loss&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;max_dd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CHALLENGE FAILED at loss &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;

&lt;span class="c1"&gt;# At 1% risk
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;=== 1% Risk per Trade ===&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;simulate_drawdown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;=== 2% Risk per Trade ===&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;simulate_drawdown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;2.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=== 1% Risk per Trade ===
Loss 1: Balance $9900.00 | Total DD: $100.00 | Buffer left: $900.00
Loss 2: Balance $9801.00 | Total DD: $199.00 | Buffer left: $801.00
...
Loss 10: Balance $9043.82 | Total DD: $956.18 | Buffer left: $43.82
(Still alive after 10 consecutive losses)

=== 2% Risk per Trade ===
Loss 1: Balance $9800.00 | Total DD: $200.00 | Buffer left: $800.00
...
Loss 5: Balance $9039.21 | Total DD: $960.79 | Buffer left: $39.21
Loss 6: ...
CHALLENGE FAILED at loss 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference between 1% and 2% risk isn't 2× the danger — it's the difference between surviving 10 consecutive losses and failing on the 6th. In a challenge context, those six losses can happen in two bad trading days.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Daily Drawdown Problem Is More Subtle Than People Think
&lt;/h2&gt;

&lt;p&gt;Most traders focus on total drawdown but the daily limit is what ends the majority of challenges. Here's why:&lt;/p&gt;

&lt;p&gt;Suppose you're at a $10,000 account and you've had three moderately bad days — down 2.5% total, sitting at $9,750. You now have $750 of total DD buffer remaining.&lt;/p&gt;

&lt;p&gt;Your firm's daily loss limit is 5% of the day's opening balance. But your personal available daily budget is now constrained by two things simultaneously:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The firm's daily limit: $10,000 × 5% = $500&lt;/li&gt;
&lt;li&gt;Your remaining total DD buffer: $750&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you lose more than $500 today, you breach the daily limit regardless of total DD. If you've had one particularly bad day earlier in the challenge and you're at $9,300, your total buffer ($700) is actually tighter than the daily limit on some days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The correct daily maximum loss to trade to is: &lt;code&gt;min(firm_daily_limit, remaining_total_dd_buffer × 0.5)&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Never put more than half your remaining total buffer at risk in a single day. This gives you at least two more bad days before failure, rather than one.&lt;/p&gt;




&lt;h2&gt;
  
  
  How GlimTrader Pro Handles This Automatically
&lt;/h2&gt;

&lt;p&gt;After working through all of this manually for a while, I started using GlimTrader Pro — an MT5 expert advisor specifically built for prop firm challenges. I want to be specific about how it solves the problems above rather than just saying "it does risk management."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ATR-based position sizing:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Pseudocode of the sizing logic&lt;/span&gt;
&lt;span class="n"&gt;atr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;iATR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeframe&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;stop_distance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;atr&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;ATR_SL_Multiplier&lt;/span&gt;  &lt;span class="c1"&gt;// default 1.5&lt;/span&gt;
&lt;span class="n"&gt;pip_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SymbolInfoDouble&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SYMBOL_TRADE_TICK_VALUE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;risk_amount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AccountBalance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RiskPercentage&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;lot_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;risk_amount&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stop_distance&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;pip_value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;lot_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;MathMin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lot_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;MaxLotSize&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;lot_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;MathMax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lot_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;MinLotSize&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This runs on every entry signal. You never manually set the lot size.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Daily loss enforcement:&lt;/strong&gt;&lt;br&gt;
The EA tracks &lt;code&gt;g_dailyLoss&lt;/code&gt; against &lt;code&gt;MaxDailyLossPercent&lt;/code&gt;. When the threshold is crossed, &lt;code&gt;CheckDailyLimits()&lt;/code&gt; returns &lt;code&gt;true&lt;/code&gt; and the entry logic is blocked for the rest of the day. There's no override because there's no UI element to override it with — the decision is made before the session starts via the parameter, not in the moment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The 6-factor signal confluence system:&lt;/strong&gt;&lt;br&gt;
The EA only opens trades when all of the following align:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EMA stack: Fast(8) &amp;gt; Slow(21) &amp;gt; Trend(50) for longs&lt;/li&gt;
&lt;li&gt;H4 timeframe EMA(50) in agreement (when UseMultiTimeframeConfirm = true)
&lt;/li&gt;
&lt;li&gt;MACD histogram showing momentum in signal direction&lt;/li&gt;
&lt;li&gt;RSI not in overbought/oversold zone&lt;/li&gt;
&lt;li&gt;Price within Bollinger Bands (20, 2.0)&lt;/li&gt;
&lt;li&gt;Previous candle confirms direction (when RequireCandleConfirmation = true)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The multi-factor requirement naturally reduces trade frequency, which in a challenge context is usually a feature not a bug. Fewer trades means fewer opportunities to breach the daily limit.&lt;/p&gt;


&lt;h2&gt;
  
  
  Optimal Parameters for Each Challenge Phase
&lt;/h2&gt;

&lt;p&gt;This is what I run — and what I include in the configuration guide bundled with the EA:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt; &lt;span class="err"&gt;Phase&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt; &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &lt;span class="err"&gt;2&lt;/span&gt; &lt;span class="err"&gt;—&lt;/span&gt; &lt;span class="err"&gt;Conservative&lt;/span&gt;
&lt;span class="py"&gt;RiskPercentage&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;0.75&lt;/span&gt;
&lt;span class="py"&gt;MaxDailyLossPercent&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;3.0       // buffer below firm's 4-5%&lt;/span&gt;
&lt;span class="py"&gt;MaxDailyProfitPercent&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;5.0     // stop trading after good days&lt;/span&gt;
&lt;span class="py"&gt;MaxConcurrentTrades&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="py"&gt;UseMultiTimeframeConfirm&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;RequireCandleConfirmation&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;ATR_SL_Multiplier&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;1.5&lt;/span&gt;
&lt;span class="py"&gt;ATR_TP_Multiplier&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;3.0         // enforces minimum 2:1 R:R&lt;/span&gt;
&lt;span class="py"&gt;UseBreakeven&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;BreakevenTriggerATR&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;1.0&lt;/span&gt;
&lt;span class="py"&gt;UseTrailingStop&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;TradeLondonSession&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;TradeNewYorkSession&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;TradeAsiaSession&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;false&lt;/span&gt;
&lt;span class="py"&gt;MaxSpreadPoints&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;30&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key ones most people configure wrong:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MaxDailyProfitPercent&lt;/strong&gt; — stopping after a profitable day sounds counterintuitive but it prevents the single most common way traders give back gains: continuing to trade an already-volatile session after a strong run, often in worse conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TradeAsiaSession = false&lt;/strong&gt; — the Asia session has lower volume and more erratic price action for EUR/USD and major pairs. The signal quality drops and spread quality worsens. Turning this off removes a category of trades that have worse expected value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MaxConcurrentTrades = 1&lt;/strong&gt; — stacking two 1% positions is a 2% position. This one line prevents silent leverage creep.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Firm-Specific Settings That Matter
&lt;/h2&gt;

&lt;p&gt;Not all firms have identical rules. Here's what changes by platform:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Firm&lt;/th&gt;
&lt;th&gt;Daily DD&lt;/th&gt;
&lt;th&gt;Max DD&lt;/th&gt;
&lt;th&gt;Trailing DD&lt;/th&gt;
&lt;th&gt;MaxDailyLossPercent Setting&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;FTMO&lt;/td&gt;
&lt;td&gt;5%&lt;/td&gt;
&lt;td&gt;10%&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;3.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The Funded Trader&lt;/td&gt;
&lt;td&gt;5%&lt;/td&gt;
&lt;td&gt;10%&lt;/td&gt;
&lt;td&gt;Yes (from equity high)&lt;/td&gt;
&lt;td&gt;3.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E8 Funding&lt;/td&gt;
&lt;td&gt;5%&lt;/td&gt;
&lt;td&gt;8%&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;3.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Apex Trader&lt;/td&gt;
&lt;td&gt;3%&lt;/td&gt;
&lt;td&gt;6%&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;1.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Topstep FX&lt;/td&gt;
&lt;td&gt;2%&lt;/td&gt;
&lt;td&gt;6%&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;1.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The trailing drawdown at The Funded Trader is the one that catches people most often. If your equity reaches $10,800 and then pulls back to $10,000, you've used $800 of your $1,000 trailing DD limit — even though you're still above your starting balance. The practical adjustment is to treat +3% days as a signal to stop trading, not to continue pushing.&lt;/p&gt;




&lt;h2&gt;
  
  
  If You Want the Full System
&lt;/h2&gt;

&lt;p&gt;I put together a detailed guide covering all of this — the drawdown maths, position sizing formulas, firm-specific settings, a printable daily tracker, and full GlimTrader Pro configuration for each phase and each major firm. It's available on Gumroad at a flat rate, bundled with the EA.&lt;/p&gt;

&lt;p&gt;Not trying to upsell — I'm sharing it because working through this stuff analytically (the way this post tries to) is what finally made the difference after three failed challenges. The guide documents all of it in one place.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://anusiempreciouso.gumroad.com/l/PassProp-Firm-Challenges-Faster" rel="noopener noreferrer"&gt;GlimTrader Pro — Pass Prop Firm Challenges Faster →&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If you're working through the maths on your own challenge setup and have questions, drop them in the comments. Happy to go deeper on any of the formulas or the EA configuration logic.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>automation</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How I Turned ChatGPT Into a Brutally Honest Trading Coach (The Prompts That Actually Work)</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 03:35:34 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/how-i-turned-chatgpt-into-a-brutally-honest-trading-coach-the-prompts-that-actually-work-5emk</link>
      <guid>https://dev.to/preciousanusiem/how-i-turned-chatgpt-into-a-brutally-honest-trading-coach-the-prompts-that-actually-work-5emk</guid>
      <description>&lt;p&gt;I trade stocks and forex alongside a day job. Been doing it a few years. For the past several months I've been using ChatGPT and Claude as a structured part of my daily trading routine — not to get signals, not to predict prices, but as a thinking partner with specific, repeatable workflows.&lt;/p&gt;

&lt;p&gt;There's a way to do this that actually works, and a way that wastes your time. Here's the difference.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why most traders get nothing useful from AI
&lt;/h2&gt;

&lt;p&gt;Ask ChatGPT "should I buy AAPL?" and you'll get something like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"AAPL has strong fundamentals, but as with any investment, you should consider your personal risk tolerance and consult a qualified financial advisor."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Useless. But it's not the AI's fault — it's the prompt's fault.&lt;/p&gt;

&lt;p&gt;Trading decisions require context the AI doesn't have unless you give it: your entry and stop prices, your account size, your timeframe, the current chart structure, and your emotional state. Feed it those inputs with a structured request and a defined output format, and you get a completely different quality of response.&lt;/p&gt;

&lt;p&gt;The pattern I use for every prompt I build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Context block — everything the AI needs to know
2. Specific request — exactly what I want analysed
3. Output format — exactly how I want it structured
4. Constraint — "be direct, no hedging, no flattery"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are the prompts that made it into my permanent rotation.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Pre-Market Plan
&lt;/h2&gt;

&lt;p&gt;Every morning before open. Fill in the variables, run it, print the output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build my pre-market plan for today, [DATE].

Watchlist: [TICKERS]
Market context: [overnight moves, macro events, VIX level]
My strategy: [your approach in plain English]
Account status: [e.g. up 2R this week / at daily loss limit / fresh]

Structure the plan as:
1. MARKET BIAS — overall tone and what it means for my tickers
2. PER-TICKER LEVELS — key S/R zones, what I need to see to trade
3. SCENARIOS — bull case and bear case for today's session
4. TODAY'S RULES — specific rules given current conditions
5. PASS/TRADE DECISION TREE — criteria for trading vs sitting on hands

Concise. Actionable. Printable.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Takes four minutes. The output is a written session plan I trade from. Before this habit I was opening my platform cold and reacting to whatever moved. Now I have a plan before the open, and the number of impulsive trades I take has dropped measurably.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Post-Trade Journal Entry
&lt;/h2&gt;

&lt;p&gt;This one changed my journaling consistency more than anything else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I just closed a trade. Raw details:

Ticker: [TICKER] | Direction: [LONG/SHORT] | Timeframe: [TF]
Entry: [PRICE] | Exit: [PRICE] | Stop: [PRICE] | TP: [PRICE]
P&amp;amp;L: [$X] | R-Multiple: [e.g. +1.8R or -1R]
Emotional state during the trade: [honest — e.g. "anxious, wanted to exit early at +1R"]

Generate a structured journal entry:
1. TRADE SUMMARY (2–3 factual sentences)
2. SETUP QUALITY SCORE (1–10 with explanation)
3. EXECUTION QUALITY SCORE (did I follow my plan?)
4. PSYCHOLOGICAL AUDIT (what emotions influenced my decisions?)
5. KEY LESSON (one specific, actionable takeaway)
6. REPLICATE / AVOID

Write as a direct trading coach. No flattery.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last line — &lt;em&gt;"No flattery"&lt;/em&gt; — is doing a lot of heavy lifting. Without it, AI finds the silver lining in every bad trade. With it, you get the honest post-mortem you actually need.&lt;/p&gt;

&lt;p&gt;I've journaled every trade for four months straight because this prompt removed all the friction. Consistency has compounded.&lt;/p&gt;




&lt;h2&gt;
  
  
  Position Size Calculator
&lt;/h2&gt;

&lt;p&gt;Before every trade, without exception:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Calculate my exact position size and give me a full risk summary.

Account balance: $[BALANCE]
Risk per trade: [RISK %]% of account
Entry: $[ENTRY] | Stop: $[STOP] | Target: $[TARGET]
Instrument type: [STOCKS / FOREX / CRYPTO / FUTURES]

Calculate and return:
1. Dollar amount at risk: $X
2. Correct position size (shares/units/contracts): X
3. R:R ratio: X:1
4. Break-even win rate required at this R:R: X%
5. Portfolio heat (% of total account in this position): X%

Flag any concerns. Is this sizing appropriate for the setup?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The math is simple enough to do mentally. The point is being forced to read the numbers back as a structured output before you enter. How often do you &lt;em&gt;think&lt;/em&gt; you know your R:R without actually calculating it? More often than you'd admit.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Stop Loss Placement Prompt
&lt;/h2&gt;

&lt;p&gt;When you're unsure exactly where to put your stop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Help me place my stop loss for this trade.

Ticker: [TICKER] | Direction: [LONG/SHORT] | Timeframe: [TF]
Entry: [PRICE] | Setup type: [e.g. breakout retest, support bounce]
Nearest support below entry: [LEVEL]
Nearest resistance above entry: [LEVEL]
My target: [PRICE] | Risk per trade: [%]%

Give me:
1. Logical stop loss price with reasoning
2. Why this is the structural invalidation level (not arbitrary)
3. The R:R this placement gives me
4. Whether R:R is worth taking or I should skip this trade
5. The most common stop placement mistake for this setup type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key thing this prompt does: forces you to think about the stop as a &lt;em&gt;structural invalidation level&lt;/em&gt;, not a random number below entry. That shift in framing alone is worth running it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Revenge Trading Circuit Breaker
&lt;/h2&gt;

&lt;p&gt;The one I use most but talk about least:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I just took a [R-MULTIPLE] loss on [TICKER].
I'm feeling [HONEST EMOTIONAL STATE — e.g. "frustrated, want to get it back"].
I have the urge to re-enter immediately or find another trade.

1. IMMEDIATE INTERVENTION — what do I do in the next 10 minutes?
2. PHYSIOLOGICAL RESET — a specific 3-step process to calm my system
3. RATIONAL REALITY CHECK — reframe this loss in context of my account and stats
4. DECISION GATE — 5 questions I must answer YES to before trading again today
5. HONEST RECOMMENDATION — should I close the platform for today?

Be direct. My capital is at stake.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Impulsive trades after losses are one of the most common ways retail traders turn a manageable bad day into a blown week. Having something that interrupts that loop — even just 60 seconds of reading a structured response — has stopped enough bad decisions that it's earned a permanent spot in my workflow.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Monthly Bias Audit
&lt;/h2&gt;

&lt;p&gt;Run this once a month. Describe your own behaviour honestly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Act as a professional trading psychologist.

I will describe my recent trading behaviour. Identify my top 3
cognitive biases with specific evidence from my descriptions.

My recent behaviour:
[DESCRIBE IN DETAIL — be specific and honest. Examples:
 "I move my stop when price gets close to it."
 "I exit winners before target when I'm up 1R."
 "I hold losing trades far longer than my rules allow."]

For each bias:
1. Name it precisely
2. Show the specific evidence from my description
3. The psychological root cause
4. One countermeasure I can implement this week
5. A self-check question to ask before each trade

Then create a BIAS WATCHLIST — 3 items I can print and keep at my desk.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is uncomfortable to read. That's the point. You already know your patterns. This makes you write them down, name them, and get a specific plan to address each one.&lt;/p&gt;




&lt;h2&gt;
  
  
  What this won't do
&lt;/h2&gt;

&lt;p&gt;Worth being clear:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI cannot read your charts — only what you describe to it&lt;/li&gt;
&lt;li&gt;It won't create an edge where none exists&lt;/li&gt;
&lt;li&gt;It can be wrong, especially on calculations — always verify&lt;/li&gt;
&lt;li&gt;It's a thinking tool, not an authority&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The value is in consistency, structure, and honest self-assessment — not signals.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Pack
&lt;/h2&gt;

&lt;p&gt;I built 15 of these prompts — refined over months of actual daily use — into a PDF. Fully selectable text, copy-paste ready, each one with a real example output so you know what a useful response looks like.&lt;/p&gt;

&lt;p&gt;Covers: price action analysis, trade journaling, risk management, psychology, and strategy validation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;→ &lt;a href="https://anusiempreciouso.gumroad.com/l/TraderMind_AI_Prompt" rel="noopener noreferrer"&gt;https://anusiempreciouso.gumroad.com/l/TraderMind_AI_Prompt&lt;/a&gt; — $17 one-time&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Or use the prompts above and build your own. The pattern is the same throughout: context + specific request + output format + no-hedging constraint.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Not financial advice. These are process and thinking tools — not signals or trading recommendations.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>chatgpt</category>
      <category>career</category>
    </item>
    <item>
      <title>I Build Custom Trading Bots for Deriv and MT4/MT5 — Here's What That Actually Looks Like</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 03:17:49 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/title-i-build-custom-trading-bots-for-deriv-and-mt4mt5-heres-what-that-actually-looks-like-na5</link>
      <guid>https://dev.to/preciousanusiem/title-i-build-custom-trading-bots-for-deriv-and-mt4mt5-heres-what-that-actually-looks-like-na5</guid>
      <description>&lt;p&gt;Let me tell you about an order I completed two weeks ago because it's a good illustration of what this work actually involves.&lt;/p&gt;

&lt;p&gt;A trader in South Africa — manual EUR/USD strategy, 15-minute chart, EMA crossover with RSI confirmation — needed his system running during London open. He works days. London open is 9 AM GMT, which means he's already two hours into his workday by the time the best setups show up. Two years of solid manual results, locked behind a scheduling problem.&lt;/p&gt;

&lt;p&gt;He sent me his rules. I built it. Eight days later he had a Python bot running his exact strategy, logging every trade to SQLite, firing Telegram alerts to his phone, with a full risk management module that mirrors how he trades manually: 1% per trade, 2.5% daily loss ceiling, hard stop.&lt;/p&gt;

&lt;p&gt;That's the job. Here's everything else worth knowing about it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The technical stack I work with
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;For Deriv (binary options + synthetic indices):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python 3.11 over the Deriv WebSocket API (&lt;code&gt;wss://ws.binaryws.com/websockets/v3&lt;/code&gt;). Async tick subscriptions, rolling buffer for indicator calculation, SQLite for trade and P&amp;amp;L persistence, Telegram Bot API for alerts. Deployed on Render's free tier for 24/7 operation.&lt;/p&gt;

&lt;p&gt;The architecture I've settled on after building several of these:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Simplified core loop structure
&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;on_tick&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tick_data&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;symbol&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tick_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;symbol&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;price&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tick_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;quote&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="n"&gt;buffers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;MIN_BUFFER&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;  &lt;span class="c1"&gt;# Not enough data yet
&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nf"&gt;safety_checks_pass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;  &lt;span class="c1"&gt;# Daily limits, cooldown, concurrent cap
&lt;/span&gt;
    &lt;span class="n"&gt;signal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;score_signal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;execute_layered_entry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;notify_telegram&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;log_to_db&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything safety-critical — daily P&amp;amp;L, drawdown tracking, signal count — goes to SQLite, not memory. A bot that resets its daily loss counter on crash is a bot that will eventually blow an account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For MT4/MT5:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MQL4 or MQL5 depending on the client's platform. I have 5 EAs published on the MQL5 Marketplace so this is well-trodden territory. The delivery is a compiled &lt;code&gt;.ex4&lt;/code&gt; or &lt;code&gt;.ex5&lt;/code&gt; file plus the source &lt;code&gt;.mq4&lt;/code&gt;/&lt;code&gt;.mq5&lt;/code&gt;. Clients who want to see under the hood get the source. Clients who just want it running get the compiled file plus the parameter documentation.&lt;/p&gt;




&lt;h2&gt;
  
  
  The signal architecture I apply across most builds
&lt;/h2&gt;

&lt;p&gt;Most bots I'm asked to build fall into one of two categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mean reversion&lt;/strong&gt; (typical for synthetic indices — Deriv's Volatility 10, Volatility 25):&lt;br&gt;
Price oscillates. You detect overextension and bet on the return to mean. The indicators that matter here: RSI at extremes, Bollinger Band touches, Rate of Change fading at a peak. Weighted scoring so no single indicator fires a trade alone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trend following&lt;/strong&gt; (typical for real forex pairs — EUR/USD, GBP/USD, XAU/USD):&lt;br&gt;
Price trends directionally. You identify the trend, wait for a pullback, enter in the trend direction. EMA crossovers for trend identification, RSI for momentum confirmation, direction flip detection for pullback entry.&lt;/p&gt;

&lt;p&gt;The scoring system I built for my own Deriv bot (the one that hit 71% live) works like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

&lt;span class="c1"&gt;# RSI scoring
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rsi&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;78&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;             &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;rsi&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;70&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;           &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rsi&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;             &lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;rsi&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;           &lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="c1"&gt;# Bollinger Bands
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;upper_bb&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.999&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;lower_bb&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;1.001&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;

&lt;span class="c1"&gt;# Rate of Change momentum
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;roc&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.02&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;roc&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;0.02&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="c1"&gt;# Direction flip (pullback detection)
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;flipped_to_down&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;flipped_to_up&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;     &lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="c1"&gt;# Only fire on unambiguous signals
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;rise_score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;fire_trade&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;FALL&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;fire_trade&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RISE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I adapt this framework to each client's specific logic. The scoring threshold and weights change. The indicators change. The underlying architecture — requiring convergence before firing, never a single trigger — stays.&lt;/p&gt;




&lt;h2&gt;
  
  
  What the risk module always includes
&lt;/h2&gt;

&lt;p&gt;Non-negotiable on every build, regardless of tier:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;pre_trade_safety_check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;daily_pnl&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;daily_loss_limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Daily loss limit reached&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;daily_pnl&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;daily_profit_target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Daily profit target reached&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;concurrent_signals&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_concurrent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Max concurrent positions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="n"&gt;elapsed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;last_signal_time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;elapsed&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cooldown_seconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cooldown active (&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;elapsed&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;s elapsed)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;daily_signal_count&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_daily_signals&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Daily signal cap reached&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OK&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Daily loss limit, daily profit target, concurrent position cap, per-symbol cooldown, daily signal cap. These are all configurable by client parameters. The structure itself is fixed.&lt;/p&gt;

&lt;p&gt;The persistence layer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;update_daily_pnl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pnl_delta&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
        INSERT INTO daily_pnl (date, pnl)
        VALUES (?, ?)
        ON CONFLICT(date) DO UPDATE SET pnl = pnl + excluded.pnl
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pnl_delta&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;commit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_daily_pnl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT pnl FROM daily_pnl WHERE date = ?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,)&lt;/span&gt;
    &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;fetchone&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SQLite upsert on every trade close. If the process restarts at any point during the day, the daily P&amp;amp;L is accurate. Risk limits are never bypassed by a crash.&lt;/p&gt;




&lt;h2&gt;
  
  
  The three-tier service
&lt;/h2&gt;

&lt;p&gt;I run this as a custom development service on Gumroad. Three tiers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Starter — $200&lt;/strong&gt;&lt;br&gt;
Single-indicator logic, one asset, basic SL/TP, 5–7 day delivery. For traders who have a simple, clearly defined system. Good entry point if you want to test the process before a larger order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Standard — $350&lt;/strong&gt;&lt;br&gt;
Multi-indicator signal engine, up to three assets, full risk management module (daily limits, position sizing, cooldowns), Telegram integration, SQLite logging. 7–10 days. This covers 80% of what people actually need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Premium — $500&lt;/strong&gt;&lt;br&gt;
Any complexity. No asset limit, advanced logic, video walkthrough of the full codebase, 30-day support. For traders with complex multi-market systems who want everything documented thoroughly.&lt;/p&gt;

&lt;p&gt;Every tier includes full annotated source code. Not compiled-only. You own the code, you understand the code, you can modify it yourself or bring it to any developer.&lt;/p&gt;

&lt;p&gt;The process after purchase: you get a client intake form immediately. You describe your strategy in plain English — no coding knowledge required, just your rules. I review it within 24 hours, confirm scope in writing, and start building.&lt;/p&gt;




&lt;h2&gt;
  
  
  The questions I get most often from devs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Can I just buy the code and modify it myself?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want the architecture as a starting point, the Standard tier gives you a well-structured, commented codebase you can extend. A lot of developers order because they want to skip the scaffolding: the WebSocket connection handling, the indicator calculation library, the SQLite schema, the Telegram integration. All of that is already done. They add their signal logic on top.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Can you add X feature after delivery?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Bug fixes are covered in the support window. New features — adding an asset, adding an indicator, changing the strategy type — are new orders. I'm clear about this upfront so there are no misunderstandings at delivery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Do you do revenue share instead of flat fee?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. I charge for my time and expertise. Revenue share creates misaligned incentives — it puts me in a position of having financial exposure to a strategy's market performance, which I can't control. Flat fee, clean relationship.&lt;/p&gt;




&lt;h2&gt;
  
  
  One thing worth saying clearly
&lt;/h2&gt;

&lt;p&gt;The 71% win rate people see on my Deriv bot article is real. It's also 24 trades, which is meaningful but not statistically conclusive. I say this in the article and I'll say it here.&lt;/p&gt;

&lt;p&gt;What I can guarantee for custom orders is that the code is correct — it does exactly what was specified, tested, and documented. I can't guarantee that a client's strategy has a positive edge in the market. That part is on the strategy, not the implementation.&lt;/p&gt;

&lt;p&gt;If you're not sure whether your strategy has an edge, trading it manually on demo for a few weeks before commissioning a bot is always the right call. I'd rather you have confidence in your logic before we build than discover problems post-delivery.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where to find the service
&lt;/h2&gt;

&lt;p&gt;It's on Gumroad: &lt;strong&gt;&lt;a href="https://anusiempreciouso.gumroad.com/l/PassProp-Firm-Challenges-Faster" rel="noopener noreferrer"&gt;gumroad.com/preciousanusiem&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Questions before purchasing, clarifications about whether your strategy is in scope, or anything else — I respond to everything.&lt;/p&gt;

&lt;p&gt;📧 &lt;a href="mailto:preciousanusiem.o.1@gmail.com"&gt;preciousanusiem.o.1@gmail.com&lt;/a&gt;&lt;br&gt;
🔗 GitHub: github.com/PreciousAnusiem&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you've built something in this space — custom EAs, Python trading systems, Deriv bots — I'd genuinely like to hear about the engineering decisions you made. Drop it in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>playwright</category>
      <category>automation</category>
      <category>career</category>
    </item>
    <item>
      <title>I Built a Deriv Bot That Wins 71% of the Time — Here's the Complete Strategy (With Code)</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 02:28:29 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/i-built-a-deriv-bot-that-wins-71-of-the-time-heres-the-complete-strategy-with-code-3b9c</link>
      <guid>https://dev.to/preciousanusiem/i-built-a-deriv-bot-that-wins-71-of-the-time-heres-the-complete-strategy-with-code-3b9c</guid>
      <description>&lt;p&gt;⏱ &lt;strong&gt;12 min read&lt;/strong&gt; · 🏷 &lt;code&gt;deriv bot&lt;/code&gt; &lt;code&gt;binary options&lt;/code&gt; &lt;code&gt;python trading bot&lt;/code&gt; &lt;code&gt;dbot strategy&lt;/code&gt; &lt;code&gt;algorithmic trading&lt;/code&gt; &lt;code&gt;volatility index&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Why I Built This (And Why Most Deriv Bots Fail)&lt;/li&gt;
&lt;li&gt;The Markets: What I Trade and Why&lt;/li&gt;
&lt;li&gt;The Signal Engine: Multi-Factor Scoring Explained&lt;/li&gt;
&lt;li&gt;Synthetic Index Logic (V10 / V25)&lt;/li&gt;
&lt;li&gt;Forex and Gold Logic (Higher/Lower)&lt;/li&gt;
&lt;li&gt;The 3-Trade Layered Entry System&lt;/li&gt;
&lt;li&gt;Risk Management: The Rules That Keep You Alive&lt;/li&gt;
&lt;li&gt;XML / DBot Configuration Structure&lt;/li&gt;
&lt;li&gt;Live Results and Evidence&lt;/li&gt;
&lt;li&gt;What This Strategy Cannot Do&lt;/li&gt;
&lt;li&gt;Get the Full $47 Guide&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Why Most Deriv Bots Fail (And What I Did Differently) {#why-most-deriv-bots-fail}
&lt;/h2&gt;

&lt;p&gt;I have been building automated trading systems for three years. In that time I watched hundreds of Deriv bot strategies — in Telegram groups, on YouTube, in forums — fail for the same predictable reasons.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mistake 1 — Single-indicator trading.&lt;/strong&gt;&lt;br&gt;
Someone builds a bot that fires on RSI alone. It works for two days. Then the market spends three days ranging in a tight band and the bot destroys the account placing trades on false signals. One indicator is not a strategy. It is a coin flip with extra steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mistake 2 — Martingale with no ceiling.&lt;/strong&gt;&lt;br&gt;
Martingale — doubling stake after every loss — works beautifully until you hit five or six consecutive losses. Without a hard ceiling, one bad session erases three weeks of profit. I have seen this happen to traders with otherwise solid strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mistake 3 — Wrong contract type for the market.&lt;/strong&gt;&lt;br&gt;
Deriv's synthetic indices and real forex/gold pairs behave completely differently. A Rise/Fall strategy optimised for a synthetic volatility index will underperform on EUR/USD, where trend-following Higher/Lower contracts are significantly more effective. Most bots pick one approach and apply it everywhere.&lt;/p&gt;

&lt;p&gt;My bot solves all three. Here is how.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Markets: What I Trade and Why {#market-selection}
&lt;/h2&gt;

&lt;p&gt;The bot monitors &lt;strong&gt;six markets simultaneously&lt;/strong&gt;, split into two categories with different logic for each.&lt;/p&gt;
&lt;h3&gt;
  
  
  Synthetic Volatility Indices — Rise/Fall
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;V10 (1s) — symbol: 1HZ10V&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The V10 (1 second) index runs 24/7, including weekends. It has no external news risk, no liquidity gaps on market open, and no weekend gaps. The tick pattern is controlled and oscillates with a measured pace — which makes it ideal for &lt;strong&gt;mean-reversion&lt;/strong&gt; signals: detecting when price has moved to an extreme and betting on its return to the mean.&lt;/p&gt;

&lt;p&gt;I use &lt;strong&gt;Rise/Fall contracts&lt;/strong&gt; on V10. Here is the key reason: V10 is not a trending asset. It reverses. Rise/Fall contracts capture peak-to-trough moves exactly as designed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why not V75 or V100?&lt;/strong&gt;&lt;br&gt;
V75 and V100 move too fast. Signal noise dominates. Entries get eaten by volatility before the logic resolves. V10 is the sweet spot — enough movement to generate signals, controlled enough that those signals hold.&lt;/p&gt;
&lt;h3&gt;
  
  
  Real Forex and Gold Pairs — Higher/Lower
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;EUR/USD · USD/JPY · XAU/USD · GBP/USD · AUD/USD&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Real pairs &lt;strong&gt;trend&lt;/strong&gt;. They have directional momentum. Higher/Lower contracts on Deriv let you define a &lt;strong&gt;barrier price&lt;/strong&gt; — a level the market must reach within the contract duration. On trending assets this is more precise and typically carries a slightly better payout than plain Rise/Fall.&lt;/p&gt;

&lt;p&gt;Using Rise/Fall on EUR/USD is like using a hammer to cut wood. The right tool changes everything.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Signal Engine: Multi-Factor Scoring {#signal-engine}
&lt;/h2&gt;

&lt;p&gt;This is the part most bots skip — and the reason most bots fail.&lt;/p&gt;

&lt;p&gt;Instead of a single trigger, the bot runs a &lt;strong&gt;weighted scoring system&lt;/strong&gt; across four independent indicators. Each condition that aligns with a direction adds points. A signal fires only when the score reaches &lt;strong&gt;6 out of a possible 10–12 points&lt;/strong&gt;, and only when that score is strictly greater than the opposing direction.&lt;/p&gt;

&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RSI extreme alone (3 points) does not fire a trade&lt;/li&gt;
&lt;li&gt;BB touch alone (3 points) does not fire a trade&lt;/li&gt;
&lt;li&gt;RSI extreme &lt;strong&gt;plus&lt;/strong&gt; BB touch &lt;strong&gt;plus&lt;/strong&gt; momentum confirmation = 8 points → trade fires&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The scoring gate is what separates a 55% win rate bot from a 71% win rate bot. You are not trading more often. You are trading better.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Four Indicators
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. RSI (14 periods)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Measures whether the market is overbought or oversold. For synthetic indices, extreme readings are the primary signal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RSI above 78 → +3 points for FALL&lt;/li&gt;
&lt;li&gt;RSI above 70 → +2 points for FALL&lt;/li&gt;
&lt;li&gt;RSI below 22 → +3 points for RISE&lt;/li&gt;
&lt;li&gt;RSI below 30 → +2 points for RISE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For real forex/gold pairs, RSI is used as a &lt;strong&gt;momentum confirmation&lt;/strong&gt;, not a reversal detector. An RSI between 60–79 during a confirmed bull trend adds +2 points — it means the trend has momentum but has not yet overextended.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Bollinger Bands (20 periods, 2 standard deviations)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Measures how far price has deviated from its mean. For synthetics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Price at the upper band → +3 points for FALL (overextended, likely to revert)&lt;/li&gt;
&lt;li&gt;Price at the lower band → +3 points for RISE (underextended, likely to revert)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For forex/gold, the logic inverts: price sitting between the midline and the upper band during a bull trend is the &lt;strong&gt;ideal entry zone&lt;/strong&gt; (+2 points for CALL). You want to enter while the trend is intact, not after it has overextended.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Rate of Change (5 ticks)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Measures momentum acceleration or deceleration. The critical use case is detecting momentum &lt;strong&gt;fading&lt;/strong&gt; at a peak on synthetic indices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ROC below -0.02 at a high = momentum is dying → +2 points for FALL&lt;/li&gt;
&lt;li&gt;ROC above +0.02 at a low = momentum building → +2 points for RISE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. EMA Crossover (5 / 20 period)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Used exclusively for real forex/gold pairs. This is the &lt;strong&gt;most powerful signal in the forex logic&lt;/strong&gt;, carrying 4 points on its own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EMA5 above EMA20 = confirmed bull trend → +4 points for CALL&lt;/li&gt;
&lt;li&gt;EMA5 below EMA20 = confirmed bear trend → +4 points for PUT&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nothing else in the system matches this single piece of information for trending assets. If the EMA crossover is not confirmed, the forex signal cannot reach the minimum score threshold.&lt;/p&gt;


&lt;h2&gt;
  
  
  Synthetic Index Logic — Full Scoring Breakdown {#synthetic-logic}
&lt;/h2&gt;

&lt;p&gt;For V10 (1s), the strategy is &lt;strong&gt;mean reversion&lt;/strong&gt;. Price oscillates. We bet on the reversal.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;Points&lt;/th&gt;
&lt;th&gt;Direction&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;RSI above 78 (extreme overbought)&lt;/td&gt;
&lt;td&gt;+3&lt;/td&gt;
&lt;td&gt;FALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RSI above 70 (overbought)&lt;/td&gt;
&lt;td&gt;+2&lt;/td&gt;
&lt;td&gt;FALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Price at upper Bollinger Band&lt;/td&gt;
&lt;td&gt;+3&lt;/td&gt;
&lt;td&gt;FALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Price near upper BB (70% zone)&lt;/td&gt;
&lt;td&gt;+1&lt;/td&gt;
&lt;td&gt;FALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate of Change below -0.02&lt;/td&gt;
&lt;td&gt;+2&lt;/td&gt;
&lt;td&gt;FALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Direction reversed from up to down&lt;/td&gt;
&lt;td&gt;+2&lt;/td&gt;
&lt;td&gt;FALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Price is 20-tick local maximum&lt;/td&gt;
&lt;td&gt;+1&lt;/td&gt;
&lt;td&gt;FALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Maximum possible&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;14&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Minimum to fire&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;6&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The RISE scoring is the exact mirror of this table.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Strongest Possible Signal (Score 10–12)
&lt;/h3&gt;

&lt;p&gt;When RSI is above 78 (+3) &lt;strong&gt;and&lt;/strong&gt; price is touching the upper Bollinger Band (+3) &lt;strong&gt;and&lt;/strong&gt; momentum is fading (-0.02 ROC, +2) &lt;strong&gt;and&lt;/strong&gt; direction has just reversed from up to down (+2), the total score is &lt;strong&gt;10 points&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In live testing, score-10 and score-12 signals had the highest win rate of any signal quality category. These are the trades you most want to take.&lt;/p&gt;
&lt;h3&gt;
  
  
  A Real Tick Walk-Through
&lt;/h3&gt;

&lt;p&gt;Here is exactly what happens when the bot receives a tick:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Tick received → appended to 200-tick rolling buffer
2. Buffer &amp;lt; 30 ticks? → return (not enough data yet)
3. Last signal &amp;lt; 120 seconds ago? → return (cooldown active)
4. Daily loss &amp;gt;= $5.00? → return (daily limit hit)
5. Concurrent signals &amp;gt;= 2? → return (exposure limit hit)
6. Calculate: RSI(14), BB(20), ROC(5), direction track
7. Score FALL conditions, Score RISE conditions independently
8. Winning score &amp;gt;= 6 AND strictly greater than opposing score?
   → Fire signal → place 3 layered trades
   → Log to SQLite → send Telegram alert
9. Return (no signal this tick)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every tick, every symbol, every second of the day.&lt;/p&gt;




&lt;h2&gt;
  
  
  Forex and Gold Logic — Trend Following Entries {#forex-logic}
&lt;/h2&gt;

&lt;p&gt;For EUR/USD, USD/JPY, XAU/USD, GBP/USD, and AUD/USD, the strategy switches to &lt;strong&gt;trend identification and pullback entry&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The logic difference is critical: synthetic indices revert to the mean. Real assets &lt;strong&gt;follow trends&lt;/strong&gt;. Trading them the same way is a guaranteed path to losses.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;Points&lt;/th&gt;
&lt;th&gt;Direction&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;EMA5 above EMA20 (bull trend confirmed)&lt;/td&gt;
&lt;td&gt;+4&lt;/td&gt;
&lt;td&gt;CALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RSI 60–79 (momentum, not overextended)&lt;/td&gt;
&lt;td&gt;+2&lt;/td&gt;
&lt;td&gt;CALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RSI &amp;gt;= 80 (overbought — risky)&lt;/td&gt;
&lt;td&gt;-1&lt;/td&gt;
&lt;td&gt;CALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Price above BB midline, below upper band&lt;/td&gt;
&lt;td&gt;+2&lt;/td&gt;
&lt;td&gt;CALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Price above upper BB (overextended)&lt;/td&gt;
&lt;td&gt;-1&lt;/td&gt;
&lt;td&gt;CALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Positive ROC during bull trend&lt;/td&gt;
&lt;td&gt;+1&lt;/td&gt;
&lt;td&gt;CALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pullback reversal within bull trend&lt;/td&gt;
&lt;td&gt;+2&lt;/td&gt;
&lt;td&gt;CALL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Maximum possible&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Minimum to fire&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;6&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Notice the &lt;strong&gt;negative scores&lt;/strong&gt;. The bot penalises entries that are technically in the trend direction but overextended. An overbought RSI during a bull trend costs -1 point — reducing conviction. This prevents chasing entries.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Pullback Entry — The Best Trade in the System
&lt;/h3&gt;

&lt;p&gt;The highest-quality entry on a trending asset is not "enter when the trend starts." By then, you have already missed the move. The best entry is the &lt;strong&gt;pullback&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;EUR/USD is in a bull trend (EMA5 &amp;gt; EMA20)&lt;/li&gt;
&lt;li&gt;Price temporarily pulls back (micro-correction)&lt;/li&gt;
&lt;li&gt;Price reverses back upward from the pullback&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This moment — direction flipping from down to up while EMA5 &amp;gt; EMA20 — adds +2 points and, combined with the EMA signal (+4) and RSI momentum (+2), produces a score of 8.&lt;/p&gt;

&lt;p&gt;This is the trade. Entering after the pullback, in the direction of the trend, with multiple confirmations. It is the closest thing to a textbook trading entry that an automated system can produce.&lt;/p&gt;




&lt;h2&gt;
  
  
  The 3-Trade Layered Entry System {#layered-entry}
&lt;/h2&gt;

&lt;p&gt;Every signal opens &lt;strong&gt;three trades at staggered price levels&lt;/strong&gt;, not one single entry.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Trade&lt;/th&gt;
&lt;th&gt;Barrier Offset&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Trade 1&lt;/td&gt;
&lt;td&gt;0.00% (at signal price)&lt;/td&gt;
&lt;td&gt;Immediate execution at current price&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Trade 2&lt;/td&gt;
&lt;td&gt;0.04% from signal price&lt;/td&gt;
&lt;td&gt;Slightly more conservative barrier&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Trade 3&lt;/td&gt;
&lt;td&gt;0.08% from signal price&lt;/td&gt;
&lt;td&gt;Best-case barrier, higher potential payout&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Why three entries instead of one?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Binary options have a fixed expiry. If you place a single trade exactly at what you think is the reversal point and you are one tick early, you lose. With three layered entries, you capture the move even if your first entry is slightly premature. Trades 2 and 3 still win.&lt;/p&gt;

&lt;p&gt;The three entries also span different payout profiles. Trade 1 with a 0% barrier is the easiest to win but lowest payout. Trade 3 with a 0.08% barrier is harder but pays more if it hits. One signal produces a range of outcomes rather than an all-or-nothing single bet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Total exposure per signal: 3 × $1 = $3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With a daily loss limit of $5, the bot can sustain one full signal loss and part of another before shutting down for the day. That is intentional — the loss limit is tight enough to prevent destruction, wide enough to allow normal operation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Risk Management: The Rules That Keep You Alive {#risk-management}
&lt;/h2&gt;

&lt;p&gt;The entry logic gets you a 71% win rate. Risk management is what keeps you from losing everything on the 29%.&lt;/p&gt;

&lt;p&gt;Every one of these rules runs before every trade. None can be bypassed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 1 — Daily Profit Target: $10
&lt;/h3&gt;

&lt;p&gt;Once the day's cumulative P&amp;amp;L reaches +$10.00, the bot stops. No more signals for the rest of the day. Gains are locked. This prevents the single most common way profitable bots destroy their own returns: overtrading after a good run.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 2 — Daily Loss Limit: $5
&lt;/h3&gt;

&lt;p&gt;Once cumulative P&amp;amp;L reaches -$5.00, the bot stops for the day. With $3 total per signal, you sustain roughly 1–2 full losing signals before this trips. That is intentional.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key detail:&lt;/strong&gt; The P&amp;amp;L is tracked in a &lt;strong&gt;SQLite database, not memory&lt;/strong&gt;. If the bot crashes and restarts at 2 PM, it reads the persisted daily P&amp;amp;L and continues enforcing limits correctly. A memory-based counter resets on crash. A database counter does not.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 3 — Maximum 15 Signals Per Day
&lt;/h3&gt;

&lt;p&gt;Even if conditions are perfect all day, the bot caps at 15 signals. Markets that look ideal all day are sometimes hiding a regime shift. The cap is a sanity limit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 4 — 120-Second Per-Symbol Cooldown
&lt;/h3&gt;

&lt;p&gt;After each signal on a given market, that market is locked for 2 minutes. This prevents the bot from firing on the same price level repeatedly during choppy conditions — one of the most reliable ways to turn a good strategy into a losing one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 5 — Maximum 2 Concurrent Signals
&lt;/h3&gt;

&lt;p&gt;At most 2 signals across all 6 markets can be open simultaneously. Maximum live exposure at any moment: $6. This is the position sizing rule that prevents correlated losses from all markets moving against you at once.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 6 — Minimum Score of 6
&lt;/h3&gt;

&lt;p&gt;Below 6, no trade fires. A score of 5 is a coin flip. The bot does not trade coin flips.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Risk/Reward Picture
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Daily profit target&lt;/td&gt;
&lt;td&gt;$10.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Daily loss limit&lt;/td&gt;
&lt;td&gt;$5.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Risk/reward ratio&lt;/td&gt;
&lt;td&gt;2:1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max trade exposure at once&lt;/td&gt;
&lt;td&gt;$6.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stake per trade&lt;/td&gt;
&lt;td&gt;$1.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Even at a 50% winning-day rate — which this strategy comfortably exceeds — the account grows over time because of the 2:1 daily reward/risk ratio.&lt;/p&gt;




&lt;h2&gt;
  
  
  XML / DBot Configuration Structure {#xml-config}
&lt;/h2&gt;

&lt;p&gt;Deriv's DBot platform uses XML blocks to define bot logic. Here is the structural breakdown.&lt;/p&gt;

&lt;p&gt;The full annotated XML is in the paid guide. This is the architecture so you understand what to build.&lt;/p&gt;

&lt;h3&gt;
  
  
  Block 1 — Trade Parameters
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Contract type, market, duration, stake --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;trade_parameters&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;market&amp;gt;&lt;/span&gt;synthetic_index&lt;span class="nt"&gt;&amp;lt;/market&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;symbol&amp;gt;&lt;/span&gt;R_25&lt;span class="nt"&gt;&amp;lt;/symbol&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;contract_type&amp;gt;&lt;/span&gt;CALL&lt;span class="nt"&gt;&amp;lt;/contract_type&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;duration&amp;gt;&lt;/span&gt;5&lt;span class="nt"&gt;&amp;lt;/duration&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;duration_unit&amp;gt;&lt;/span&gt;t&lt;span class="nt"&gt;&amp;lt;/duration_unit&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;basis&amp;gt;&lt;/span&gt;stake&lt;span class="nt"&gt;&amp;lt;/basis&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;amount&amp;gt;&lt;/span&gt;[DYNAMIC_STAKE]&lt;span class="nt"&gt;&amp;lt;/amount&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/trade_parameters&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Block 2 — Tick Buffer and Direction Tracking
&lt;/h3&gt;

&lt;p&gt;This block reads incoming ticks from the WebSocket stream and maintains a rolling array. Direction is tracked by comparing prices[-1] vs prices[-3]. When direction flips, the previous direction is stored — this is what enables the pullback entry detection.&lt;/p&gt;

&lt;h3&gt;
  
  
  Block 3 — Indicator Calculation
&lt;/h3&gt;

&lt;p&gt;All four indicators — RSI, Bollinger Bands, Rate of Change, and EMA 5/20 — are calculated from the tick buffer. These are not approximations. The RSI uses the standard Wilder smoothing formula applied to tick-level price data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Block 4 — Scoring Logic
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Pseudocode — full implementation in the guide
&lt;/span&gt;
&lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rsi&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;78&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rsi&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;70&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;rsi&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;78&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;upper_bb&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.999&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;roc&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.02&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;direction_flipped_to_down&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;:]):&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="c1"&gt;# Mirror logic for rise_score
&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;rise_score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;fire_trade&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;FALL&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;rise_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;fall_score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;fire_trade&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RISE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Block 5 — Safety Limits Check
&lt;/h3&gt;

&lt;p&gt;Runs before every trade. Checks: daily P&amp;amp;L within limits, concurrent signal count below 2, symbol cooldown elapsed, daily signal cap not reached. If any check fails, the trade is blocked. No exceptions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Block 6 — 3-Trade Execution Loop
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Simplified from actual implementation
&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;offset_pct&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mf"&gt;0.00&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.04&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.08&lt;/span&gt;&lt;span class="p"&gt;]):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;direction&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;FALL&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;barrier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;offset_pct&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;barrier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;offset_pct&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="nf"&gt;place_contract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;contract_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;contract_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;barrier&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;barrier&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;stake&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;1.00&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;duration&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;duration_unit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;m&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Live Results — The Evidence {#live-results}
&lt;/h2&gt;

&lt;p&gt;These are the verified results from live session testing on a real Deriv account.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Total trades&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wins&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Losses&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Win rate&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;70.8%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maximum consecutive losses&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Account blown&lt;/td&gt;
&lt;td&gt;Never&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Net result&lt;/td&gt;
&lt;td&gt;Positive across all sessions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The maximum consecutive loss streak of 3 is the most important number here. With a 1.8x recovery multiplier and a 4-loss hard stop, a streak of 3 is fully survivable. The account never came close to the loss limit from a single bad run.&lt;/p&gt;

&lt;p&gt;Screenshots of the full trade history — every entry, every exit, every P&amp;amp;L — are included in the complete guide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important context:&lt;/strong&gt; 24 live trades is a meaningful sample but not a statistically definitive one. I keep a running live log and update the guide quarterly. The strategy is reviewed and recalibrated every 30 days based on market conditions.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Strategy Cannot Do {#limitations}
&lt;/h2&gt;

&lt;p&gt;I will be direct about the limits because a strategy that claims to work in all conditions is lying to you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It does not work during extreme volatility spikes on synthetic indices.&lt;/strong&gt; When Deriv's synthetic markets experience unusual price behaviour, the tick pattern becomes genuinely random for a period. Signals still fire — but reliability drops. The 120-second cooldown and the 2-minute session timing rules reduce exposure to these events, but do not eliminate it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The forex/gold parameters are calibrated for 10-minute contracts.&lt;/strong&gt; If you change duration to 1 minute or 30 minutes, the indicator settings need recalibration. The signal engine was designed and tested for 10-minute contracts specifically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Past performance does not guarantee future results.&lt;/strong&gt; This is not a legal disclaimer I am adding for protection. It is genuinely true. A 71% win rate in verified live sessions is a strong starting signal — not a permanent guarantee. Review your own results every 30 days.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who This Is For
&lt;/h2&gt;

&lt;p&gt;This strategy is for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deriv traders who have tried bots and lost money&lt;/strong&gt; because they did not understand the underlying logic — now you have the logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python developers&lt;/strong&gt; who want a well-documented, production-ready automated trading system to study and extend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Algorithmic trading beginners&lt;/strong&gt; who need a working framework with real, verified results rather than theoretical backtests&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anyone tired of Telegram signal groups&lt;/strong&gt; that charge monthly fees, never explain their methodology, and cannot show a single verified live trade&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is not for people looking for a system that wins every trade. No such system exists. This is for people who want to understand what they are running and why — and who are comfortable with a strategy that is profitable, not infallible.&lt;/p&gt;




&lt;h2&gt;
  
  
  Get the Complete $47 Guide {#get-the-guide}
&lt;/h2&gt;

&lt;p&gt;The article above is everything you need to understand the strategy. The full guide gives you everything to &lt;strong&gt;build and run it yourself today&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Is Inside
&lt;/h3&gt;

&lt;p&gt;✅ &lt;strong&gt;Full annotated XML code&lt;/strong&gt; — copy, paste, run in Deriv DBot immediately&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Step-by-step DBot setup&lt;/strong&gt; — screenshots of every configuration screen&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Complete RSI and EMA implementation&lt;/strong&gt; in DBot block format&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Python bot (v2.0) full source code&lt;/strong&gt; — runs 24/7 free on Render&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Exact stake sizing formula&lt;/strong&gt; for any account balance&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Optimisation settings&lt;/strong&gt; for V10, V25, V50, and real forex pairs&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;How to backtest&lt;/strong&gt; before risking a single dollar live&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Live trade history screenshots&lt;/strong&gt; — every session, every result&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Telegram alert setup&lt;/strong&gt; — monitor everything from your phone&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;SQLite query templates&lt;/strong&gt; to analyse your own bot's performance&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Troubleshooting guide&lt;/strong&gt; for the 5 most common DBot errors&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;30-day tuning protocol&lt;/strong&gt; — what to adjust and when&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;My personal pre-session checklist&lt;/strong&gt;  &lt;/p&gt;

&lt;h3&gt;
  
  
  The Pricing Logic
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;$47. One payment. Yours forever. No subscription.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A single winning day on a $500 account following this strategy returns $60. The guide pays for itself before lunch on day one — if it works for you even half as well as it works for me.&lt;/p&gt;

&lt;p&gt;If it does not work for you, you have the complete methodology to diagnose exactly why and adjust. You are not buying a black box. You are buying understanding.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://anusiempreciouso.gumroad.com/l/deriv-bot-guide" rel="noopener noreferrer"&gt;Get the Complete Deriv Bot Strategy Guide — $47&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Do I need to know how to code to use the DBot XML version?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
No. The XML guide is copy-paste into Deriv's DBot interface. No coding required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What account size do I need?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The bot is calibrated for $1 stakes ($3 per signal). A minimum of $50 gives you enough buffer for the risk management rules to function properly. $100–$200 is more comfortable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does this work on demo accounts?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Yes. I strongly recommend running it on demo for at least 48 hours before going live. Set &lt;code&gt;DEMO_MODE=true&lt;/code&gt; in the Python version to log all signals without placing real trades.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens if Deriv's API is down?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The bot handles WebSocket disconnections with automatic reconnection. If it cannot reconnect after multiple attempts, it logs the failure and waits. No trades are placed during connectivity issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I run this on V75 or V100?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The scoring thresholds were calibrated for V10. You can add V75 or V100 to &lt;code&gt;ACTIVE_SYMBOLS&lt;/code&gt; but I recommend first running it in demo on those symbols and checking win rates via the SQL queries in Section 11 before going live.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is binary options trading legal in my country?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This varies by jurisdiction. Verify that Deriv and binary options contracts are legal in your country before trading. Deriv maintains a list of supported and restricted regions on their website.&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Precious Anusiem&lt;/strong&gt; is a Nigerian AI/ML Engineer, SaaS Founder, and algorithmic trader. She has built and published 5 Expert Advisors on the MQL5 Marketplace, developed 5 live AI SaaS products including Dr. Choice (a clinical AI assistant with &amp;gt;90% RAG accuracy) and InvestPropty (an AI fraud detection system that reduced property fraud review time by 96%), and holds certifications from Stanford University, Google, and IBM in Machine Learning, Data Analytics, Cybersecurity, and Generative AI Engineering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live Products:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔗 &lt;a href="https://dr-choice.vercel.app" rel="noopener noreferrer"&gt;Dr. Choice&lt;/a&gt; — AI clinical assistant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Available for custom bot development, AI product builds, and consulting.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;⚠️ Risk Disclaimer: Trading binary options and synthetic indices involves substantial risk of loss. The strategy described in this article is based on verified personal live testing and is provided for educational purposes only. Past performance does not guarantee future results. Never trade with money you cannot afford to lose. This is not financial advice.&lt;/em&gt;&lt;/p&gt;




</description>
    </item>
    <item>
      <title>I spent 6 months obsessing over MT5 bot logic — here's what finally clicked</title>
      <dc:creator>Precious Lyna Anusiem</dc:creator>
      <pubDate>Tue, 21 Apr 2026 01:25:05 +0000</pubDate>
      <link>https://dev.to/preciousanusiem/i-spent-6-months-obsessing-over-mt5-bot-logic-heres-what-finally-clicked-47hf</link>
      <guid>https://dev.to/preciousanusiem/i-spent-6-months-obsessing-over-mt5-bot-logic-heres-what-finally-clicked-47hf</guid>
      <description>&lt;p&gt;Look, I'll be upfront with you: I'm not a hedge fund quant. I don't have a Bloomberg terminal. I learned MQL5 the same way most of us learn things — by breaking stuff repeatedly at 2am until it started making sense.&lt;/p&gt;

&lt;p&gt;This post isn't a "get rich from trading" pitch. It's about the specific engineering decisions that separate a bot that slowly drains your account from one that actually holds up under real market conditions. I want to talk about what I got wrong for way longer than I should have, and what eventually worked.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mistake I kept making (and I bet you're making it too)
&lt;/h2&gt;

&lt;p&gt;My first few EAs were what I now call "single-factor bots." RSI crosses 30 → buy. MACD histogram turns positive → buy. They backtested beautifully because they were essentially curve-fitted to historical data. Put them live and they'd enter trades during news events, during ranging markets, during sessions with 40-point spreads. They didn't care. They just fired.&lt;/p&gt;

&lt;p&gt;The problem isn't that RSI or MACD is useless. The problem is that any single indicator is basically a coin flip without context. Markets are multi-dimensional. A rising RSI in a downtrend during the Asian session with a 35-point spread is a completely different situation than a rising RSI in an uptrend during London open with a 4-point spread. Treating them identically is where bots die.&lt;/p&gt;




&lt;h2&gt;
  
  
  The shift that changed everything: confluence scoring
&lt;/h2&gt;

&lt;p&gt;After enough blown accounts (demo, thankfully, mostly), I started thinking about entries differently. Instead of asking "did indicator X trigger?", I started asking "how many independent things agree right now?"&lt;/p&gt;

&lt;p&gt;The idea is dead simple in code but surprisingly powerful in practice. You define N conditions. Each condition that's true adds 1 to a score. You only trade when the score hits a minimum threshold.&lt;/p&gt;

&lt;p&gt;Here's a rough idea of what that looks like in MQL5:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int buyScore = 0;
if(close &amp;gt; trendEMA50)    buyScore++;  // trend direction
if(close &amp;gt; h4EMA)         buyScore++;  // higher timeframe
if(fastEMA &amp;gt; slowEMA)     buyScore++;  // EMA stack
if(macdMain &amp;gt; macdSig)    buyScore++;  // momentum
if(rsi &amp;gt; 40 &amp;amp;&amp;amp; rsi &amp;lt; 65)  buyScore++;  // RSI zone
if(adx &amp;gt; 20)              buyScore++;  // trend strength (not ranging)
if(bullishCandle)         buyScore++;  // candle confirmation
if(close &amp;gt; bbMidline)     buyScore++;  // BB positioning

if(buyScore &amp;gt;= 5) openBuy();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach has a few things going for it that aren't obvious immediately:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It degrades gracefully.&lt;/strong&gt; If MACD is giving mixed signals but everything else agrees, you still get a trade — just with one less point. Compare that to a system where a single indicator veto blocks everything regardless.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It naturally filters session and volatility problems.&lt;/strong&gt; During low-liquidity Asian hours on a ranging pair, your EMA stack condition, your trend condition, and your ADX condition all fail simultaneously. The score doesn't reach threshold. The bot sits on its hands. That's the behavior you want and you didn't have to write a single session filter to get it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's easy to tune without blowing up the logic.&lt;/strong&gt; Want to be more conservative? Raise the threshold from 4 to 5. Want more entries? Lower it. It doesn't cascade into unexpected behavior the way nested if-statements do.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stop-loss problem nobody talks about enough
&lt;/h2&gt;

&lt;p&gt;Here's something that cost me real time to figure out: a good entry is maybe 30% of the battle. Stop-loss placement is where most retail bots actually lose money.&lt;/p&gt;

&lt;p&gt;Fixed-pip stops are almost always wrong. If you set a 30-pip stop on EURUSD and then trade the same EA on GBPJPY or XAUUSD, you're not accounting for the fact that those instruments have completely different volatility profiles. A 30-pip move on gold happens in minutes. On EURUSD it might take hours.&lt;/p&gt;

&lt;p&gt;ATR-based stops fix this. You measure the Average True Range over N periods and set your stop as a multiple of that. If ATR is currently 80 pips, your 1.5× ATR stop is 120 pips. If ATR is 20 pips (quiet market), it's 30 pips. The bot adapts automatically.&lt;/p&gt;

&lt;p&gt;The same logic applies to take profit. I use a 2:1 ATR ratio minimum (TP = 2× ATR, SL = 1× ATR). Some of my configs use 3:1 for trending pairs. It makes a bigger difference than most indicator tweaking ever will.&lt;/p&gt;

&lt;h2&gt;
  
  
  One thing that genuinely surprised me
&lt;/h2&gt;

&lt;p&gt;I added an ADX filter expecting it to just cut trade frequency. It did. But what I didn't expect was the effect on average winner size.&lt;/p&gt;

&lt;p&gt;ADX above 20 means the market is in a trending state. When you filter for that, your winning trades aren't just more frequent — they tend to run further because you're catching moves with actual momentum behind them rather than random noise that briefly crossed your other conditions.&lt;/p&gt;

&lt;p&gt;It felt like one of those "why didn't I do this earlier" moments. The bot wasn't missing good trades, it was skipping ones that were statistically more likely to reverse immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I ended up building
&lt;/h2&gt;

&lt;p&gt;After going through all of this (and a lot of iterations I haven't mentioned), I ended up with a fairly complete EA that does most of what I described:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;9-factor confluence scoring, configurable threshold&lt;/li&gt;
&lt;li&gt;ATR-based dynamic SL/TP with user-set multipliers&lt;/li&gt;
&lt;li&gt;Automatic breakeven once price moves 1 ATR in your favour&lt;/li&gt;
&lt;li&gt;Trailing stop based on ATR distance&lt;/li&gt;
&lt;li&gt;Daily loss limit and profit target (as % of balance)&lt;/li&gt;
&lt;li&gt;Weekly drawdown kill-switch&lt;/li&gt;
&lt;li&gt;Session filters (London, New York, Asia toggleable)&lt;/li&gt;
&lt;li&gt;Spread filter to avoid trading during news or low liquidity&lt;/li&gt;
&lt;li&gt;Proper margin checking before opening trades&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I put it together as GlimTrader Pro v3.0 and made it available as a compiled .ex5 — &lt;a href="https://anusiempreciouso.gumroad.com/l/Prop-Firm-Trading-Bot" rel="noopener noreferrer"&gt;you can grab it here&lt;/a&gt; if you want to skip the six months of headaches.&lt;/p&gt;

&lt;p&gt;Stuff I'd tell myself on day one&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't trust backtests with default settings.&lt;/strong&gt; Optimize on one date range, validate on a completely different one. If performance falls apart, you've overfit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your broker's spread matters more than you think.&lt;/strong&gt; An EA that works at a 1-pip spread will look completely different at 4 pips. Build a spread filter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lot sizing based on account % is not optional.&lt;/strong&gt; Fixed lot sizing turns a drawdown into an account wipe. Risk 1% per trade max while you're learning the system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Demo trade for at least 3 weeks before going live.&lt;/strong&gt; Real execution has slippage, gaps, disconnects. The backtest doesn't.&lt;/p&gt;

&lt;p&gt;If you're going through the same frustrations I went through, I hope this saves you some time. The confluence approach genuinely changed how I think about automated entries. Worth experimenting with even if you build your own version from scratch.&lt;/p&gt;

&lt;p&gt;Happy to answer questions in the comments—particularly around the ATR logic or the scoring approach.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>python</category>
      <category>automation</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
