<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Václav Hodek on Medium]]></title>
        <description><![CDATA[Stories by Václav Hodek on Medium]]></description>
        <link>https://medium.com/@vhodek?source=rss-b5ffa33afa0e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tcp_mzDXCXDhAGAEF4K-zg.png</url>
            <title>Stories by Václav Hodek on Medium</title>
            <link>https://medium.com/@vhodek?source=rss-b5ffa33afa0e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 04:58:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vhodek/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Eight Payouts and Counting: +40% On My Own Money #14]]></title>
            <link>https://vhodek.medium.com/eight-payouts-and-counting-40-on-my-own-money-b549da35b125?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b549da35b125</guid>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[money]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[personal-story]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Wed, 28 May 2025 13:31:17 GMT</pubDate>
            <atom:updated>2025-05-28T13:33:47.737Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iJaXNJ0x5XH6tRswtB5Rxg.png" /></figure><p>May turned out to be one of those months where life refuses to slow down long enough for you to focus on side projects. Between family commitments, an increasingly busy schedule at Localazy, and the usual chaos of everyday life, I barely had time to glance at my trading dashboard, let alone make any meaningful improvements to our strategy.</p><p>The results? Well, they weren’t exactly spectacular. Some of our strategies performed as expected, delivering steady profits on good days. Others… not so much.</p><p>But here’s the silver lining — despite the mixed performance, I managed to secure three more <a href="https://www.fintokei.com/?affiliate=1334">Fintokei</a> payouts! That brings my total to eight payouts since we started this journey. It’s not enough to make me rich, but it’s tangible proof that our approach has merit, even when I’m too distracted to babysit it properly.</p><p><strong>The strategy that worked a bit better this month is the one I use for my own capital. I’m now +40%, which feels great!</strong></p><h3>An Unexpected Recognition</h3><p>The most surprising development came when <a href="https://www.fintokei.com/?affiliate=1334">Fintokei</a> reached out to me about contributing to their “Fintokei Stars” program with an interview. Apparently, someone noticed our consistent payouts and wanted to feature our story.</p><p>I’m honestly not sure how this will go. I’m definitely not your typical trader — no fancy charts on multiple monitors, no hourly market analysis, no emotional reactions to news events. Most of my trading happens while I’m focused on completely different things, managed by algorithms I wrote during weekend coding sessions.</p><p>But maybe that’s exactly what makes it interesting? The idea is that you can build a systematic approach to trading without becoming consumed by it. We’ll see if their audience finds our technical, almost robotic approach as fascinating as I do.</p><h3>The Data Problem Gets Worse</h3><p>The bigger issue that’s been gnawing at me is the growing discrepancy between what our analytical app predicts and what actually happens in live trading. <a href="https://medium.com/@vhodek/crazy-volatility-the-unpredictable-april-13-9d641f2562e3">In April, I attributed the difference to extreme volatility, causing trades to open and close within single-minute candles.</a> But May’s results suggest the problem runs deeper.</p><p>Our simulations are becoming increasingly unreliable, which makes it nearly impossible to confidently optimize our strategies. It’s like trying to navigate with a compass that points in random directions — you might eventually reach your destination, but you’ll waste a lot of time getting there.</p><h3>Back to the Fundamentals</h3><p>In search of better analysis, I decided to go back to basics and extract as much real market data as possible. This led me down the rabbit hole of MetaTrader’s backtesting capabilities, which can provide tick-level data rather than just minute-by-minute candles.</p><p>The theory was simple: if I could simulate our strategies using actual tick data, we’d get much more accurate predictions. No more guessing whether stop loss or take profit was hit first within a candle — we’d know exactly what happened and when.</p><p>I spent a few stolen half-hours here and there building a new version of our analytical approach based on this tick data. The initial results were… disappointing. Despite having more granular data, the predictions still didn’t match reality as closely as I’d hoped.</p><h3>The Endless Iteration</h3><p>So here I am again, back to data processing fundamentals, trying to figure out where our models are going wrong. It’s funny how this trading hobby keeps pulling me back to the kind of low-level data work I used to do more often in my early programming days.</p><p>The irony isn’t lost on me. We started this journey to create a hands-off, automated trading system. Yet here I am, spending more time analyzing data than some day traders spend watching charts. The difference is that I’m building tools and systems rather than making emotional decisions based on red and green candles.</p><h3>Looking Forward</h3><p>Despite the frustrations with data accuracy, I remain optimistic about our approach. The Fintokei payouts prove that something is working, even if our analytical tools aren’t perfect yet. Sometimes the best strategy really is to let your algorithms run while you focus on everything else in life.</p><p>June is shaping up to be just as busy, but I’m hoping to carve out a few weekend hours to make more progress on the tick data analysis. After all, the goal was never to become a full-time trader — it was to build something that works without consuming my life.</p><p>Btw, you can get a discount for a <a href="https://www.fintokei.com/?affiliate=1334">Fintokei</a> account using my discount code <strong>KAMEXPERT</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b549da35b125" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crazy Volatility: The Unpredictable April #13]]></title>
            <link>https://vhodek.medium.com/crazy-volatility-the-unpredictable-april-13-9d641f2562e3?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d641f2562e3</guid>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[trump]]></category>
            <category><![CDATA[money]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[personal-story]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Fri, 02 May 2025 15:43:52 GMT</pubDate>
            <atom:updated>2025-05-02T15:45:31.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M11fMPurhDfLn8wSDYPYOA.png" /></figure><p>April turned out to be quite the rollercoaster for our trading journey. <a href="https://medium.com/@vhodek/from-red-to-black-trading-recovery-while-life-takes-priority-12-9300196da8f7">If there’s one thing I’ve learned about trading</a>, it’s that the market always finds new ways to challenge you, and this month was no exception, with volatility reaching levels that made our algorithms work overtime.</p><p>Let’s start with the good news — I ended April with a profit across all accounts. My personal account, where I invested back in November, is now up +18%. That might not sound earth-shattering to some, but considering I was down 25% at one point, this feels like a massive victory. There’s something incredibly satisfying about climbing out of that hole and seeing positive numbers again.</p><p>I’ve been cashing out from <a href="https://www.fintokei.com/?affiliate=1334">Fintokei</a> more frequently, too. Rather than letting profits accumulate, I requested three more payouts this month, bringing the total to six. My philosophy here is simple — I’d rather have the money in my account than floating around in the trading platform. Maybe I’m still a bit scarred from those earlier losses, but having tangible returns feels reassuring.</p><p>Of course, I still invested more money in <a href="https://www.fintokei.com/?affiliate=1334">Fintokei</a> than I’ve got back. But I need to test different strategies and no risk, no gain, right? I even opened another account to experiment with a completely different approach. My brother would probably call me crazy, but diversification seems like a reasonable hedge against uncertainty.</p><p>To help manage the emotional side of trading, I added a small chart to visualize long-term progress. It’s easy to get discouraged when you hit a few negative days in a row, but zooming out to see the overall trajectory puts things in perspective. The end of April wasn’t great, but I’m confident we’ll get back on track.</p><figure><img alt="A simple chart to visualize the progress of our trading strategy." src="https://cdn-images-1.medium.com/max/914/1*Ri8AR66kFSBoSarHrhh9JA.png" /><figcaption>A simple chart to visualize the progress of our trading strategy.</figcaption></figure><p>The most puzzling aspect of April was that despite ending with positive results across the board, our statistical app predicted we should have been deep in the red. In the past, we’ve seen minor discrepancies between predicted and actual results, usually due to slippage or similar factors. But this level of difference demanded investigation.</p><p>After some head-scratching, I figured out the answer — the unusually high volatility (thanks, Trump) meant many trades were opening and closing within the same minute candle. Our algorithm simply can’t see what happens inside a candle — whether stop loss or take profit was hit first. To be conservative, we always assume the negative outcome in uncertain situations, preferring to optimize for the worst case rather than being overly optimistic.</p><p>This revelation leaves me with a few potential solutions:</p><ol><li>Wait for volatility to decrease — eventually, the Trump-induced market swings will stabilize</li><li>Ignore the ultra-quick trades in our calculations — though this could lead to unreliable results</li><li>Start recording tick data to simulate exact price movements — but this wouldn’t scale to the millions of combinations we need to test</li><li>Pivot to different indexes less affected by the current volatility</li></ol><p>For now, I’m doing nothing and seeing what May brings. Between Localazy, family obligations, and everything else going on, I simply don’t have time to implement major changes to our trading strategy.</p><p>Sometimes the best strategy is to let your algorithms run and focus on the rest of your life. After all, wasn’t that the whole point of automated trading in the first place?</p><p>Btw, you can get a discount for a Fintokei account using my discount code <strong>KAMEXPERT</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d641f2562e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Red to Black: Trading Recovery While Life Takes Priority #12]]></title>
            <link>https://vhodek.medium.com/from-red-to-black-trading-recovery-while-life-takes-priority-12-9300196da8f7?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9300196da8f7</guid>
            <category><![CDATA[localization]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[money]]></category>
            <category><![CDATA[personal-story]]></category>
            <category><![CDATA[trading]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Tue, 15 Apr 2025 23:02:17 GMT</pubDate>
            <atom:updated>2025-04-15T23:02:17.923Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3-i8FfP8ARqYu9W6JeL5jg.png" /></figure><p><a href="https://medium.com/@vhodek/first-payout-and-summer-time-just-one-more-adjustment-11-099e579fdb2a">After generating millions of possible trading combinations in our last adventure</a>, you might expect a grand finale with a perfect strategy. But life, as always, had other plans for me.</p><p>For the past few weeks, I’ve been operating with the “old” strategy — not because it was ideal but because my personal life demanded attention. Sick kids and family needs pulled me away from tinkering with trading algorithms. And, of course, Localazy kept me busy, especially with our company-wide hackathon where colleagues from across Europe gathered for a week of collaboration and fun.</p><figure><img alt="Part of the Localazy team discussing playing a localization quiz!" src="https://cdn-images-1.medium.com/max/900/1*HRSgktnEUgP0EZQifjQZaQ.jpeg" /><figcaption>Part of the Localazy team discussing playing a localization quiz!</figcaption></figure><p>Through all this, my small home server continued humming away, running six instances of MetaTrader 4 that executed trades on my behalf. It’s fascinating how something I built as a hobby project has become this autonomous system that keeps working even when I can’t pay attention to it.</p><p>The market itself has been a wild ride, thanks to the situation in the US with tariffs and economic policy shifts. While these created some unexpected behaviors (and yes, a few painful losses), they actually helped our strategy in many ways. When there’s a clear trend — up or down doesn’t matter — our algorithm tends to perform better.</p><p>I’m pleased to report that I received two more payouts from <a href="https://my.fintokei.com/affiliate/en/1334">Fintokei</a>, effectively covering my initial investment in those two testing accounts. I actually got back more than I put in! It’s a small victory, but it&#39;s satisfying, nonetheless.</p><p>And, even better, my real money accounts have finally climbed out of the red. The current market events sometimes create rapid swings, sending my balance up and down unpredictably. I still worry about potential downward trends, but I’ve gained more confidence in our strategy’s resilience regardless of market direction — it just needs the right parameters.</p><p>Here’s how my account balance has progressed — I started with 550k and eventually dropped as low as ~400k. Unfortunately, I don’t have detailed data for that depressing period, only for the last month. The recovery path has definitely not been linear:</p><figure><img alt="Trading Balance Chart showing recovery from losses, with many ups and downs." src="https://cdn-images-1.medium.com/max/901/1*NEK22rC-AdVb-Xc9mrh3ew.png" /><figcaption>Trading Balance Chart showing recovery from losses, with many ups and downs.</figcaption></figure><p>I still need to grow two more <a href="https://my.fintokei.com/affiliate/en/1334">Fintokei</a> accounts to reach payout thresholds, so technically, I’m still in the red overall. But the trajectory is positive.</p><p>My brother recently suggested some updates to our analytical app since managing so many strategies has become increasingly cumbersome. That’s the next improvement on our list. In the few weeks since our last adventure, I’ve only managed to spend about 30 minutes simplifying our web coordination service to make it more comfortable to handle dozens of strategies.</p><p>As for those millions of combinations I was generating? After 10 days of running (and two complete crashes of the mini server), I ended up with 120,000 variants that passed my initial filters. There’s obviously another level of filtering needed to make this data actionable, but that’s a project for when I can find a few spare minutes.</p><p>Trading, I’ve discovered, is much like software development — there’s always one more optimization, one more feature, one more improvement to make. But sometimes, the wisest choice is to let your system run while you focus on what truly matters: family, work, and finding balance amid the chaos.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9300196da8f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First Payout and Summer Time: Just One More Adjustment #11]]></title>
            <link>https://vhodek.medium.com/first-payout-and-summer-time-just-one-more-adjustment-11-099e579fdb2a?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/099e579fdb2a</guid>
            <category><![CDATA[trading-strategy]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[personal-story]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Wed, 26 Mar 2025 18:49:46 GMT</pubDate>
            <atom:updated>2025-03-26T18:49:46.051Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CX6m3ExfFqZv_zNtwl1-WQ.png" /></figure><p><a href="https://medium.com/@vhodek/multiple-trading-strategies-solving-the-final-puzzle-10-98f26f5e1009">In my previous post, I shared our breakthrough with multiple trading strategies.</a> After extensive analysis and testing, we had finally identified a combination of 13 different strategies that eliminated negative months across 26 consecutive months of historical data. March 2025 was set to be our first full month of implementing this new approach.</p><p>But as with everything in our trading journey, a new challenge was waiting just around the corner.</p><p>As March approached, we realized we had overlooked something significant: daylight saving time changes. On March 10th, the US switched to summer time, affecting the time displayed in MetaTrader 4. Meanwhile, our time in Central Europe remained unchanged, as did the German time that governs the DAX.</p><p>This created a discrepancy in our carefully timed trading windows. All of our strategies were based on specific times of day when certain market patterns tend to occur. With the time shift, all our carefully calculated entry points were suddenly off by an hour.</p><p>The immediate fix was straightforward enough: we needed to shift all our scheduled trades one hour forward. I quickly updated our coordination service to reflect this change, and our Expert Advisors immediately adapted to the new schedule.</p><p>But then came the realization that hit me like a bucket of cold water: our analytical app, the one we’d used to develop our entire strategy, hadn’t accounted for these time changes when analyzing historical data. This meant that the patterns we’d identified might be skewed or even completely wrong for periods affected by daylight saving time differences.</p><p>My brother, ever determined, took on the task of recalculating our entire strategy. He messaged me that he was diving deep into the data, and I didn’t hear from him until the next morning. Around 7 AM, I received a text: “Heading to bed now. I will continue after a few hours of sleep.”</p><p>Not only had he fixed the time-related issues, but he’d also managed to improve our approach even further and added two new trading windows.</p><p>And so… here we were again, facing another delay to our plans. Instead of March being our first full month with a stable strategy, we’d have to wait until April. Trading sometimes feels like a never-ending cycle of “just one more adjustment” before things can really start working.</p><p>Since the second half of February, our modified approach had been showing signs of stability. It wasn’t perfect — there were still days with losses, and we experienced periods where our accounts seemed to hover around the same balance for a week or so, oscillating between small gains and losses.</p><p>But importantly, we were also seeing profitable days — days where multiple strategies aligned and delivered solid returns. And as any trader will tell you, no profitable trading strategy is perfectly linear. The path to profitability is always jagged, with ups and downs along the way.</p><p>These profitable days eventually led to something I’d been waiting for: one of my testing <a href="https://my.fintokei.com/affiliate/en/1334">Fintokei</a> accounts finally reached the threshold for payout, reaching +10% from the initial amount. <a href="https://my.fintokei.com/affiliate/en/1334">Fintokei</a> responded swiftly with a payout, which felt like a small victory amid all the challenges. Honestly, it was perfect timing in the first place since, during the next few days, losses hit me again.</p><p>So, despite still being in a deep loss on my regular account (with real money), I received some extra reward for all the work we’d put into developing our tools and strategies. It wasn’t enough to offset our losses, but it was tangible evidence that we were on the right track.</p><p>And maybe, just maybe, April would finally be the month where everything came together — where our algorithms, our infrastructure, and our strategy would work in harmony to deliver the consistent results we’d been working toward for so long, and we will need no further changes, at least for some time… but I strongly doubt it…</p><p>As I’m writing these words, the CPU fan of my small home server has been rotating like crazy for two straight days. Since my brother improved the strategy, we’ve realized there’s still some room for further optimization. We’re now generating hundreds of millions of possible combinations, analyzing them with the filters I described in previous posts. The quest for the perfect trading strategy continues… maybe, just maybe, more smaller trades per day will yield even better results.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=099e579fdb2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multiple Trading Strategies: Solving the Final Puzzle #10]]></title>
            <link>https://vhodek.medium.com/multiple-trading-strategies-solving-the-final-puzzle-10-98f26f5e1009?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/98f26f5e1009</guid>
            <category><![CDATA[trading-strategy]]></category>
            <category><![CDATA[personal-story]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[trading]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Sun, 23 Mar 2025 15:18:23 GMT</pubDate>
            <atom:updated>2025-03-23T15:21:28.445Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cVfP2DHbEYXECTlKNYJo6Q.png" /></figure><p><a href="https://medium.com/@vhodek/data-driven-trading-engineering-our-way-to-better-trading-9-df0de11b638f">In my previous post, I shared how we analyzed thousands of potential trading strategies</a> using our custom “Cubic Killer” algorithm and identified 10 promising trading windows across the day. This approach marked a significant shift from our initial one-trade-per-day strategy, but as with everything in trading, new solutions often reveal new challenges.</p><p>After spending an entire Saturday diving into the massive Excel file, our algorithm had generated, we were ready to explore the potential of multiple trades per day. However, during a few testing runs, this approach quickly unveiled several critical insights we hadn’t anticipated.</p><h3>The Long/Short Divide</h3><p>Until this point, our strategy had been direction-agnostic — we traded both long and short positions using the same parameters, not caring much about trend direction since positions could eventually cover one another. This simplicity was part of what initially attracted me to algorithmic trading — no need to predict market movements, just rely on statistical probabilities.</p><p>But as we expanded to multiple trading windows, a surprising pattern emerged. Some strategies showed significantly higher probabilities only in one direction. A strategy might have a 70% win rate for long positions but only 45% for shorts — essentially making the short trades a money-losing proposition.</p><p>For the first time, we needed to split longs and shorts and trade them separately. This doubled the complexity of our approach but promised much better results. Instead of forcing every strategy to work in both directions, we could cherry-pick the best direction for each trading window.</p><h3>The Hidden Cost: Commission and Slippage</h3><p>Our first real-world test of multiple trades per day delivered a brutal reality check: the actual results differed dramatically from what our analytical app had predicted. The app correctly estimated lost and won trades, but the final balance differed. The culprit? Transaction costs.</p><p>With our original one-trade-per-day approach, we typically opened larger positions. The impact of commission and slippage on these trades was minimal relative to the potential profit. But as we shifted to many smaller trades throughout the day, these costs quickly added up, eating significantly into our margins.</p><p>Our analytical app had been calculating how many pips we could earn using a given strategy, but this simplified approach wasn’t enough anymore. We needed to extend our app to calculate in real currency terms, factoring in both commission and average slippage.</p><p>This adjustment was crucial — without it, a strategy that looked fantastic on paper could actually lose money in practice. The math was still on our side, but only when we accounted for all the variables.</p><h3>The Combinatorial Challenge</h3><p>Armed with these insights, we improved our analytical app by adding a “library of strategies” that allowed us to combine different approaches to find the optimal mix. We organized strategies into groups, with the rule that only one strategy from each group could be active at any given time.</p><p>This approach lets us test various combinations, seeking not just individually profitable strategies but ones that complement each other. A strategy with a lower probability of success might still be valuable if it tended to win on days when other strategies lost, helping to smooth out the overall performance curve.</p><p>We started with about 50 different strategies across 10 groups. But the combinatorial explosion quickly became apparent. The number of possible combinations was astronomical, far beyond what we could calculate in our lifetime.</p><p>So, we had to be strategic, enabling and disabling different combinations and analyzing them in manageable chunks. The process was tedious but ultimately rewarding.</p><p><strong>And finally, we found it!</strong> We identified several combinations that yielded positive results for every single month across the 26 consecutive months of historical data we had! After months of roller-coaster results, this consistency was exactly what we sought.</p><p>Encouraged by this breakthrough, my brother dove even deeper, eventually developing a set of 13 different strategies that not only eliminated negative months but ensured that even the worst-performing month was still reasonably profitable.</p><p>Such a stable strategy also looked perfect for trying out for <a href="https://my.fintokei.com/affiliate/en/1334">Fintokei trading</a>. So, I didn’t wait a minute and immediately got one SwiftTrader to put it into the real-life test.</p><h3>The Real Test Begins</h3><p>Since this new trading approach had proven profitable across so many months and market conditions, we had reason to believe it would work long-term. But the only true test would be to trade it consistently for several months.</p><p>Until this point, we had never used the same strategy for a full month. We were always tweaking, adjusting, or completely pivoting based on recent results — a practice that likely contributed to our inconsistent performance.</p><p>March 2025 became our first candidate for a full month of trading with our new multi-strategy approach. The infrastructure was ready, the parameters were set, and the algorithms were in place.</p><p>But there was one more catch…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98f26f5e1009" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data-Driven Trading: Engineering Our Way to Better Trading #9]]></title>
            <link>https://vhodek.medium.com/data-driven-trading-engineering-our-way-to-better-trading-9-df0de11b638f?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/df0de11b638f</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[trading-strategy]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[personal-story]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Wed, 19 Mar 2025 08:33:36 GMT</pubDate>
            <atom:updated>2025-03-19T08:33:36.576Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lgGSb4Gqio3fKUHNyIuv5w.png" /></figure><p><a href="https://medium.com/@vhodek/our-trading-strategy-evolution-a-few-more-issues-8-3a71340d94b3">In my previous post, I shared how our trading strategy evolved to include multiple trades per day</a>. We discovered that expanding beyond our single morning trade significantly changed the dynamics — some days, we’d get double losses; other days, double wins, and sometimes, the positions would cancel each other out. This approach decreased the number of losing days considerably.</p><p>But even with two trades, we were still facing unprofitable months and challenging “losing streaks” that coincided with shifts in market volatility. The solution seemed clear: to dramatically improve our odds, we needed more trading windows spread across the entire day.</p><p>The complexity of analyzing hundreds of trading days with thousands of potential combinations quickly exceeded manual capabilities. Our existing analytical tools were helpful, but they still required human intervention to select the best options. For a mass-scale analysis, we needed something better—an algorithm that could automatically identify optimal configurations without constant human oversight.</p><h3>Part 1: Search for an Evaluation Algorithm</h3><p>Until now, we have been using our analytical app mostly “manually,” searching through combinations, filtering, and sorting them based on absolute win/loss ratios or profitability.</p><p>Neither of these filters was perfect. Absolute W/L ratio tended to find combinations with crazy ratios between take profit (TP) and stop loss (SL) — often almost unprofitable. Meanwhile, solely profitability-based searches gave us great results over the long term, but with wild drops and low W/L ratios.</p><p>The first step was to balance the W/L ratio by the TP/SL ratio, finding combinations with a lower chance of winning but much better profitability and stability. We called this RWL (relative win/loss ratio), but it still wasn’t a solution that could automatically identify the best trades.</p><p>I spent a week thinking about a new algorithm — I don’t mean the whole week; it was more toilet thinking, giving it thoughts when I had a few spare minutes :-).</p><p>In the end, I came up with an updated algorithm we called WAR that evolved into WAR2 and later into something we called “Cubic Killer.” It uses a quadratic function controlled by profitable months, non-losing days, TP/SL ratio, and profitability to estimate the best trading strategies. The identified strategies can often be tweaked manually to get better results, but the algorithm itself can cope with almost anything that can happen in the market and correctly estimate viable trading strategies — profitable and stable in most cases.</p><p>What made the Cubic Killer special was its ability to balance different aspects of trading performance. This approach meant we could finally move beyond the frustrating cycle of finding strategies manually.</p><h3>Part 2: Analysis at Scale</h3><p>Having the evaluation algorithm ready, I quickly updated our existing analytical app to generate different combinations, which I later wanted to run through various filters. I ran the very first version and kept it running for about 2 hours in the background before my hard drive ran out of space. A 2TB disk was clearly not enough for no more than 1–2% of the data.</p><p>So, I needed to change my approach. I generated a particular combination across all days, analyzed it with several predefined filters, stored the best results as JSON, and deleted the generated data to make space for the next iteration. When all the different combinations were generated, I could just join the JSONs and get the best possible strategies.</p><p>My i9, with plenty of CPUs and RAM, kept running the algorithm for a full 4 days. Then, it produced an 8MB Excel file listing the best trading strategies. The file contained thousands of potential combinations, each with its own set of parameters and performance metrics across different market conditions. It was a goldmine of data, but extracting actionable insights would require careful analysis.</p><h3>Part 3: Manual Review</h3><p>The longest time I ever spent on our trading “hobby” was analyzing this mega Excel file, looking for viable configurations for our trades. It took me a whole Saturday. Coffee became my best friend as I sorted through rows and rows of data, looking for patterns and opportunities that the algorithm had identified.</p><p>I managed to find 10 different possible trading windows across the whole day. These weren’t just random times — they represented specific market conditions where our strategy had the highest probability of success based on historical data. Some were concentrated around market opening, others around lunch hours, and some near the close — each with its own unique characteristics.</p><p>This was the first step to our new approach of multiple trades per day. However, we still needed to find the best trading strategies for each of the windows manually. The algorithm had narrowed down the possibilities, but human judgment was still necessary to make the final selections and fine-tune the parameters. We were not looking for the best strategies — we were looking for strategies that can complement each other.</p><p>For the first time in our trading journey, I felt we were on the verge of something truly promising. However, before diving deeper, we needed a tool to analyze how all the strategies play together…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df0de11b638f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Our Trading Strategy Evolution: A Few More Issues #8]]></title>
            <link>https://vhodek.medium.com/our-trading-strategy-evolution-a-few-more-issues-8-3a71340d94b3?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a71340d94b3</guid>
            <category><![CDATA[personal-story]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[trading-strategy]]></category>
            <category><![CDATA[trading]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Mon, 17 Mar 2025 21:09:42 GMT</pubDate>
            <atom:updated>2025-03-18T12:41:35.922Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PdKIrqjJYrqsierzOCSFQ.png" /></figure><p><a href="https://medium.com/@vhodek/the-trading-tech-stack-from-kotlin-to-docker-7-cafeb94b42b5">In my previous post</a>, I shared how our trading infrastructure evolved into a sophisticated system with analytical tools, connected EAs, and a central management dashboard. Despite this technical marvel, we were still losing money. Today, I want to explore why and share how we evolved our approach.</p><h3>The Algorithm: A Closer Look</h3><p>Our trading strategy operates on a specific principle:</p><ol><li>We define a time interval to analyze market behavior using our proprietary approach</li><li>Our analytical algorithm takes 2 parameters to normalize trends and output a baseline</li><li>We schedule a trade at a specific time with a predefined expiry, starting at the baseline with specific take profit (TP) and stop loss (SL) values</li><li>The position closes automatically when it hits TP/SL or reaches a forced close time</li><li>This works for both long and short positions</li></ol><p>In theory, with the right parameters, this approach should be profitable. Sometimes we lose, sometimes we win, but the math suggests a positive outcome over time.</p><p>What’s important about this approach is that it freed us from the constant need for fundamental analysis or news monitoring. Sure, with a deeper knowledge of market events, we could theoretically adjust trades on specific days, but I neither have the time nor the inclination for that kind of engagement. This purely technical strategy, based solely on chart trends, aligns perfectly with my preferences.</p><h3>The Hidden Challenges</h3><p>We discovered several issues that weren’t obvious at first:</p><p><strong>Capital Management Problems</strong>: Whenever we took profit, our algorithm automatically updated the volume to use all available capital. This meant losses could evaporate more money than subsequent profits earned, creating an unfavorable ratio. And if we experienced multiple stop losses in a row? The problem compounded dramatically.</p><p><strong>Limited Analysis Scope</strong>: Our initial analysis only optimized TP and SL values. With our improved algorithm, we could also find better parameters for baseline calculations, but the trading time intervals were still based solely on my brother’s research.</p><p><strong>Single Trade Limitation</strong>: We were only able to open one trade per day in the morning. That was it — profit or loss, nothing more. No diversification, no second chances.</p><h3>The Psychology of Trading</h3><p>I’ve always considered myself level-headed when it comes to business decisions, but trading exposed emotional vulnerabilities I didn’t know I had. Seeing consecutive losses on the dashboard triggered responses that weren’t entirely rational.</p><p>Some mornings, I would wake up, check our trading dashboard, and feel my stomach drop at the sight of another red day. Even though our analysis showed that losses were an expected part of the process, each one still felt like a personal failure.</p><p>The math did check out — in theory. Our simulations consistently showed profitability over longer periods. But living through the losses day by day was a different experience altogether.</p><h3>Expanding Our Strategy</h3><p>My brother spent countless hours identifying another time interval for profitable trading. It was still in the morning but different enough to serve as a second opportunity. This changed the dynamics significantly:</p><ul><li>Some days we’d get a double loss</li><li>Other days we’d get double wins</li><li>Sometimes the positions would cancel each other out (one loss, one win)</li></ul><p>The probability shifted in our favor since it decreased the number of losing days considerably. We realized it was more important to have fewer bad days than to maximize profits on good days.</p><p>The second trade acted as a kind of emotional hedge. If the first trade went south, we still had another chance for the day to end positively. This psychological benefit almost outweighed the mathematical advantage. And there was another big benefit. <a href="https://my.fintokei.com/affiliate/en/1334">A stable trading strategy is much better for our Fintokei accounts.</a></p><p>However, even with two trades per day, historical data analysis showed that while the strategy was profitable long-term, there were still unprofitable months. This created challenges both psychologically and for volume optimization.</p><p>One particularly challenging pattern we identified was what we called “losing streaks” — periods where the market seemed to actively work against our strategy. Our analysis showed that these weren’t just random bad luck but often coincided with shifts in market volatility or liquidity conditions.</p><h3>The Next Frontier</h3><p>Expanding to two trades helped us to discover what we really needed: more trades spread across the whole day could dramatically improve our odds. However, such an analysis quickly grew beyond my brother’s capabilities. The complexity became overwhelming, with too many variables to track manually and too many interactions to predict reliably.</p><p>We needed to analyze hundreds of trading days, and for each day, we had to test over 2,000 different combinations that our preliminary research had identified as potential candidates for viable time intervals.</p><p>And therein lay another challenge. While our analytical app provided an excellent starting point for this research, we had been using it to manually analyze parameters and select the best options based on our risk criteria and intuition. For a mass-scale analysis of this magnitude, we needed an algorithm that could automatically identify optimal configurations without human intervention.</p><p>Let’s get back to programming…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a71340d94b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Trading Tech Stack: from Kotlin to Docker #7]]></title>
            <link>https://vhodek.medium.com/the-trading-tech-stack-from-kotlin-to-docker-7-cafeb94b42b5?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/cafeb94b42b5</guid>
            <category><![CDATA[personal-story]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[trading-strategy]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Mon, 10 Mar 2025 15:41:53 GMT</pubDate>
            <atom:updated>2025-03-18T12:41:19.083Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pRwkXeHie-Zf-42JlkUNKg.png" /></figure><p><a href="https://medium.com/@vhodek/from-triumph-to-tribulation-the-harsh-reality-of-trading-6-8a309548b0ab">In my last post, I shared how our initial trading success quickly turned into a sobering 25% loss. </a>The holiday trading period of 2024 taught us an expensive lesson about market conditions and emotional decision-making. But as I mentioned, it’s not in my character to throw in the towel. While licking our wounds, I channeled my energy into creating better tools.</p><p>While working on the next version of our analytical tool, we continued using the old one to search for better strategies. The first version had served us well for identifying our initial approach, but its limitations were becoming increasingly apparent. The ability to test only 100,000 variants in a few minutes simply wasn’t sufficient for the depth of analysis we now knew we needed.</p><p>At the same time, we began exploring <a href="https://my.fintokei.com/affiliate/en/1334">Fintokei.com</a> as a way to expand beyond our available capital. This platform presented an interesting opportunity, but it also pushed us in a specific direction. Fintokei is designed around consistency rather than sheer luck, which aligned perfectly with our new goal of developing more stable trading algorithms, even if they were potentially less profitable in absolute terms.</p><p>However, this expansion introduced new challenges. Managing multiple accounts, updating the Expert Advisor on each of them, and providing the correct settings (which varied by account) quickly became complicated and error-prone. It was clear we needed a more sophisticated infrastructure.</p><p>In the end, my quest for better analytical tools resulted in the development of four distinct components that worked together as a complete system:</p><h3>1. UI Analytical Tool: Finding the Needle in the Haystack</h3><p>The biggest change in our approach was fundamental. Instead of simulating trades step by step, we now analyzed chart lows and highs directly, populating thousands of combinations in a fraction of a second. In the same time that the previous version needed to calculate 100,000 combinations, the new version could process 4 million variants. And that allows us to extend from two variable parameters to four of them.</p><figure><img alt="The calculation in progress… it still needs several minutes for detailed analysis." src="https://cdn-images-1.medium.com/max/1024/1*ET-vXah9rYwlkZXy4KZGcg.png" /><figcaption>The calculation in progress… it still needs several minutes for detailed analysis.</figcaption></figure><p>This breakthrough came with its own challenge: it was no longer possible to analyze all this data in memory. We started storing results to files — monthly data, pre-counted filters, and daily trade results. Depending on the level of detail in the analysis, it wasn’t unusual to end up with 50–100 GB of data.</p><p>The filters we developed were able to access files randomly, analyze the results quickly (in seconds), and identify the best options. I created various filters ranging from the simplest ones (highest profit, great for establishing a baseline) to more sophisticated approaches like “Cubic Killer” that combined multiple parameters to identify strategies that were both profitable and stable.</p><p>Building on the foundation of the previous version in <a href="https://www.jetbrains.com/compose-multiplatform/">Compose Multiplatform</a>, I was able to quickly iterate and develop a more powerful (and more beautiful) app that not only helped find promising strategies but also allowed us to analyze them through responsive tables.</p><figure><img alt="The actual screenshot of analytical table with data." src="https://cdn-images-1.medium.com/max/1024/1*pH_p9AyRbKsfIvRvF0c_gA.png" /><figcaption>The actual screenshot of analytical table with data.</figcaption></figure><h3>2. Connected Expert Advisor: Smart Automation</h3><p>We were able to refine strategies almost daily, but this made using the EA across multiple accounts a complete nightmare. Every time we identified improved parameters, we needed to update the EA on each trading machine manually — a tedious process that involved editing code, recompiling, and redeploying. As the number of accounts grew, this approach simply wasn’t sustainable.</p><p>This challenge led to the new version of our EA, which represented a significant advancement over the original. Now connected to the internet, it reported its state every 10 seconds and downloaded updated data from our coordination services.</p><h3>3. Online Coordination Service: Command Central</h3><p>To tie everything together, I developed a simple web app written in Kotlin (using <a href="https://javalin.io/">Javalin</a>) with a <a href="https://vuejs.org/">Vue3</a> + <a href="https://vuetifyjs.com/en/">Vuetify</a> frontend. This service acts as a central management system for all our EA traders and strategies. Each EA connects to it, sending operational data including balance, spread, margin, active trades, and state flags.</p><p>This dashboard not only displays this information in an easily digestible format but also automatically calculates optimal volumes based on current parameters to make the best use of our capital. When we find a better strategy using our analytical tool, we simply add it to the web app, assign it to traders, and it’s automatically distributed.</p><p>Additionally, using <a href="https://betterstack.com/?ref=b-d7nd">BetterStack</a>, we can monitor all traders and be alerted to potential issues immediately. It was really important to introduce such a feature to our stack, because we lost a few trading days thanks to unstable MT4 or lack of internet connection.</p><p>The service was a huge step forward in terms of convenience — no more need to have MetaTrader installed on my phone for quick checks. Now I can simply review the state of all accounts in a browser without switching between accounts or navigating through different MetaTrader screens.</p><figure><img alt="The screenshot of the command center listing two demo acounts." src="https://cdn-images-1.medium.com/max/1024/1*33c5ixdvSMTsT33f3gPOAg.png" /><figcaption>The screenshot of the command center listing two demo acounts.</figcaption></figure><h3>4. Docker + Wine + RDP: Scalable Infrastructure</h3><p>The old laptop I had been using to run MetaTrader 4 was no longer a viable solution. It could barely handle one MT4 instance, and now I needed 5–6 of them. So I switched to a monitor-less mini computer with an i5 processor and 16GB RAM running Ubuntu Server Edition.</p><p>After experimenting with <a href="https://www.docker.com/">Docker</a>, <a href="https://www.xfce.org/">XFCE</a>, <a href="https://www.winehq.org/">Wine</a>, and <a href="https://en.wikipedia.org/wiki/Remote_Desktop_Protocol">RDP</a>, I built a containerized solution that, once started, automatically initializes an RDP session and runs predefined applications. I wrote several bash scripts to streamline the process, making it simple to:</p><ul><li>Start an empty image with preinstalled MT4</li><li>Sign in to an account</li><li>Configure the EA (which from that point onwards is automatically updated to the newest version on each restart)</li><li>Connect to the web service</li></ul><p>Once configured, the container runs without a connected monitor, communicating with the outside world solely through the web service while happily trading on my behalf.</p><h3>A New Beginning… With Familiar Challenges</h3><p>With these four components in place, we entered 2025 with a dramatically improved technical infrastructure. We could find better strategies and iterate on them quickly…</p><p>But despite this technical marvel, there was just one problem…</p><p>We were still losing money.</p><p>The sophisticated tools had given us better visibility and more efficient operations, but they hadn’t fundamentally solved the challenge of finding a truly robust strategy for all market conditions. The technology was running flawlessly — executing exactly what we asked it to do — but what we were asking it to do still wasn’t consistently profitable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cafeb94b42b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Triumph to Tribulation: The Harsh Reality of Trading #6]]></title>
            <link>https://vhodek.medium.com/from-triumph-to-tribulation-the-harsh-reality-of-trading-6-8a309548b0ab?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a309548b0ab</guid>
            <category><![CDATA[trading-strategy]]></category>
            <category><![CDATA[personal-story]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[stock-market]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Thu, 06 Mar 2025 09:57:43 GMT</pubDate>
            <atom:updated>2025-03-18T12:41:05.945Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zflh37lKE4wHvBmtOGkxYw.png" /></figure><p><a href="https://vhodek.medium.com/trading-optimization-building-a-compose-multiplatform-tool-for-parameter-testing-cc7f498d56bd">In my previous post</a>, I shared how my brother and I had reached a milestone in our trading journey: a 25% increase in capital in just one month using our algorithmic strategy. While not extraordinary by some standards, it represented a significant validation of our approach and the tools we’d built. Our Compose Multiplatform application had helped us refine our parameters, our Expert Advisor in MQL4 was executing trades flawlessly, and our confidence was high.</p><p>But as any seasoned trader will tell you, the market has a way of humbling even the most well-prepared ones.</p><p>Our initial strategy was optimized for trending markets — situations where prices move decisively in one direction or another. We didn’t care which way the market moved, as long as it <em>moved</em>. Up or down, our algorithm was designed to profit from the momentum.</p><p>What we hadn’t fully accounted for was how quickly market conditions could change. The DAX entered a period of low volatility, where prices oscillated in narrow ranges without establishing clear trends. For our strategy, this was the worst possible scenario. Our approach had been optimized for a specific market condition that no longer existed. Even worse, low volatility typically led to stop losses eating our previous profits.</p><p>To make matters worse, self-confident from our early success, I had added more capital to our account. What started as an experiment with manageable risk had morphed into something that could cause real financial loss.</p><p>Within a few days, I watched as our profits eroded. The 25% gain we’d worked so hard to achieve was melting away. As the losses mounted, I began to get nervous. That’s when I made my first mistake: I started tinkering with our system during live trading.</p><p>I experimented with floating stop losses — a concept similar to trailing stops but with more control on our side. These modifications were made out of fear rather than through the systematic testing we had previously employed. While this approach saved us in some trades, it often resulted in premature exits from positions that would have eventually turned profitable. And since our strategy is based on pure probability, lowering our profits destabilized it completely.</p><p>As Christmas 2024 approached, I made my second critical mistake: I decided to continue trading during holidays. Not only was our strategy already struggling in the low-volatility environment, but the holiday trading patterns were completely different from normal market conditions.</p><p>Our 25% gain turned into a 25% loss. A considerable portion of my capital evaporated in a matter of weeks. Trading is as much a psychological challenge as it is a technical one. Watching your account balance shrink day after day tests your resolve in ways few other activities can.</p><p>The emotional toll was immense, but it’s not part of my character to just throw in the towel. I still had faith in the process. Looking at historical data, our approach had been profitable most months. And I wanted my money back!</p><p>Instead of abandoning the project, I decided to go deeper. If our current strategy was suboptimal, we needed to find a better one. This meant expanding our parameter search dramatically, moving from hundreds of thousands of combinations to millions.</p><p>The challenge became finding that needle in a haystack — the optimal strategy among millions of possible variants. Our current tools weren’t designed for this scale of analysis.</p><p>So, whenever I needed a break from my responsibilities as <a href="https://localazy.com/blog/author/vaclav-hodek">CEO of Localazy</a>, I would open IntelliJ IDEA, even if just for half an hour, to work on version 2 of our UI application.</p><p>The trading journey had humbled me, but it hadn’t defeated me. In fact, the setbacks had clarified what we really needed: more sophisticated tools, more rigorous testing, and most importantly, strategies that could adapt to changing market conditions rather than being optimized for a single scenario.</p><p>The lesson was clear: <em>The best learning comes not from success, but from failure.</em></p><p>And I had just received a very expensive education.</p><p>Anyway, the next version of our analytical tool was just around the corner and the story was not yet over…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a309548b0ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trading Optimization: Building a Compose Multiplatform Tool for Parameter Testing #5]]></title>
            <link>https://vhodek.medium.com/trading-optimization-building-a-compose-multiplatform-tool-for-parameter-testing-cc7f498d56bd?source=rss-b5ffa33afa0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc7f498d56bd</guid>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[personal-story]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[compose-multiplatform]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Václav Hodek]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 10:44:05 GMT</pubDate>
            <atom:updated>2025-03-18T12:40:51.988Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GfJfbLjCoURKLluFwbVCew.png" /></figure><p>After setting up our automated trading system on the DAX, my brother and I experienced some impressive early returns. <a href="https://vhodek.medium.com/real-wins-real-losses-from-mql4-to-compose-multiplatform-4-334b93fb4a43">But as I mentioned in my previous article, the emotional rollercoaster of trading hit us hard when we encountered a series of losses.</a> Despite understanding that our strategy had a theoretical 60% win rate, watching those consecutive red days made us question everything.</p><p>We needed more data to validate our approach or find a better one. This meant simulating thousands of different strategy configurations, but there was a problem: our strategy had nine different variables, creating a vast landscape of possibilities to explore.</p><p>I faced two major constraints. First, I didn’t want to spend countless hours on data analysis — my passion and priority remain with <a href="https://localazy.com/">Localazy</a>. Second, my brother isn’t particularly technical; command-line tools feel foreign to him. If we were going to make progress together, I needed to create something more accessible.</p><p>The solution? A user-friendly UI application that would allow us both to test different strategy parameters easily. This seemed like the perfect opportunity to try out <a href="https://www.jetbrains.com/compose-multiplatform/">Compose Multiplatform</a>, a UI framework I’d been curious about for a while.</p><p>I was surprised by how quickly I could get a functional app up and running. Within two hours, I had a basic interface where we could input configuration parameters to serve as the foundation for generating various trading configurations.</p><figure><img alt="Basic interface built in Compose Multiplatform in literary two hours." src="https://cdn-images-1.medium.com/max/1024/1*YeG13uzrf9SvU2olZEkZUA.png" /><figcaption>Basic interface built in Compose Multiplatform in literary two hours.</figcaption></figure><p>The app needed two main features:</p><ol><li>The ability to simulate a single configuration in detail</li><li>The option to run through all possible variants, generating an Excel report highlighting the best options</li></ol><p>For the simulation engine, I built upon my first verification algorithm from the previous project. It was naive — simulating trades step by step rather than using more sophisticated methods — but it was straightforward and gave us the insights we needed.</p><figure><img alt="Results of a particular configuration were shown inside the UI while comparison of different strategies was still just exported to Excel file." src="https://cdn-images-1.medium.com/max/1024/1*AahxOD_IBQK9gQlf3bIzIA.png" /><figcaption>Results of a particular configuration were shown inside the UI while comparison of different strategies was still just exported to Excel file.</figcaption></figure><p>With this unoptimized approach running on my 20-core CPU with parallel processing, I could only simulate about 100,000 variants in 2–3 minutes. This was relatively slow if we wanted to explore more than just the two most critical parameters out of our nine total variables. However, it was sufficient for our immediate needs.</p><p>As I developed the tool, I realized we could improve our strategy by making some parameters dynamic. Instead of using fixed values, certain parameters could adjust themselves based on the day’s trading profile. This wasn’t adding new parameters, but rather making the existing ones more responsive to market conditions.</p><p>For example, instead of having a fixed protection against smaller spikes, we could adjust it based on the day’s volatility — higher on volatile days and lower on calmer days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*98amFJkU30UyhBmg_OoEgg.png" /><figcaption>The initial version was able to calculate with trailing stops. They proved to be limiting profit so we get rid of them later on.</figcaption></figure><p>The moment I showed the tool to my brother, he dove right in. The visual interface made it easy for him to compare different configurations without needing to understand the underlying code. He could quickly identify:</p><ul><li>The most profitable configurations</li><li>Strategies with the highest percentage of profitable days</li><li>The balance between risk and reward in different approaches</li></ul><p>Our simulations revealed something important: we had options. Some configurations promised higher overall profits but with greater volatility. Others offered more consistent returns but with lower overall performance.</p><p>Given the emotional challenges we’d already faced with trading, we decided that stability was our priority for now. The psychological toll of watching big swings in our account wasn’t worth the potential for slightly higher returns.</p><p>By the time we started using this tool, our original strategy had already yielded about a 25% increase in capital over approximately one month. Not bad, but we were confident that our refined approach would provide more consistent results and, importantly, a more manageable emotional experience.</p><p>Oh my, we were so wrong!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc7f498d56bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>