<?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: isabelle dubuis</title>
    <description>The latest articles on DEV Community by isabelle dubuis (@isabelle_dubuis_d858453d7).</description>
    <link>https://dev.to/isabelle_dubuis_d858453d7</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%2F3906665%2F77708b2e-f49d-4a80-9c9b-b5d560be597e.png</url>
      <title>DEV Community: isabelle dubuis</title>
      <link>https://dev.to/isabelle_dubuis_d858453d7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/isabelle_dubuis_d858453d7"/>
    <language>en</language>
    <item>
      <title>ICT Order Block + FVG strategy in Pine Script v5: backtest results + full code</title>
      <dc:creator>isabelle dubuis</dc:creator>
      <pubDate>Thu, 30 Apr 2026 21:31:08 +0000</pubDate>
      <link>https://dev.to/isabelle_dubuis_d858453d7/ict-order-block-fvg-strategy-in-pine-script-v5-backtest-results-full-code-l5c</link>
      <guid>https://dev.to/isabelle_dubuis_d858453d7/ict-order-block-fvg-strategy-in-pine-script-v5-backtest-results-full-code-l5c</guid>
      <description>&lt;p&gt;I've been backtesting an ICT-style Order Block + Fair Value Gap strategy on crypto and forex. After 50 iterations and a lot of dead variants, here's what survived. Posting the Pine Script v5 below in case it saves someone the same week of debugging.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;ICT (Inner Circle Trader) methodology relies on two ideas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Order Block (OB)&lt;/strong&gt; — the last opposite candle right before a strong displacement. Bull OB = last bearish candle before a sharp bullish push.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fair Value Gap (FVG)&lt;/strong&gt; — a 3-bar imbalance where price moved so fast it left a gap (low &amp;gt; high[2]).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Entry = price retraces back into the OB, ideally inside an FVG, with trend confirmation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this version finally worked
&lt;/h2&gt;

&lt;p&gt;Earlier tries took every OB. Win rate dropped to 35%. Two filters fixed it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Displacement filter&lt;/strong&gt;: the move out of the OB must exceed &lt;code&gt;2 × ATR(14)&lt;/code&gt;. Weak moves create weak OBs. They don't hold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trend filter&lt;/strong&gt;: only longs above EMA(200) trending up. Short below, trending down. Sounds basic, but cut my losing trades by 40%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stop loss = OB low minus &lt;code&gt;0.3 × ATR&lt;/code&gt;. TP = 3R fixed. Anything tighter and noise eats you. Anything wider and you give back too much.&lt;/p&gt;

&lt;h2&gt;
  
  
  The full Pine Script v5
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//@version=5
strategy("ICT_OB_SEED11", overlay=true, initial_capital=3000, commission_type=strategy.commission.percent, commission_value=0.05, slippage=2, default_qty_type=strategy.cash, default_qty_value=300, process_orders_on_close=true)

displ_atr_mult = input.float(2.0, "Displacement ATR mult")
ob_lookback    = input.int(20, "OB lookback")

atr = ta.atr(14)
displ_up = close - close[1] &amp;gt; atr * displ_atr_mult
displ_dn = close[1] - close &amp;gt; atr * displ_atr_mult

var float obUpHi = na, var float obUpLo = na
var float obDnHi = na, var float obDnLo = na

if displ_up and close[1] &amp;lt; open[1]
    obUpHi := high[1]
    obUpLo := low[1]
if displ_dn and close[1] &amp;gt; open[1]
    obDnHi := high[1]
    obDnLo := low[1]

bullFVG = low &amp;gt; high[2]
bearFVG = high &amp;lt; low[2]

ema200 = ta.ema(close, 200)
upTrend = close &amp;gt; ema200 and ema200 &amp;gt; ema200[20]
dnTrend = close &amp;lt; ema200 and ema200 &amp;lt; ema200[20]

retestLong  = upTrend and not na(obUpHi) and low &amp;lt;= obUpHi and high &amp;gt;= obUpLo and close &amp;gt; open
retestShort = dnTrend and not na(obDnLo) and high &amp;gt;= obDnLo and low &amp;lt;= obDnHi and close &amp;lt; open

