<?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: Sergei Morozov</title>
    <description>The latest articles on DEV Community by Sergei Morozov (@s_morozov).</description>
    <link>https://dev.to/s_morozov</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%2F3776649%2F54dccda4-accf-4a76-9b82-27ad34b5c9bd.png</url>
      <title>DEV Community: Sergei Morozov</title>
      <link>https://dev.to/s_morozov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/s_morozov"/>
    <language>en</language>
    <item>
      <title>5 Ways TradingView Backtests Lie to You (And How to Fix Each One)</title>
      <dc:creator>Sergei Morozov</dc:creator>
      <pubDate>Sat, 21 Feb 2026 03:28:04 +0000</pubDate>
      <link>https://dev.to/s_morozov/5-ways-tradingview-backtests-lie-to-you-and-how-to-fix-each-one-2hn8</link>
      <guid>https://dev.to/s_morozov/5-ways-tradingview-backtests-lie-to-you-and-how-to-fix-each-one-2hn8</guid>
      <description>&lt;p&gt;I ran a TradingView backtest that showed 247% annual return. Low drawdown. Clean equity curve. I was ready to go all-in.&lt;/p&gt;

&lt;p&gt;Then I turned on realistic settings — commission, slippage, proper position sizing — and the same strategy showed -12%.&lt;/p&gt;

&lt;p&gt;Here are the 5 most common ways TradingView backtests deceive you.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Zero Commission by Default
&lt;/h2&gt;

&lt;p&gt;Open any strategy in TradingView. Go to Properties. The commission field says 0.&lt;/p&gt;

&lt;p&gt;Bybit charges ~0.1% per side (taker). On a strategy that makes 200 trades per month: 0.2% per round trip x 200 = 40% of your capital gone to fees per month.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Set commission to 0.1% in Strategy Properties before you do anything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Zero Slippage
&lt;/h2&gt;

&lt;p&gt;TradingView assumes perfect fills at exact prices. When your strategy sends a market order on a low-liquidity altcoin at 3 AM UTC, the order book is thin. Your "buy at $1.00" fills at $1.02.&lt;/p&gt;

&lt;p&gt;Professional algo traders discount backtest profits by ~40-60% for live trading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Set slippage to 10-20 ticks in Strategy Properties.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. 100% of Capital Per Trade
&lt;/h2&gt;

&lt;p&gt;The default position sizing is often 100% of equity. No professional trader puts everything into a single trade. One bad fill and you're done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Set order size to 5-10% of equity. If your strategy doesn't work with proper position sizing, it doesn't have an edge — it has leverage.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Non-Standard Charts
&lt;/h2&gt;

&lt;p&gt;Heikin Ashi, Renko, Range bars — they modify OHLC values. Your strategy executes at prices that never existed on the actual exchange.&lt;/p&gt;

&lt;p&gt;Heikin Ashi open = (previous HA open + previous HA close) / 2. This is a smoothed value, not a real price.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Always backtest on STANDARD OHLC candles. Use HA/Renko for visual analysis only.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Repainting Indicators
&lt;/h2&gt;

&lt;p&gt;Some indicators recalculate past bars using data that wasn't available at the time. The backtest shows "perfect" entries that never existed in real-time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Test any indicator live on a 1-minute chart for a few hours. If signals shift after the bar closes, it's repainting. Don't use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Workflow Now
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Backtest on STANDARD OHLC with 0.1% commission + 10-20 tick slippage&lt;/li&gt;
&lt;li&gt;Forward-test on demo for 2-4 weeks&lt;/li&gt;
&lt;li&gt;Compare demo vs backtest — if within 40-50%, the strategy might be real&lt;/li&gt;
&lt;li&gt;Go live with small size&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We wrote a longer breakdown with more examples on our blog: &lt;a href="https://geektrade.online/blog/backtest-reality?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_content=backtest-lies" rel="noopener noreferrer"&gt;Why You Shouldn't Trust TradingView Backtests Blindly&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;What backtesting pitfalls have burned you? Curious what I'm missing.&lt;/p&gt;

</description>
      <category>tradingview</category>
      <category>cryptocurrency</category>
      <category>backtesting</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Building an Open-Source Dip-Buying Strategy for Altcoins (Pine Script)</title>
      <dc:creator>Sergei Morozov</dc:creator>
      <pubDate>Wed, 18 Feb 2026 03:20:32 +0000</pubDate>
      <link>https://dev.to/s_morozov/building-an-open-source-dip-buying-strategy-for-altcoins-pine-script-1k8</link>
      <guid>https://dev.to/s_morozov/building-an-open-source-dip-buying-strategy-for-altcoins-pine-script-1k8</guid>
      <description>&lt;p&gt;I work on the marketing side of a small trading automation project, so I'm not the one writing Pine Script — but I sat with our dev long enough while he was building this strategy that I can explain the thinking behind it. Figured it's worth sharing because the approach is kind of unusual.&lt;/p&gt;

