{"id":544,"date":"2026-01-05T09:00:00","date_gmt":"2026-01-05T01:00:00","guid":{"rendered":"https:\/\/philip.twinight.co\/portfolio\/?p=544"},"modified":"2026-05-04T23:24:18","modified_gmt":"2026-05-04T15:24:18","slug":"rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs","status":"publish","type":"post","link":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/","title":{"rendered":"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs"},"content":{"rendered":"\n<p>A few years ago I wrote an FX EA and actually traded it live. Not just backtest, real money on a real broker account. The idea was simple: only trade when it&#8217;s quiet near broker midnight, fade the price when it stretches too far, and get out fast. It&#8217;s boring to watch but it worked.<\/p>\n\n\n\n<p>I don&#8217;t have the code anymore. But I still had some old MetaTrader reports sitting around in different folders, plus some screenshots from the live account. So I decided to go back and record what I did, clean up the old data, rebuild the strategy in Python, and write down what actually happened.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1374639164  fetchpriority=\"high\" loading=\"eager\" decoding=\"async\" width=\"2087\" height=\"799\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/02_recovered_metric_cards.png\" alt=\"Recovered trade report metric cards for the midnight FX scalper\" class=\"wp-image-546\" style=\"width:720px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:735\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/02_recovered_metric_cards.png 2087w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:115\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/02_recovered_metric_cards.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:392\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/02_recovered_metric_cards.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:294\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/02_recovered_metric_cards.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:588\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/02_recovered_metric_cards.png 1536w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:735\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/02_recovered_metric_cards.png 2048w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#What_I_Still_Remembered\" >What I Still Remembered<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#Live_Trading_Evidence\" >Live Trading Evidence<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#Cleaning_the_Old_Logs\" >Cleaning the Old Logs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#The_Edge_Was_Mostly_About_Timing\" >The Edge Was Mostly About Timing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#Pair_Selection_Also_Mattered\" >Pair Selection Also Mattered<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#Rebuilding_It_in_Python\" >Rebuilding It in Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#Parameter_Sweep\" >Parameter Sweep<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#Why_Multiple_Pairs_Matter\" >Why Multiple Pairs Matter<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#The_Broker_Problem\" >The Broker Problem<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#Does_the_Strategy_Still_Work\" >Does the Strategy Still Work?<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_I_Still_Remembered\"><\/span>What I Still Remembered<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>I didn&#8217;t remember every parameter, but the structure was clear enough:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Timeframe:<\/strong> M1, because the trades were short and target was small.<\/li>\n\n\n\n<li><strong>Window:<\/strong> around broker midnight, when liquidity is low.<\/li>\n\n\n\n<li><strong>Signal:<\/strong> price stretched away from short-term range, something like Bollinger Bands.<\/li>\n\n\n\n<li><strong>Trade management:<\/strong> small hidden TP, step-adding when price goes against you, session close rule.<\/li>\n\n\n\n<li><strong>The risk:<\/strong> if spread widens or slippage happens, there&#8217;s no edge left. A few-pip target has no room for error.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=519406901  fetchpriority=\"high\" loading=\"eager\" decoding=\"async\" width=\"1621\" height=\"898\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/09_rebuild_settings.png\" alt=\"Rules used for the rebuilt midnight FX scalping strategy\" class=\"wp-image-572\" style=\"width:700px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1621\/h:898\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/09_rebuild_settings.png 1621w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:166\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/09_rebuild_settings.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:567\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/09_rebuild_settings.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:425\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/09_rebuild_settings.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:851\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/09_rebuild_settings.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Live_Trading_Evidence\"><\/span>Live Trading Evidence<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Before I go into the analysis, it&#8217;s worth showing that I actually traded this live, not just backtested and forgot about it. I still have the old screenshots from the account \u2014 deposits, withdrawals, closed trades, breakdown by pair. Not a big account, but real money and real execution.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=2033166806  loading=\"lazy\" decoding=\"async\" width=\"1355\" height=\"479\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-1.png\" alt=\"Live trading statement showing account gain, deposits, withdrawals, and profit\" class=\"wp-image-560\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1355\/h:479\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-1.png 1355w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:106\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-1.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:362\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-1.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:271\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-1.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1185929572  loading=\"lazy\" decoding=\"async\" width=\"1353\" height=\"1011\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-2.png\" alt=\"Live trading statement showing profit by currency pair\" class=\"wp-image-561\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1353\/h:1011\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-2.png 1353w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:224\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-2.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:765\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-2.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:574\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-2.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1801712281  loading=\"lazy\" decoding=\"async\" width=\"1350\" height=\"356\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-3.png\" alt=\"Live trading statement showing winners and losers by hour\" class=\"wp-image-562\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1350\/h:356\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-3.png 1350w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:79\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-3.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:270\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-3.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:203\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-3.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=567622010  loading=\"lazy\" decoding=\"async\" width=\"1348\" height=\"540\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-4.png\" alt=\"Live trading statement showing example closed trades\" class=\"wp-image-563\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1348\/h:540\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-4.png 1348w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:120\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-4.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:410\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-4.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:308\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/live-trading-statement-4.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Cleaning_the_Old_Logs\"><\/span>Cleaning the Old Logs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Besides the live screenshots, I also had old MetaTrader backtest reports from different experiments. These are strategy tester results, not live account statements. After I cleaned and parsed them, I got <strong>30,469 closed trades<\/strong> from <strong>August 2018 to November 2022<\/strong>, with about <strong>79.1% win rate<\/strong> and around <strong>$737k total backtest profit<\/strong> across all the files.<\/p>\n\n\n\n<p>Just to be clear, these are backtest numbers, not live fills. Backtest doesn&#8217;t have real slippage, rejections, or broker interference, so the dollar amounts are just for reference \u2014 useful to see the pattern, not to claim I actually made that much. The consistency of the pattern across different test runs is what I found useful.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=988179466  loading=\"lazy\" decoding=\"async\" width=\"1935\" height=\"898\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/01_recovered_profit_curve.png\" alt=\"Cumulative recovered profit curve from old MetaTrader reports\" class=\"wp-image-545\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:891\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/01_recovered_profit_curve.png 1935w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:139\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/01_recovered_profit_curve.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:475\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/01_recovered_profit_curve.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:356\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/01_recovered_profit_curve.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:713\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/01_recovered_profit_curve.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Edge_Was_Mostly_About_Timing\"><\/span>The Edge Was Mostly About Timing<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The clearest thing in the data was time. Most of the profit came from around broker midnight. Trade the same setup at other hours and the results were much worse. This makes sense \u2014 when liquidity is thin, price tends to overshoot and then snap back. That&#8217;s the whole idea of the trade.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=813763258  loading=\"lazy\" decoding=\"async\" width=\"1870\" height=\"898\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/03_hourly_edge.png\" alt=\"Profit by broker hour showing midnight concentration\" class=\"wp-image-547\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1870\/h:898\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/03_hourly_edge.png 1870w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:144\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/03_hourly_edge.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:492\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/03_hourly_edge.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:369\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/03_hourly_edge.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:738\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/03_hourly_edge.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>The indicator by itself wasn&#8217;t enough. The hour was what made it work. A Bollinger stretch signal at 3pm London is just noise. The same signal at 11pm broker time, on a pair that tends to mean-revert, with low spread \u2014 that&#8217;s a totally different thing.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1957539162  loading=\"lazy\" decoding=\"async\" width=\"1759\" height=\"898\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/05_win_loss_by_hour.png\" alt=\"Winner and loser counts by broker hour\" class=\"wp-image-549\" style=\"width:720px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1759\/h:898\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/05_win_loss_by_hour.png 1759w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:153\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/05_win_loss_by_hour.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:523\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/05_win_loss_by_hour.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:392\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/05_win_loss_by_hour.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:784\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/05_win_loss_by_hour.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Pair_Selection_Also_Mattered\"><\/span>Pair Selection Also Mattered<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Not every pair was the same. Some pairs showed clean mean-reversion during the quiet window. Others were too noisy or the spread was too high. The edge came from the combination: right hour, right pair, low spread, small exit. Change any one of these and the result changes.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=2075185361  loading=\"lazy\" decoding=\"async\" width=\"1787\" height=\"992\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/04_symbol_profit.png\" alt=\"Best FX pairs in recovered trade reports\" class=\"wp-image-548\" style=\"width:720px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1787\/h:992\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/04_symbol_profit.png 1787w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:167\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/04_symbol_profit.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:568\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/04_symbol_profit.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:426\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/04_symbol_profit.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:853\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/04_symbol_profit.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Rebuilding_It_in_Python\"><\/span>Rebuilding It in Python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Since I didn&#8217;t have the original code, I rebuilt it from scratch in Python based on what the logs showed. I didn&#8217;t try to copy the EA line by line. I just wanted to check: can the same idea still work with clear rules that I can control?<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1692520674  loading=\"lazy\" decoding=\"async\" width=\"2208\" height=\"789\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/08_rebuild_logic.png\" alt=\"Process used to rebuild the midnight FX scalping strategy\" class=\"wp-image-571\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:686\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/08_rebuild_logic.png 2208w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:107\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/08_rebuild_logic.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:366\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/08_rebuild_logic.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:274\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/08_rebuild_logic.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:549\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/08_rebuild_logic.png 1536w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:686\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/08_rebuild_logic.png 2048w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>Setup: EURUSD M1 data, trading window 20:00\u201323:59 broker time, Bollinger stretch entry, step averaging, basket TP, session close. I used 0.5 pip round-trip cost because I didn&#8217;t want the test to look too clean.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1821858415  loading=\"lazy\" decoding=\"async\" width=\"1945\" height=\"1108\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/10_rebuild_equity.png\" alt=\"Rebuilt EURUSD M1 night scalping strategy equity and drawdown\" class=\"wp-image-573\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1895\/h:1080\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/10_rebuild_equity.png 1945w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:171\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/10_rebuild_equity.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:583\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/10_rebuild_equity.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:438\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/10_rebuild_equity.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:875\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/10_rebuild_equity.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>Results over the test period (Aug 2021 \u2013 Oct 2022): <strong>1,288 basket trades<\/strong>, <strong>86.4% win rate<\/strong>, $200 grew to about <strong>$572<\/strong>, max drawdown around <strong>-$149<\/strong>. The drawdown is worth noting \u2014 this style looks smooth most of the time, but when a basket goes against you it can hit hard before closing out.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=957858661  loading=\"lazy\" decoding=\"async\" width=\"1665\" height=\"898\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/11_rebuild_hour_profile.png\" alt=\"Rebuilt strategy profit and win rate by entry hour\" class=\"wp-image-574\" style=\"width:720px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1665\/h:898\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/11_rebuild_hour_profile.png 1665w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:162\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/11_rebuild_hour_profile.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:552\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/11_rebuild_hour_profile.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:414\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/11_rebuild_hour_profile.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:828\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/11_rebuild_hour_profile.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>It&#8217;s not the same as the live results, and I wouldn&#8217;t say it is. But it does reproduce the main behavior: high win rate, lots of small wins, concentration in the night hours, and sensitive to cost.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Parameter_Sweep\"><\/span>Parameter Sweep<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After the base rebuild worked, I did a small sweep on the parameters that made sense to change \u2014 trading window, Bollinger threshold, step size. Not a random grid search on everything, just the ones where I had a reason from the old EA to think different values might help.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1842250650  loading=\"lazy\" decoding=\"async\" width=\"2024\" height=\"992\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/13_parameter_sweep.png\" alt=\"Parameter sweep results for the rebuilt midnight FX scalper\" class=\"wp-image-577\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:941\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/13_parameter_sweep.png 2024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:147\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/13_parameter_sweep.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:502\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/13_parameter_sweep.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:376\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/13_parameter_sweep.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:753\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/13_parameter_sweep.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>The best one used a stricter Bollinger threshold and a smaller step. Trades dropped from <strong>1,288<\/strong> to <strong>1,135<\/strong>, win rate almost the same at <strong>86.3%<\/strong>, and final equity went from ~<strong>$572<\/strong> to ~<strong>$685<\/strong>. Drawdown was a bit higher at about <strong>-$165<\/strong>. More selective, not fundamentally different, which is what you want.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1927643287  loading=\"lazy\" decoding=\"async\" width=\"1945\" height=\"898\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/14_enhanced_vs_base.png\" alt=\"Base rebuild compared with sweep-enhanced version\" class=\"wp-image-578\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:886\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/14_enhanced_vs_base.png 1945w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:139\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/14_enhanced_vs_base.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:473\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/14_enhanced_vs_base.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:355\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/14_enhanced_vs_base.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:709\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/14_enhanced_vs_base.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Multiple_Pairs_Matter\"><\/span>Why Multiple Pairs Matter<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The Python rebuild above is EURUSD only because that&#8217;s the pair I had clean M1 data for. But the original EA was never single-pair \u2014 it ran across a basket, and that&#8217;s a big reason why the live results looked better than one pair alone.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=319020934  loading=\"lazy\" decoding=\"async\" width=\"1940\" height=\"929\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/15_multipair_aggregation.png\" alt=\"Multi-pair aggregation from recovered FX scalper logs\" class=\"wp-image-579\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:919\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/15_multipair_aggregation.png 1940w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:144\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/15_multipair_aggregation.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:490\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/15_multipair_aggregation.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:368\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/15_multipair_aggregation.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:736\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/15_multipair_aggregation.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>When I aggregate the top 10 pairs from the recovered logs: <strong>17,985 trades<\/strong>, about <strong>80.3% win rate<\/strong>, around <strong>$627k recovered P\/L<\/strong>. Again this is from old reports, not a fresh backtest. But it explains why the original strategy worked better than just EURUSD \u2014 when one pair is doing badly, others carry it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=2103195883  loading=\"lazy\" decoding=\"async\" width=\"1868\" height=\"961\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/16_pair_contribution.png\" alt=\"Pair contribution chart from recovered FX scalper logs\" class=\"wp-image-580\" style=\"width:720px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1868\/h:961\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/16_pair_contribution.png 1868w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:154\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/16_pair_contribution.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:527\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/16_pair_contribution.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:395\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/16_pair_contribution.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:790\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/16_pair_contribution.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Broker_Problem\"><\/span>The Broker Problem<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Most retail FX brokers are market makers (B-book), so they take the other side of your trades. If you&#8217;re losing, they don&#8217;t care. But if you&#8217;re consistently making money on a scalping strategy with small targets, that&#8217;s coming directly out of their book.<\/p>\n\n\n\n<p>What happens next is always the same: spread widens during rollover, fills get delayed, slippage shows up, orders get rejected. Then you get an email saying your account has been suspended for &#8220;abusive trading.&#8221; The funny thing is, brokers don&#8217;t mind martingale or grid strategies that compound risk \u2014 those blow up eventually, so the broker always wins in the end. But consistent low-risk scalping that keeps going one direction? They don&#8217;t want that. I don&#8217;t believe there&#8217;s any holy grail in trading, but if your curve looks too clean for too long, they will come after you.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1801038987  loading=\"lazy\" decoding=\"async\" width=\"1541\" height=\"898\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/12_rebuild_cost_sensitivity.png\" alt=\"Spread and slippage sensitivity for rebuilt midnight scalper\" class=\"wp-image-575\" style=\"width:720px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1541\/h:898\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/12_rebuild_cost_sensitivity.png 1541w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:175\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/12_rebuild_cost_sensitivity.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:597\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/12_rebuild_cost_sensitivity.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:448\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/12_rebuild_cost_sensitivity.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:895\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/12_rebuild_cost_sensitivity.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>The cost sensitivity chart above shows why this matters for a scalper. Half a pip of extra slippage on a 1\u20133 pip target is a lot. The signal might still be fine, but if the broker is messing with execution on their end, you won&#8217;t see it in the data. The numbers just stop working and you don&#8217;t know why.<\/p>\n\n\n\n<p>I still have the suspension email. From my side, the EA was just taking small mean-reversion trades following its rules. From the broker&#8217;s side, apparently that was enough to get flagged.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1147005198  loading=\"lazy\" decoding=\"async\" width=\"2518\" height=\"935\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/suspended-account-email.png\" alt=\"Broker account suspension email related to trading activity\" class=\"wp-image-564\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:712\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/suspended-account-email.png 2518w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:111\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/suspended-account-email.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:380\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/suspended-account-email.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:285\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/suspended-account-email.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:570\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/suspended-account-email.png 1536w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:712\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/suspended-account-email.png 2048w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Does_the_Strategy_Still_Work\"><\/span>Does the Strategy Still Work?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Probably yes. The market behavior \u2014 thin liquidity overnight, price overshoots and snaps back \u2014 hasn&#8217;t really changed. The approach still makes sense. The Python rebuild reproduced the pattern on recent data without much trouble.<\/p>\n\n\n\n<p>But the broker problem is still the same. Running this on a B-book retail broker and expecting it to keep working long-term is not realistic. Once the results are too consistent, they will degrade your execution or just flag the account. The strategy part is not hard. The hard part is finding a broker that won&#8217;t mess with you.<\/p>\n\n\n\n<p>If I were to take this further, the next step would be to pull M1 data for the full pair basket and run the rebuilt rules across all of them with shared risk control. That&#8217;s the version closest to what I actually traded live. For now, I just wanted to document what I had, and that&#8217;s done.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Project type: forex strategy reconstruction, trade-log analysis, Python backtesting, and execution-risk study. I rebuilt an old midnight FX scalping idea from recovered MetaTrader reports and tested why spread and slippage made the edge fragile. &hellip; <a href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/\" class=\"more-link\"><span>Continue reading<span class=\"screen-reader-text\">Rebuilding a Midnight FX Scalping Bot from Old Trade Logs<\/span><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":582,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,71],"tags":[70],"class_list":["post-544","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-proj","category-quant-finance-trading","tag-pythondata-sciencequantitative-financebacktestingforexalgorithmic-trading"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rebuilding a Midnight FX Scalping Bot from Old Trade Logs - Philip\u2019s Data Science Diary<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs - Philip\u2019s Data Science Diary\" \/>\n<meta property=\"og:description\" content=\"Project type: forex strategy reconstruction, trade-log analysis, Python backtesting, and execution-risk study. I rebuilt an old midnight FX scalping idea from recovered MetaTrader reports and tested why spread and slippage made the edge fragile. &hellip; Continue readingRebuilding a Midnight FX Scalping Bot from Old Trade Logs\" \/>\n<meta property=\"og:url\" content=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/\" \/>\n<meta property=\"og:site_name\" content=\"Philip\u2019s Data Science Diary\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-05T01:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-04T15:24:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:572\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/featured-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"572\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Philip\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philip\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/\"},\"author\":{\"name\":\"Philip\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"headline\":\"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs\",\"datePublished\":\"2026-01-05T01:00:00+00:00\",\"dateModified\":\"2026-05-04T15:24:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/\"},\"wordCount\":1261,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"image\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2026\\/01\\/featured-image-scaled.png\",\"keywords\":[\"Python,Data Science,Quantitative Finance,Backtesting,Forex,Algorithmic Trading\"],\"articleSection\":[\"Projects\",\"Quant Finance &amp; Trading\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/\",\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/\",\"name\":\"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs - Philip\u2019s Data Science Diary\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2026\\/01\\/featured-image-scaled.png\",\"datePublished\":\"2026-01-05T01:00:00+00:00\",\"dateModified\":\"2026-05-04T15:24:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/#primaryimage\",\"url\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2026\\/01\\/featured-image-scaled.png\",\"contentUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2026\\/01\\/featured-image-scaled.png\",\"width\":2560,\"height\":1429},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2026\\\/01\\\/05\\\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#website\",\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/\",\"name\":\"Philip\u2019s University Data Science Journey\",\"description\":\"Navigating Data Science: From Classroom to Career\",\"publisher\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\",\"name\":\"Philip\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"url\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"contentUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"width\":16,\"height\":16,\"caption\":\"Philip\"},\"logo\":{\"@id\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\"},\"description\":\"Data Scientist &amp; Systems Engineer. Graduated from City University of Hong Kong. Previously founded Twinight Limited as CTO, developing AI investment analytics and automated trading solutions. Currently working as a Test and Integration Engineer on a Vessel Traffic Service (VTS) system in the maritime industry since December 2024.\",\"sameAs\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\"],\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/author\\\/philip\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs - Philip\u2019s Data Science Diary","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/","og_locale":"en_GB","og_type":"article","og_title":"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs - Philip\u2019s Data Science Diary","og_description":"Project type: forex strategy reconstruction, trade-log analysis, Python backtesting, and execution-risk study. I rebuilt an old midnight FX scalping idea from recovered MetaTrader reports and tested why spread and slippage made the edge fragile. &hellip; Continue readingRebuilding a Midnight FX Scalping Bot from Old Trade Logs","og_url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/","og_site_name":"Philip\u2019s Data Science Diary","article_published_time":"2026-01-05T01:00:00+00:00","article_modified_time":"2026-05-04T15:24:18+00:00","og_image":[{"width":1024,"height":572,"url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:572\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/featured-image.png","type":"image\/png"}],"author":"Philip","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Philip","Estimated reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#article","isPartOf":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/"},"author":{"name":"Philip","@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"headline":"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs","datePublished":"2026-01-05T01:00:00+00:00","dateModified":"2026-05-04T15:24:18+00:00","mainEntityOfPage":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/"},"wordCount":1261,"commentCount":0,"publisher":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"image":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#primaryimage"},"thumbnailUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/featured-image-scaled.png","keywords":["Python,Data Science,Quantitative Finance,Backtesting,Forex,Algorithmic Trading"],"articleSection":["Projects","Quant Finance &amp; Trading"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/","url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/","name":"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs - Philip\u2019s Data Science Diary","isPartOf":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#website"},"primaryImageOfPage":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#primaryimage"},"image":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#primaryimage"},"thumbnailUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/featured-image-scaled.png","datePublished":"2026-01-05T01:00:00+00:00","dateModified":"2026-05-04T15:24:18+00:00","breadcrumb":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#primaryimage","url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/featured-image-scaled.png","contentUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/01\/featured-image-scaled.png","width":2560,"height":1429},{"@type":"BreadcrumbList","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2026\/01\/05\/rebuilding-a-midnight-fx-scalping-bot-from-old-trade-logs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/philip.twinight.co\/portfolio\/"},{"@type":"ListItem","position":2,"name":"Rebuilding a Midnight FX Scalping Bot from Old Trade Logs"}]},{"@type":"WebSite","@id":"https:\/\/philip.twinight.co\/portfolio\/#website","url":"https:\/\/philip.twinight.co\/portfolio\/","name":"Philip\u2019s University Data Science Journey","description":"Navigating Data Science: From Classroom to Career","publisher":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/philip.twinight.co\/portfolio\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414","name":"Philip","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","contentUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","width":16,"height":16,"caption":"Philip"},"logo":{"@id":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png"},"description":"Data Scientist &amp; Systems Engineer. Graduated from City University of Hong Kong. Previously founded Twinight Limited as CTO, developing AI investment analytics and automated trading solutions. Currently working as a Test and Integration Engineer on a Vessel Traffic Service (VTS) system in the maritime industry since December 2024.","sameAs":["https:\/\/philip.twinight.co\/portfolio"],"url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/author\/philip\/"}]}},"_links":{"self":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts\/544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/comments?post=544"}],"version-history":[{"count":10,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts\/544\/revisions"}],"predecessor-version":[{"id":589,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts\/544\/revisions\/589"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/media\/582"}],"wp:attachment":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/media?parent=544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/categories?post=544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/tags?post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}