if retestLong and barstate.isconfirmed and strategy.position_size == 0
    sl = obUpLo - atr * 0.3
    tp = close + (close - sl) * 3
    strategy.entry("L", strategy.long)
    strategy.exit("XL", "L", stop=sl, limit=tp)
    obUpHi := na
    obUpLo := na

if retestShort and barstate.isconfirmed and strategy.position_size == 0
    sl = obDnHi + atr * 0.3
    tp = close - (sl - close) * 3
    strategy.entry("S", strategy.short)
    strategy.exit("XS", "S", stop=sl, limit=tp)
    obDnHi := na
    obDnLo := na
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Results across pairs (1H, 2 years backtest)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;BTCUSDT: PF 1.42, MaxDD -8.2%, 312 trades&lt;/li&gt;
&lt;li&gt;EURUSD: PF 1.18, MaxDD -6.1%, 184 trades&lt;/li&gt;
&lt;li&gt;XAUUSD: PF 1.61, MaxDD -11.4%, 247 trades&lt;/li&gt;
&lt;li&gt;SP500 1H: PF 1.09, MaxDD -7.8%, 142 trades&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PF below 1.1 = skip. Above 1.4 = keep monitoring forward. Forward test always trails backtest by 15-25%.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I tried that didn't work
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;ATR(7) instead of ATR(14): too noisy, false displacements&lt;/li&gt;
&lt;li&gt;Tighter SL (0.1 ATR): stopped out 70% of valid setups&lt;/li&gt;
&lt;li&gt;5R TP: too greedy, only 12% hit it before reversal&lt;/li&gt;
&lt;li&gt;No trend filter: half the OBs bounced once then died&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next iterations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add session filter (London/NY only, skip Asia)&lt;/li&gt;
&lt;li&gt;Multi-timeframe OB confirmation (4H OB on 1H entry)&lt;/li&gt;
&lt;li&gt;Volume profile overlay for OB validation&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  About me
&lt;/h2&gt;

&lt;p&gt;I run a small portfolio of niche tools and content sites across AI, SEO, trading, and B2B. Some of them:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI &amp;amp; automation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://vocalis.pro" rel="noopener noreferrer"&gt;vocalis.pro&lt;/a&gt; — AI-powered SEO content automation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://vocalis.blog" rel="noopener noreferrer"&gt;vocalis.blog&lt;/a&gt; — case studies and field notes&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://vocalis-ai.org" rel="noopener noreferrer"&gt;vocalis-ai.org&lt;/a&gt; — voice AI agents for sales calls&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://agents-ia.pro" rel="noopener noreferrer"&gt;agents-ia.pro&lt;/a&gt; — agentic AI playbook&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://agentic-whatsup.com" rel="noopener noreferrer"&gt;agentic-whatsup.com&lt;/a&gt; — agentic AI for WhatsApp business&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ai-due.com" rel="noopener noreferrer"&gt;ai-due.com&lt;/a&gt; — AI for SMB operations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;SEO &amp;amp; sales:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://seo-true.com" rel="noopener noreferrer"&gt;seo-true.com&lt;/a&gt; — SEO automation toolkit&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://master-seller.fr" rel="noopener noreferrer"&gt;master-seller.fr&lt;/a&gt; — sales enablement (FR)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://lead-gene.com" rel="noopener noreferrer"&gt;lead-gene.com&lt;/a&gt; — B2B lead generation tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Trust, security, finance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://trustly-ai.com" rel="noopener noreferrer"&gt;trustly-ai.com&lt;/a&gt; — trust signals automation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://trust-vault.com" rel="noopener noreferrer"&gt;trust-vault.com&lt;/a&gt; — encrypted vault tools&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://factureimpayee.fr" rel="noopener noreferrer"&gt;factureimpayee.fr&lt;/a&gt; — French unpaid invoice recovery&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Niche content:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://tesla-mag.ch" rel="noopener noreferrer"&gt;tesla-mag.ch&lt;/a&gt; — Tesla coverage (CH)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://iapmesuisse.ch" rel="noopener noreferrer"&gt;iapmesuisse.ch&lt;/a&gt; — AI for Swiss SMBs&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cbdeuropa.com" rel="noopener noreferrer"&gt;cbdeuropa.com&lt;/a&gt; — CBD market analysis EU&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you trade and want to chat about backtesting frameworks or automation in general, drop a comment. Anyone running ICT on lower timeframes (5m/15m)? Curious what your filter stack looks like.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>pinescript</category>
      <category>algorithms</category>
      <category>backtesting</category>
    </item>
    <item>
      <title>I built a Reddit posting bot. Account got banned in 2h. Honest scorecard.</title>
      <dc:creator>isabelle dubuis</dc:creator>
      <pubDate>Thu, 30 Apr 2026 20:28:05 +0000</pubDate>
      <link>https://dev.to/isabelle_dubuis_d858453d7/i-built-a-reddit-posting-bot-account-got-banned-in-2h-honest-scorecard-4lh7</link>
      <guid>https://dev.to/isabelle_dubuis_d858453d7/i-built-a-reddit-posting-bot-account-got-banned-in-2h-honest-scorecard-4lh7</guid>
      <description>&lt;h1&gt;
  
  
  I built a Reddit posting bot for my SEO agency. Here's the honest scorecard.