&lt;p&gt;The strategy is called Dump Reversal Peak Trail v2. It's open-source on TradingView, currently on the front page of community scripts. It buys capitulation dips on altcoins — SOL, ETH, DOGE, stuff like that — and trails the rebound.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why altcoins specifically&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Alts dump harder and bounce faster than BTC. When Bitcoin drops 5%, SOL might drop 15-20% in the same window. That's not a bug for this strategy — it's the whole point. The bigger the capitulation candle, the more likely you get a real bounce after it. On BTC the dumps are usually more gradual, less "single candle panic" and more slow bleed. The strategy needs that sharp, overdone dump to work well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it actually works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There's 4 stages and they run in sequence:&lt;/p&gt;

&lt;p&gt;Stage 1 — find the dump. The strategy watches for a single bar that breaks the N-day low AND drops more than a threshold percentage. Normal volatility doesn't trigger it — it needs a genuine "oh shit" candle. Think SOL going from $145 to $128 in one 15-minute bar.&lt;/p&gt;

&lt;p&gt;Stage 2 — don't buy it yet. This is where most dip-buying strategies fail. They buy the dump candle, which looks amazing in backtest but is impossible to identify in real time (you don't know it's the bottom until after). Instead, we wait for the first green close after the dump. There's also a flatness filter — if price is just chopping sideways, it rejects the entry. And a minimum rebound check — needs enough bounce to suggest actual buyers showed up.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// simplified — not the real Pine but the logic
confirmed = close &amp;gt; open
            and reboundFromLow &amp;gt; minReboundPct
            and not isFlat(flatnessThreshold)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stage 3 — trail the bounce. Once in, the strategy tracks the highest close since entry. When price pulls back X% from that peak — exit. The nice thing is this adapts automatically: small bounce = quick exit with small profit, big reversal = rides the whole move and only exits when momentum dies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;peakSinceEntry = max(peakSinceEntry, close)
retrace = (peakSinceEntry - close) / peakSinceEntry
if retrace &amp;gt; trailPct and profit &amp;gt; minProfit
    exit()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stage 4 — cooldown. After exit, the strategy sits out for N bars. Without this, it re-enters immediately in choppy conditions and gets chopped up. Learned this the hard way during testing — before cooldown was added, the strategy would enter/exit/enter/exit five times in an hour during sideways action.&lt;/p&gt;

&lt;p&gt;The repainting thing&lt;/p&gt;

&lt;p&gt;This was non-negotiable for our dev. The strategy only uses confirmed bar values — no &lt;code&gt;security()&lt;/code&gt; lookahead, no intra-bar signals. You can verify yourself: throw it on a 1-minute chart, watch it live for 30 minutes, compare with what the backtest shows for the same period. If signals match — clean.&lt;/p&gt;

&lt;p&gt;A lot of TradingView strategies with thousands of likes are repainting and nobody notices. The backtest looks incredible, but try running it forward and nothing matches. This one matches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to watch out for&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Settings before you backtest:&lt;/p&gt;

&lt;p&gt;Commission: 0.075-0.1% (not zero, which is TradingView's default — this alone kills most strategies)&lt;br&gt;
Slippage: 15-20 ticks for alts, 10 for ETH&lt;br&gt;
Chart: standard OHLC only. Heikin Ashi will give you fantasy numbers&lt;br&gt;
Timeframe: 5m or 15m works best. On higher TFs the dumps aren't sharp enough&lt;br&gt;
And honestly — discount whatever the backtest shows by at least 50-60% for what you'd actually get live. Real order books on altcoins are thin, especially during the exact moment you're trying to buy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where to find it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The strategy is free and open-source: &lt;a href="https://www.tradingview.com/script/LBuOCi9s-Dump-Reversal-Peak-Trail-v2/" rel="noopener noreferrer"&gt;Dump Reversal Peak Trail v2 on TradingView&lt;/a&gt;. All parameters are adjustable.&lt;br&gt;
If you want to actually run it live (webhook alerts from TradingView → real orders on Bybit), we built &lt;a href="https://geektrade.online?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=content_spray_feb2026&amp;amp;utm_content=drpt-v2" rel="noopener noreferrer"&gt;GeekTrade&lt;/a&gt; for that. It handles the messy parts — signal deduplication, position reconciliation, risk limits. Non-custodial, there's a free tier.&lt;/p&gt;

&lt;p&gt;Full strategy breakdown with more detail: &lt;a href="https://geektrade.online/blog/strategies/drpt-v2?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=content_spray_feb2026&amp;amp;utm_content=drpt-v2" rel="noopener noreferrer"&gt;geektrade.online/blog/strategies/drpt-v2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love to hear what other reversal approaches people are using. Especially curious if anyone's tried something similar on lower-cap alts where the volatility is even crazier.&lt;/p&gt;

</description>
      <category>tradingview</category>
      <category>cryptocurrency</category>
      <category>automation</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