&lt;/h1&gt;

&lt;p&gt;Built a Reddit posting bot for my SEO agency. Goal: stop spending 5h/week on social presence busywork.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final stack after rewrites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apify&lt;/strong&gt; scans subs, scores threads on intent + age + engagement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI gpt-4o-mini&lt;/strong&gt; drafts posts and comments (cheap, ~$0.002/draft)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Playwright on old.reddit.com&lt;/strong&gt; submits (new Reddit UI fights you on every selector)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON files&lt;/strong&gt; for state. No DB, no queue, no Docker.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What worked
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Comments landed from day 1. Posted on r/SEO, got real replies.&lt;/li&gt;
&lt;li&gt;Cooldown logic (7d/sub) stopped me from spamming the same place twice.&lt;/li&gt;
&lt;li&gt;Found 13 safe subs by scraping each sub's about.json + rules.json. Filter out karma minimums and anything over 1M subs (heavy automod).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What broke
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;First 3 self-posts got nuked silently by AutoModerator. Account was 3 months old, 1 karma, email unverified. Reddit's spam classifier reads account age x karma x verified flags before it reads content.&lt;/li&gt;
&lt;li&gt;My success detection looked at page URL after submit. Removed posts return a normal URL, so the script logged success while Reddit deleted in the background.&lt;/li&gt;
&lt;li&gt;The LLM hallucinated tech terms not in the OP. Temperature 0.7 to 0.6 helped, stricter prompt helped more.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What killed the account
&lt;/h2&gt;

&lt;p&gt;After ~2h of automated runs from a datacenter IP (OVH), Reddit shadowbanned the account. Anti-bot detection picked up: datacenter IP + Playwright fingerprint + 4 tabs opened simultaneously + frappes synthétiques + activity 24/7 cron pattern.&lt;/p&gt;

&lt;h2&gt;
  
  
  Total cost
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;14 days, ~30 hours coding, 4 restarts&lt;/li&gt;
&lt;li&gt;$4 OpenAI, $7 Apify&lt;/li&gt;
&lt;li&gt;Zero hours saved (account got banned before karma built)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The real lesson
&lt;/h2&gt;

&lt;p&gt;You cannot automate past Reddit's reputation system. CQS (Contributor Quality Score) is the hidden gate. Build karma the slow human way first via mobile + residential IP, then automation works on accounts with 200+ karma after 60 days.&lt;/p&gt;

&lt;p&gt;Anyone else hit the wall where automation works perfectly but the platform silently shadowbans the output?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I built &lt;a href="https://vocalis.pro" rel="noopener noreferrer"&gt;vocalis.pro&lt;/a&gt; — an AI-powered SEO content automation tool. The bot from this story is one of its modules. If you want to skip the 30 hours of pain, check it out.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>seo</category>
      <category>automation</category>
      <category>reddit</category>
    </item>
  </channel>
</rss>
