<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arnold Holm</title>
    <description>The latest articles on DEV Community by Arnold Holm (@stratcorealpha).</description>
    <link>https://dev.to/stratcorealpha</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4078355%2Fc2ecba14-1ac4-43ef-b437-2a38e810c2ca.png</url>
      <title>DEV Community: Arnold Holm</title>
      <link>https://dev.to/stratcorealpha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stratcorealpha"/>
    <language>en</language>
    <item>
      <title>Classic trend EA on 7 majors: -5.2 % a year.</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Sat, 14 Nov 2026 08:39:15 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/classic-trend-ea-on-7-majors-52-a-year-5di2</link>
      <guid>https://dev.to/stratcorealpha/classic-trend-ea-on-7-majors-52-a-year-5di2</guid>
      <description>&lt;h1&gt;
  
  
  Classic trend EA on 7 majors: -5.2 % a year.
&lt;/h1&gt;

&lt;p&gt;My test loss would cost you about 5,200 USD in a year on your 100,000 USD challenge account, which alone would use up your total loss room. I ran a long trend test on past MT5 ticks, which are past price moves, and it lost money year by year. If you check a plan before you pay a fee, this is what you want to see right away.&lt;/p&gt;

&lt;p&gt;You asked if an old trend idea still earns on the big dollar pairs. An Instagram reel asks the same thing in plain words (&lt;a href="https://www.instagram.com/reel/DfrKmlFjRF2/" rel="noopener noreferrer"&gt;Is it true that a classic multi-timeframe trend system works on the majors?&lt;/a&gt;). I will answer with my own test, not with talk.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you have heard
&lt;/h2&gt;

&lt;p&gt;You have heard that an old multi-period trend plan still pays on the big dollar pairs. The claim is simple and it sounds safe. A classic multi-timeframe trend system works on the majors. I thought the same before I ran the numbers, so I put it on past ticks to see what it would have kept.&lt;/p&gt;

&lt;h2&gt;
  
  
  What my test did
&lt;/h2&gt;

&lt;p&gt;I used an EA, which is a program applying rules in MT5, to run the same plan on past ticks. A 21/63/126-day trend EA on seven USD majors lost 5.16 % a year in real MT5 ticks and paid out 176 USD once. The run covered May 2025 to August 2026. For each unit of ups and downs the account kept minus 0.55.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0084-trend-following-funded-account%2Fslide_1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0084-trend-following-funded-account%2Fslide_1.jpg" alt="Chart from my trend test on the majors" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it means for your challenge
&lt;/h2&gt;

&lt;p&gt;You pay a fee to enter a challenge and you get clear loss limits in return. Your account must stay above those limits every day. A plan that loses money year by year makes that job hard. It pulls your account value down while you wait for a good run that comes too late. You would need fresh gains just to climb back to start, and each new drop would push you closer to the end. That is why I look at the loss path early, not at the win talk.&lt;/p&gt;

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

&lt;p&gt;I do not trust win talk without a loss path. I never pay a challenge fee for a trend program that lost money on past ticks. I want to see how far the account value fell and how long it stayed down.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your own check
&lt;/h2&gt;

&lt;p&gt;Take your own test report and look at the account value line, not just the closed wins. Find the deepest fall from a high to a low. Open your own test report and compare the largest past drop in account value with the total loss limit in your rules. If that drop is bigger than your limit, that plan would have ended your challenge. Do this before you pay, while it costs you nothing but five minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to read your report
&lt;/h2&gt;

&lt;p&gt;Many reports show only closed trades. That view hides the pain in between. Your account value can fall far while trades stay open, then come back before the close. You never see that fall if you look only at wins and losses at the close. So open the account value line. Look for the deepest fall. Look at how long the line stayed down. Look at what costs took on the way. A plan can look calm at the close and still have spent weeks under water.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the fee makes this matter
&lt;/h2&gt;

&lt;p&gt;You pay before you trade in a challenge. The fee is gone even if you fail on the loss limit. Your time is gone too. That is why a quick look at past ticks helps. It does not tell you what comes next. It tells you what this plan did when prices moved in the past. If it lost money then, you know to pause and think before you pay.&lt;/p&gt;

&lt;h2&gt;
  
  
  What past ticks can and cannot tell you
&lt;/h2&gt;

&lt;p&gt;Past ticks show what did happen, not what will happen. They use old price moves, with costs taken the way MT5 saw them. That makes them useful for a fee choice. You see if a plan fell far or stayed calm. You see if costs ate the small wins. You do not see what comes next. A good past run does not make the next run good. A bad past run tells you to stop and ask why you would pay to try it.&lt;/p&gt;

&lt;p&gt;These are historical test results, not a live account.&lt;/p&gt;

&lt;p&gt;To guard your own rules before you pay, try the free &lt;a href="https://stratcorealpha.com/rule-guard?ref=devto" rel="noopener noreferrer"&gt;Prop Rule Guard&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>algotrading</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>What doubling costs did to a historical Brent test</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Fri, 13 Nov 2026 08:12:30 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/what-doubling-costs-did-to-a-historical-brent-test-29no</link>
      <guid>https://dev.to/stratcorealpha/what-doubling-costs-did-to-a-historical-brent-test-29no</guid>
      <description>&lt;h1&gt;
  
  
  What doubling costs did to a historical Brent test: -10% became -16% a year
&lt;/h1&gt;

&lt;p&gt;Is it true that costs matter little on intraday oil trades? If you double modeled costs, the same Brent hour rule drops from -10% a year to -16% a year. I kept the symbol, feed, test period, signal times and size fixed on a product that tracks the Brent oil price without buying oil, from 2017-2021, so you see what costs alone did.&lt;/p&gt;

&lt;h2&gt;
  
  
  What many believe
&lt;/h2&gt;

&lt;p&gt;Many traders start from this thought: Costs matter little on intraday oil trades.&lt;/p&gt;

&lt;p&gt;I get why it sticks. One intraday move, one move within the day, looks bigger than the fee to open and close it. A backtest is a historical simulation, so it lets you replay the same rule with one change and see what that change did.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I kept fixed
&lt;/h2&gt;

&lt;p&gt;I kept five things fixed for a clean read. The symbol, the market name, stayed a product that tracks the Brent oil price without buying oil. The price feed, where the prices come from, stayed the same. The test period, the years replayed, stayed 2017-2021. The signal times, when the rule checks, stayed the same. The size, how much per trade, stayed the same.&lt;/p&gt;

&lt;p&gt;Baseline is the first run with normal modeled costs. Modeled costs are the cost number I use in the simulation to stand in for what trading would charge. The second run doubled only that number. Nothing else moved.&lt;/p&gt;

&lt;h2&gt;
  
  
  What doubling changed
&lt;/h2&gt;

&lt;p&gt;Doubling modeled costs turned -10% into -16% a year on the Brent hour rule.&lt;/p&gt;

&lt;p&gt;Expressed as a constant rate per year, the first run lost 10.05% and the run with double modeled costs lost 15.91%. That is a 5.86 percentage point deterioration, and it does not explain away an already negative baseline. Both legs, the two parts of the rule, were negative even before costs.&lt;/p&gt;

&lt;p&gt;On a hypothetical $100,000 starting balance, -10.05% is -$10,050 for one year and -15.91% is -$15,910 for one year. This is one year of arithmetic at the equivalent yearly rates. To check a challenge loss limit, you need the equity path and the limit in force at each point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I look at the loss path too
&lt;/h2&gt;

&lt;p&gt;The yearly net, what is left after costs for the year, tells you where you ended. The loss path tells you how deep the dip ran before the end. A rule can end at the same yearly net with a shallow dip or a deep one, and the deep one hurts more to hold.&lt;/p&gt;

&lt;p&gt;Here both runs ended negative, and the doubled-cost run ended more negative. I drop a rule that already loses before costs because doubling costs only made this loss worse.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to run the same check on your report
&lt;/h2&gt;

&lt;p&gt;Take your own report from a historical simulation you trust. Copy it, change only the cost number, and run it again. Double only costs in your own report and compare the yearly net and the loss path with the baseline.&lt;/p&gt;

&lt;p&gt;Keep the symbol, feed, test period, signal times and size fixed like I did. If the yearly net turns clearly worse and the loss dip runs deeper, costs are not a side note for that rule. If the rule loses before costs, better fees alone cannot make that run profitable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Do you share the entry times or the rule?
&lt;/h3&gt;

&lt;p&gt;No. I keep signal times fixed in the test but I do not publish them, and this note does not give you a rule to trade.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does this say what live trading would pay?
&lt;/h3&gt;

&lt;p&gt;No. This is a historical simulation on a product that tracks the Brent oil price, from 2017-2021 with modeled costs. It shows what doubling that cost number did in the earlier run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your next step
&lt;/h2&gt;

&lt;p&gt;Run the one-change check on a rule you already use. If you want a second pair of eyes, start with the &lt;a href="https://stratcorealpha.com/rule-guard?ref=devto" rel="noopener noreferrer"&gt;free Prop Rule Guard&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources and limits
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.instagram.com/reel/DfUo7DOmDOW/" rel="noopener noreferrer"&gt;Original question with the historical run&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This historical run covers 2017-2021 and says nothing about your feed or future results.&lt;/p&gt;

</description>
      <category>python</category>
      <category>testing</category>
      <category>trading</category>
      <category>finance</category>
    </item>
    <item>
      <title>Random trades on a funded account: 8 of 8 breached.</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Thu, 12 Nov 2026 08:54:27 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/random-trades-on-a-funded-account-8-of-8-breached-27ki</link>
      <guid>https://dev.to/stratcorealpha/random-trades-on-a-funded-account-8-of-8-breached-27ki</guid>
      <description>&lt;h1&gt;
  
  
  Random trades on a funded account: 8 of 8 breached.
&lt;/h1&gt;

&lt;p&gt;You keep 0 USD when random trades breach every funded account. If you check a plan before you pay a fee, start here. I ran random direction on funded models to see what staying alive pays on its own. It pays nothing in the middle and it ends every run at the loss limit.&lt;/p&gt;

&lt;p&gt;An Instagram reel asks if you only need to stay funded long enough to get paid (&lt;a href="https://www.instagram.com/reel/Deb6VVjAt8O/" rel="noopener noreferrer"&gt;Is it true that with a funded account you just need to stay in the game long enough to get paid?&lt;/a&gt;). This piece stays on that one ask. It shows one test with random direction and what it left behind.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea you may hold
&lt;/h2&gt;

&lt;p&gt;You may think time does the work. You keep small losses. You avoid one big day. And the firm pays you in the end. That hope feels calm and it fits what you want before a fee. With a funded account you just need to stay in the game long enough to get paid. I hear that line a lot and I get why it sticks. It turns a hard test into waiting. But waiting is not a plan and the loss limit still ends weak runs. If your trades have no clear gain over costs, more days only give the limit more tries to catch you. You pay for time and the limit still takes the weak runs first. A calm wait does not turn flat trades into paid trades.&lt;/p&gt;

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

&lt;p&gt;I used an EA, a program applying rules in MT5, the trading program, only to set random direction. The test used real ticks, the real price moves tick by tick, so costs and moves stayed true to what the market showed. The market was USDJPY and the time ran from March 2025 to August 2026. We ran an EA with random direction on a 25K funded-account model in MT5 with real ticks. All 8 accounts were eventually breached and the middle payout was 0 USD. Only 3 of 8 accounts ever saw a payout. That means most runs ended with no money out while the loss limit closed the rest. You see small wins and small losses along the way but the end stays the same. The test kept costs in so the paid total shows what you would keep.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0028-funded-zero-edge%2Fslide_1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0028-funded-zero-edge%2Fslide_1.jpg" alt="Funded test chart with closed accounts and payouts" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What that means for your challenge account
&lt;/h2&gt;

&lt;p&gt;On a 100,000 dollar challenge account that result leaves you with 0 dollars in payouts and a breached loss limit. You pay the fee. You run the same flat plan. And you still face the same end. The size changes the dollars at risk but it does not change what random direction pays. I never pay a challenge fee before I see the payout next to the loss limit in one report. Put your last report next to your rules and read both in dollars. If the paid total sits far below the loss limit that ends you, time will not fix it. Check this gap first and let it guide your next test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your 5-minute check
&lt;/h2&gt;

&lt;p&gt;Open your last test report and compare the total paid out with the loss limit that would end your account. Take the paid total in dollars and write it next to the loss limit in dollars from your rules. Use the same dollars on both sides so the gap is clear. Then count the runs that hit the limit and the runs that paid at all. If the limit hits dwarf the paid runs, your plan leans on luck to survive. Do this in five minutes before you pay for more time. Write both dollars down so you can see the gap at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your rules and limits
&lt;/h2&gt;

&lt;p&gt;Read your firm rules and mark the loss limit that ends your run. Costs, fees, and open trades all eat into that room before you see it. Keep that page open while you test so each run faces the same line. If the gap looks wide, run more tests before you spend.&lt;/p&gt;

&lt;p&gt;These are historical test results, not a live account.&lt;/p&gt;

&lt;p&gt;Try the free &lt;a href="https://stratcorealpha.com/rule-guard?ref=devto" rel="noopener noreferrer"&gt;Prop Rule Guard&lt;/a&gt; to keep your written loss limit in view.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>algotrading</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Past weekday winners and losers: the fixed portfolio lost 2.21% a year.</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Wed, 11 Nov 2026 08:52:15 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/past-weekday-winners-and-losers-the-fixed-portfolio-lost-221-a-year-591f</link>
      <guid>https://dev.to/stratcorealpha/past-weekday-winners-and-losers-the-fixed-portfolio-lost-221-a-year-591f</guid>
      <description>&lt;h1&gt;
  
  
  Past weekday winners and losers: the fixed portfolio lost 2.21% a year.
&lt;/h1&gt;

&lt;p&gt;My test of past weekday winners and losers lost money. That 2.21% yearly loss would cost you about 2,200 dollars on a 100,000 dollar account, which eats into your loss limit instead of moving you toward the target.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this idea pulls you in
&lt;/h2&gt;

&lt;p&gt;Many traders feel that what worked on a given weekday will keep working on that weekday. You check one weekday and you think the strong ones will stay strong. Past weekday returns can rank an index portfolio. That is the question I tested, and you can see where I keep my results (&lt;a href="https://stratcorealpha.com/tested" rel="noopener noreferrer"&gt;tested&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  What I kept fixed
&lt;/h2&gt;

&lt;p&gt;I kept the rules fixed so the result would be clear. A fixed portfolio bought the top two and sold the bottom two of eleven index markets, ranked by the same weekday over the prior twenty weeks. It lost 2.21% a year in the measured sample. The full run covers the combined data through 2023.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the wins kept
&lt;/h2&gt;

&lt;p&gt;You pay a fee before you know if an idea works, so you want to see what it kept. A gain that melts away in costs helps no challenge account. For each dollar it lost, it made back about 58 cents. That means the wins did not cover the losses in that run. You stayed below your start while you waited for a turn that did not come. If you check an idea, you want to see wins that pay for losses with room left.&lt;/p&gt;

&lt;h2&gt;
  
  
  How often a month ended well
&lt;/h2&gt;

&lt;p&gt;You also want to know how often a month ends well. A long wait between good months wears you down and tempts you to quit or to force trades. About 18% of months ended with a gain. That leaves most months flat or down in that run. You would have watched many months go by with no lift for your account. Before you pay, you want an idea that shows good months more often than that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for your challenge
&lt;/h2&gt;

&lt;p&gt;You do not need a complex read to see why this matters for a challenge. You pay to take part and you must stay above your loss limit while you work toward your target. A steady bleed makes both jobs harder at once. It pulls your account down while the clock runs and fees sit sunk. You start to press and your rules start to slip. That is why I check the basic math before I pay for any test of my own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a fixed set tells you more
&lt;/h2&gt;

&lt;p&gt;I trust a fixed set because it leaves no room to hide a weak patch. You see the same markets through good spells and bad spells alike. You do not get to swap a weak name out after it drags you down. You do not get to add a hot name after it runs up. That honesty helps you when you weigh a fee. You learn if the core idea holds or if it only shone for a short spell.&lt;/p&gt;

&lt;h2&gt;
  
  
  A check you can run fast
&lt;/h2&gt;

&lt;p&gt;You can run a quick check on your own numbers before you pay. It takes about five minutes and it needs no new math. Open your own report and compare one weekday result with the same weekday across the prior months to see if it holds up. If the same weekday jumps up and down with no clear line, you treat that as doubt. If one weekday holds a clear line across months, you still check costs and rules before you trust it. You want proof that lasts, not one good spell that fades.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I do with a result like this
&lt;/h2&gt;

&lt;p&gt;I keep my own bar simple when a test looks like this. I would not pay a challenge fee for that weekday ranking because my test lost money year after year. I want to see a clear gain after costs before I risk a fee. You may feel drawn to the idea, and you should let the numbers calm you down. A quiet skip of a weak idea saves your fee for a stronger test.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0036-best-weekday%2Fslide_1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0036-best-weekday%2Fslide_1.jpg" alt="Fixed set of past weekday winners and losers showing a yearly loss" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are historical test results, not a live account.&lt;/p&gt;

&lt;p&gt;You can organise your own rules with the free &lt;a href="https://stratcorealpha.com/rule-guard?ref=devto" rel="noopener noreferrer"&gt;Prop Rule Guard&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>algotrading</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A random hour beat the famous one: 1.4% to 0.4%.</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 14:10:22 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/a-random-hour-beat-the-famous-one-14-to-04-5bk2</link>
      <guid>https://dev.to/stratcorealpha/a-random-hour-beat-the-famous-one-14-to-04-5bk2</guid>
      <description>&lt;h1&gt;
  
  
  A random hour beat the famous one: 1.4% to 0.4%.
&lt;/h1&gt;

&lt;p&gt;A fixed random hour did better than the CME expiry hour: 1.40 % against 0.42 % a year. That is about 1,400 dollars a year against about 420 dollars on a 100,000 dollar account, far below any loss limit. If you check a strategy before you pay the fee, you start with this gap.&lt;/p&gt;

&lt;h2&gt;
  
  
  The belief
&lt;/h2&gt;

&lt;p&gt;Many traders think a famous hour must win against any random hour. That idea feels right because a big date draws more eyes. You hear the name and you think the move must be larger there. A special hour must beat a random hour. The question came from a reel (&lt;a href="https://www.instagram.com/reel/DfHX58ZDBZt/" rel="noopener noreferrer"&gt;Is it true that a special hour must beat a random hour&lt;/a&gt;). I kept that question in mind when I looked at my own test.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test
&lt;/h2&gt;

&lt;p&gt;I ran the test on BTCUSD in 2018-2023. I kept one hour fixed through all those years and I kept the famous hour fixed too. I did not change the hours after I saw the results. For the ride you sit through, the fixed hour scored 0.54 while the famous hour scored 0.22. The gap stayed clear in plain yearly gain and in that calmer ride.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0062-random-hour-beat-cme%2Fslide_1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0062-random-hour-beat-cme%2Fslide_1.jpg" alt="Chart showing a fixed random hour above the CME expiry hour" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it means for you
&lt;/h2&gt;

&lt;p&gt;You pay the fee before you see live results. You want a plan that respects your loss limit from the first day. A tiny yearly gain leaves you close to that line for a long time. The famous hour sat well under the random hour in my test. That shortfall matters because your challenge lives or dies by room under the line. If your hour earns little in a full year, a short weak spell can eat that gain fast. You then face the fee again with little to show for it. I look at the dollar gap first and I ask if it pays for the risk I take. A clear gap tells me which hour deserves more time. A thin gain tells me to pause and study more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the name can fool you
&lt;/h2&gt;

&lt;p&gt;A big name pulls your eyes to a few days. You recall the large moves and you forget the calm days. Your mind keeps the loud parts and drops the quiet parts. A fixed random hour has no loud story. It just sits in the same place through heat and calm. That steadiness can add up over long years. You see it when you line up both hours side by side. The famous hour jumps and rests. The random hour walks on at its own pace. Over time that walk can pass the jumps. I keep this picture in mind when a date sounds strong.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to read your report
&lt;/h2&gt;

&lt;p&gt;Open your report and find the yearly gain for your hour. Write it down next to the years it covers. Then find the same line for a fixed random hour. Keep the market and the years the same on both sides. Look at which line sits higher and by how much in plain dollars. Ask if that dollar gap feels worth the fee and the wait. If the lines sit close, you learned that the name adds little. If your hour sits under, you saved cash before you paid. I do this side by side first because it clears my head fast.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your own check
&lt;/h2&gt;

&lt;p&gt;You can do this check in five minutes on your own report. Take your own report and compare the yearly gain of your hour with the yearly gain of a fixed random hour on the same market and years. Use the same years for both sides and keep the hours fixed. If your hour sits under the random hour, you have a plain reason to pause. I never pay a fee for a special hour before I test it against a fixed random hour. I want that plain side by side before I spend more time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I do next
&lt;/h2&gt;

&lt;p&gt;I keep the hours fixed and I watch more years when I can. I ask a friend to pick a random hour blind so I stay honest. You can ask the same from a friend you trust. You then place both hours next to each other and you read the lines with calm eyes. If the famous hour still sits under, I drop it and I move on. I would rather drop a weak hour early than defend a name late. You save time when you let the lines speak first.&lt;/p&gt;

&lt;p&gt;These are historical test results, not a live account.&lt;/p&gt;

&lt;p&gt;If you want to guard your challenge rules, try the &lt;a href="https://stratcorealpha.com/rule-guard?ref=devto" rel="noopener noreferrer"&gt;free Prop Rule Guard&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>algotrading</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I copied a trading study exactly and found a 36% drawdown</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Fri, 06 Nov 2026 17:09:07 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/i-copied-a-trading-study-exactly-and-found-a-36-drawdown-54l2</link>
      <guid>https://dev.to/stratcorealpha/i-copied-a-trading-study-exactly-and-found-a-36-drawdown-54l2</guid>
      <description>&lt;h1&gt;
  
  
  I copied a trading study exactly and found a 36% drawdown
&lt;/h1&gt;

&lt;p&gt;A study looks safe until you test it on your own rules. Copying the study exactly would mean a hypothetical loss of about 36,000 dollars on a 100,000 dollar account, compare it with your own loss limit.&lt;/p&gt;

&lt;p&gt;An &lt;a href="https://www.instagram.com/reel/DeRd0ysiafv/" rel="noopener noreferrer"&gt;Instagram reel asks if an exact copy works in your account&lt;/a&gt;. The question in your words is, Is it true that a strategy that reproduces a study exactly will work in your account? I answer it with one exact test on index markets at a broker, and I show you how to read your own report in five minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why an exact copy feels safe
&lt;/h2&gt;

&lt;p&gt;A clean paper is tempting. Every rule is written down, so you think there's no room left for doubt. A strategy that reproduces a study exactly will work in your account. That's the hope, and it's easy to see why it sticks.&lt;/p&gt;

&lt;p&gt;You pay for a challenge and you need clear rules, not guesswork. A paper looks clear for a minute. But a paper is not your account. Your account has a loss limit that can end your challenge.&lt;/p&gt;

&lt;p&gt;That's why I don't start with trust. I start with the worst fall in dollars.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the test did
&lt;/h2&gt;

&lt;p&gt;We reproduced an earnings-season effect from a study exactly, then traded it on nine index markets at a broker: -2.9% a year and a 36% drawdown. The test covered February 2017 through 2021 and kept every rule as written.&lt;/p&gt;

&lt;p&gt;I kept it exact on purpose. I didn't add my own ideas and I didn't change a rule to fit the years. The point was to see if an exact copy holds up outside the paper.&lt;/p&gt;

&lt;p&gt;These are index markets at a broker. You trade the broker price that follows the index. That's the market this test used.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0014-study-vs-account%2Fslide_1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/assets%2Fcontent%2Finstagram%2FIG-0014-study-vs-account%2Fslide_1.jpg" alt="Exact study copy with a large fall on nine index markets at a broker" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What minus 2.9% a year and a 36% fall mean
&lt;/h2&gt;

&lt;p&gt;Minus 2.9% a year means the value went down a little each year on average. It's a yearly rate, not one single year. A small yearly number can still hide a much larger fall along the way.&lt;/p&gt;

&lt;p&gt;A 36% drawdown means the value fell 36% from a past peak to the next low. Drawdown is that peak to trough fall. It's the number that ends challenges, because your firm watches your current value, not your yearly average.&lt;/p&gt;

&lt;p&gt;On a 100,000 dollar starting size, a 36% fall at the same scale is a hypothetical loss of about 36,000 dollars from peak to trough. That's not a real challenge result. It's what the same percentage fall would look like in dollars on that size.&lt;/p&gt;

&lt;p&gt;Now place that dollar fall next to your own loss limit from your written rules. If your limit is smaller than that fall, the same rules would have stopped you. You don't need to guess what other firms allow. You only need your number.&lt;/p&gt;

&lt;p&gt;Your own costs are a separate check. Spreads and fees differ by broker and they change your own result. Check them in your own report, apart from this test.&lt;/p&gt;

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

&lt;p&gt;I compare that 36% fall with your own loss limit before I trust an exact study copy. The paper result is exact, but the fall in dollars decides if the rules fit your limit. That pair matters more to me than the yearly average.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your five minute check
&lt;/h2&gt;

&lt;p&gt;Open your report, find the largest fall in dollars and compare it with your challenge loss limit. That's the whole check, and you'll be done in five minutes.&lt;/p&gt;

&lt;p&gt;Open the report you already have from your own test. Find the largest peak to trough fall in dollars. Write down your own challenge loss limit in dollars from your written rules. Put the two dollar numbers side by side.&lt;/p&gt;

&lt;p&gt;If the fall is larger than your limit, the same rules would have stopped you. If it's smaller, you still need to check your costs and your prices apart. Don't mix those checks. First the fall, then your own costs.&lt;/p&gt;

&lt;p&gt;Try the &lt;a href="https://stratcorealpha.com/rule-guard?ref=devto" rel="noopener noreferrer"&gt;free Prop Rule Guard&lt;/a&gt; before you pay your next fee.&lt;/p&gt;

&lt;p&gt;This was a historical simulation, not a live account.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>algotrading</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Which loss limit leaves less room for your next trade?</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Sun, 01 Nov 2026 09:20:09 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/which-loss-limit-leaves-less-room-for-your-next-trade-4d3o</link>
      <guid>https://dev.to/stratcorealpha/which-loss-limit-leaves-less-room-for-your-next-trade-4d3o</guid>
      <description>&lt;p&gt;In this invented example, 100 USD total room is tighter than 300 USD daily. If you track two fixed floors on one equity number, you compare your next loss to both gaps.&lt;/p&gt;

&lt;p&gt;A Reddit thread discusses daily drawdown or a consistency rule (&lt;a href="https://www.reddit.com/r/PropFirmTester/comments/1tf0r18/daily_drawdown_or_consistency_rule_which_haunts/" rel="noopener noreferrer"&gt;daily drawdown or consistency rule discussion&lt;/a&gt;). This piece does not answer consistency rules. It is only an arithmetic illustration motivated by that drawdown discussion.&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;p&gt;Equity is the account value including open trades. Here it is 9,600 USD. The case sets a fixed total floor at 9,500 USD and a fixed daily floor at 9,300 USD on that same equity basis.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Equity USD&lt;/th&gt;
&lt;th&gt;Total floor USD&lt;/th&gt;
&lt;th&gt;Daily floor USD&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;9,600&lt;/td&gt;
&lt;td&gt;9,500&lt;/td&gt;
&lt;td&gt;9,300&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Total room is 100 USD. Daily room is 300 USD. A loss must stay above both floors at once, so the smaller positive room sets how far the next loss can go before it crosses a line.&lt;/p&gt;

&lt;p&gt;You can see it in two subtractions. 9,600 minus 9,500 leaves 100 USD. 9,600 minus 9,300 leaves 300 USD. Now subtract the next loss from equity first. Then compare that new equity with each floor. A 120 USD loss leaves 9,480 USD. That is below 9,500 USD and above 9,300 USD. So the daily gap alone would have missed the breach. The total gap decides here because it is smaller.&lt;/p&gt;

&lt;p&gt;300 USD daily room covers a 120 USD loss. 100 USD total room is exceeded at 9,480 USD, 20 USD below the total floor and 180 USD above the daily floor. I never use the larger buffer alone.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqrfmqzqrz1cqbqx81txt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqrfmqzqrz1cqbqx81txt.png" alt="Equity 9,600 USD with total floor 9,500 USD and daily floor 9,300 USD" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Python check
&lt;/h2&gt;

&lt;p&gt;This function does pure subtraction and returns both gaps plus a position tag. It places no trade and opens no broker connection. It only subtracts numbers you type in. Three arithmetic checks passed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;rooms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;equity&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total_floor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;daily_floor&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;total&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;equity&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;total_floor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;daily&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;equity&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;daily_floor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;position&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;equity&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;equity&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;above&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;equity&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;at_floor_check_rule&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;below&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;rooms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;9600&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;total&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;daily&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="mi"&gt;9600&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;9480&lt;/span&gt;
&lt;span class="nf"&gt;assert &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;position&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;9480&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9500&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nf"&gt;position&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;9480&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9300&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;below&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;above&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Equality returns a tag that asks for the written rule. The code does not call that tag safe.&lt;/p&gt;

&lt;p&gt;I put the two floors side by side before I judge room. I take both numbers from written rules. I put them on the same equity basis. Then I subtract each floor from current equity. The smaller positive result is the tighter gap. That is the gap I check first in this invented case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cases near the total floor
&lt;/h2&gt;

&lt;p&gt;Start again from 9,600 USD and test three hypothetical losses against the 9,500 USD total floor. A 99 USD loss leaves 9,501 USD, above the floor. A 100 USD loss leaves 9,500 USD, exactly on the floor and allowed only if your firm wording permits equality. A 101 USD loss leaves 9,499 USD, below the floor. Equality is not automatically safe. Your written rules decide if touching the floor counts as a breach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your rules
&lt;/h2&gt;

&lt;p&gt;This case uses fixed floors only. Fixed means the floors stay at 9,500 USD and 9,300 USD in this case. They do not follow equity up or down. A trailing floor moves with the account under its own written rule and needs its own peak in the account. Do not reuse these fixed numbers for it.&lt;/p&gt;

&lt;p&gt;Room left is not allowed risk. Commissions, slippage and changing equity can shrink room before or during the next loss. This is no sizing instruction. Fees, floating P/L, resets and equality come from your actual written rules. I write both floors down first. Write both floors from your rules on the same equity basis and compare the smaller room.&lt;/p&gt;

&lt;p&gt;The optional &lt;a href="https://stratcorealpha.com/rule-guard?ref=devto" rel="noopener noreferrer"&gt;free Pre-Check&lt;/a&gt;, the free Prop Rule Guard, can help organise the written rules.&lt;/p&gt;

&lt;p&gt;This invented case is not firm terms, not live broker records and not a pass test.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>python</category>
      <category>programming</category>
      <category>fintech</category>
    </item>
    <item>
      <title>Error 136: another retry is not a quote check</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Sat, 31 Oct 2026 08:33:34 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/error-136-another-retry-is-not-a-quote-check-f6p</link>
      <guid>https://dev.to/stratcorealpha/error-136-another-retry-is-not-a-quote-check-f6p</guid>
      <description>&lt;p&gt;My native MT4 run passed three synthetic policy cases with zero order calls. If your EA keeps hitting off quotes, you still need a quote check first.&lt;/p&gt;

&lt;p&gt;This is a small policy check after error 136. A synthetic check with no orders cannot prove a broker cause and cannot show that retries fail.&lt;/p&gt;

&lt;h2&gt;
  
  
  The forum thread
&lt;/h2&gt;

&lt;p&gt;A trader asked why 10 to 15 repeated OrderSend attempts still return error 136. See the &lt;a href="https://www.mql5.com/en/forum/189947" rel="noopener noreferrer"&gt;MQL5 forum&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;James said 10 to 15 attempts still returned the same error. His helper read the chart price for the passed pair. A reply said that mix uses the wrong price when symbols differ. James fixed that line, but he trades only the chart symbol now. So that fix does not explain his failures. Without per attempt symbol, prices, quote time and error, the cause stays open.&lt;/p&gt;

&lt;p&gt;Many EAs assume this. Repeating the request will eventually solve off quotes. My rule says the opposite. A new attempt needs a usable quote and a still-valid signal.&lt;/p&gt;

&lt;h2&gt;
  
  
  What my policy check did
&lt;/h2&gt;

&lt;p&gt;I ran a native check in MT4 4.0.0.1491. It compiled with zero errors and zero warnings. It ran in the Strategy Tester on offline EURUSD H4 supplied history with fixed spread 20 points.&lt;/p&gt;

&lt;p&gt;Zero quote inputs returned NO_RETRY. Expired signal inputs returned NO_RETRY. Fresh inputs returned ELIGIBLE_ONCE, then NO_RETRY with alreadyConsidered at 1.&lt;/p&gt;

&lt;p&gt;Three chosen cases, not full coverage. The five second and one consideration limits are illustrative, not universal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;Bid&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;Ask&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;Bid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;NO_RETRY&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;quote_age_sec&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;quote_time&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;NO_RETRY&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;signal_expiry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;NO_RETRY&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;alreadyConsidered&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;NO_RETRY&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;ELIGIBLE_ONCE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function does no waiting, no persistence, no network access, no orders and no duplicate checks. Your caller must keep its own count. Eligibility only allows one more review of all execution checks, never a trade by itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I check first
&lt;/h2&gt;

&lt;p&gt;I check the quote and the still-valid signal before considering another attempt. If the quote is missing or unusable, I stop. If the symbol is wrong, I stop. If the signal or count is spent, I stop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check your next result
&lt;/h2&gt;

&lt;p&gt;On your next off quotes result, write request symbol, Bid and Ask, quote time, signal expiry, captured error 136 and attempt count in one line. Missing or disordered prices mean no further review of that attempt.&lt;/p&gt;

&lt;p&gt;Confirm the price read uses the order symbol. Compare now with expiry and read your kept count. If any check fails, keep the record and wait for a fresh idea.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this check does not show
&lt;/h2&gt;

&lt;p&gt;Three chosen cases, zero order calls. Error 136 was not reproduced or fixed. No broker, execution or profit claim.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stratcorealpha.com/fix/mt4-error-136-off-quotes" rel="noopener noreferrer"&gt;Original website article with tester proof&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>mql4</category>
      <category>debugging</category>
      <category>programming</category>
    </item>
    <item>
      <title>MT4 OrderModify error 1: skip a stop update that changes nothing</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Wed, 28 Oct 2026 14:39:34 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/mt4-ordermodify-error-1-skip-a-stop-update-that-changes-nothing-o2l</link>
      <guid>https://dev.to/stratcorealpha/mt4-ordermodify-error-1-skip-a-stop-update-that-changes-nothing-o2l</guid>
      <description>&lt;p&gt;Your trailing stop can skip an unchanged update: my native MT4 test returned error 1 for the same stop, then error 0 after a real change. If you see error 1 on every tick, check stored and requested values before you change code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5l2u851eem86p1d91v8n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5l2u851eem86p1d91v8n.png" alt="Native MT4 tester: same stop returns error 1, changed stop returns error 0 and stored stop matches. Zero account orders." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the error means
&lt;/h2&gt;

&lt;p&gt;A trader asked: "Why does OrderModify keep reporting error 1 when I change the stop value?" A follow-up asked if an unchanged stop would also block a take-profit change. Those are different requests.&lt;/p&gt;

&lt;p&gt;An unchanged intended request can be skipped before the call.&lt;/p&gt;

&lt;p&gt;I compare the complete intended change before calling OrderModify.&lt;/p&gt;

&lt;p&gt;The official MQL4 reference calls error 1 ERR_NO_RESULT. Passing unchanged values can produce it. It does not say every field must change. A new take profit can still matter while the stop stays put. Open price and expiration can change only for pending orders.&lt;/p&gt;

&lt;p&gt;I ran the unchanged-stop case in the native MT4 Strategy Tester on EURUSD H4. It opened one simulated BUY 0.10 at 1.2054 with stop 1.1934. It called OrderModify with the same open price, stop and target. It returned false with immediate error 1. It then moved the requested stop to 1.1944. That call returned true with immediate error 0, and a fresh selection read back 1.1944. The position closed inside the tester at 1.2034 with zero account orders.&lt;/p&gt;

&lt;p&gt;A trailing rule can print the same valid target on many ticks. The candle low can stay flat, or rounding to the symbol increment can erase a tiny move. Logging error 1 each time hides what matters: stored value, requested value, and whether they differ.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three checks before you edit
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Stored target already matches
&lt;/h3&gt;

&lt;p&gt;Read the order again and compare stored and intended values at symbol precision. Do not trust a rounded chart label.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stop-only test hides a target change
&lt;/h3&gt;

&lt;p&gt;Compare take profit too. An unchanged stop does not mean the whole request is unchanged. My native run covered only the stop path. Test a target-only change separately.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stale error looks current
&lt;/h3&gt;

&lt;p&gt;Check the return value. Clear the error before the call and read GetLastError right after a fail, before another call replaces it. Keep request and result together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compare both fields, then validate the rest
&lt;/h2&gt;

&lt;p&gt;The helper below expects valid prices on the symbol increment. Zero can mean no stop or target. A false result means do not call. It never means remove protection.&lt;/p&gt;

&lt;p&gt;Use the order symbol increment, select the right ticket, and keep the market open price. Then run your own distance, freeze, direction and account checks. A different price is not automatically an allowed price. The helper does not choose a stop, round a price, select an order or send a request.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bool StopPairChanged(double currentSL,double currentTP,
                     double targetSL,double targetTP,double tickSize)
{
   if(!MathIsValidNumber(tickSize) || tickSize&amp;lt;=0) return false;
   if(!MathIsValidNumber(currentSL) || !MathIsValidNumber(currentTP) ||
      !MathIsValidNumber(targetSL) || !MathIsValidNumber(targetTP)) return false;
   return MathAbs(currentSL-targetSL)&amp;gt;tickSize*0.5 ||
          MathAbs(currentTP-targetTP)&amp;gt;tickSize*0.5;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The picture shows the real tester run. Its single-price check uses Point for this supplied EURUSD dataset. The two-field helper is for review only. It did not run in that test case. Do not read the picture as a test of every helper branch.&lt;/p&gt;

&lt;h2&gt;
  
  
  How you know it is fixed
&lt;/h2&gt;

&lt;p&gt;Unchanged call must return false with immediate error 1, then skip. Changed call must return true with immediate error 0, and a fresh selection must show 1.1944.&lt;/p&gt;

&lt;h3&gt;
  
  
  Your five-minute source check
&lt;/h3&gt;

&lt;p&gt;Find OrderModify in your trailing branch. Print the selected ticket, current stop and target, intended stop and target, symbol increment and immediate result. Check that a target-only update is not lost behind a stop-only equality test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does error 1 mean the trailing stop is broken?
&lt;/h3&gt;

&lt;p&gt;It can mean that this call requested no change. Inspect the current and intended values before changing your trading logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Must both stop loss and take profit change?
&lt;/h3&gt;

&lt;p&gt;No. One genuine parameter change can make the request meaningful. The unchanged-value condition concerns the request as a whole.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does a true comparison guarantee a successful modification?
&lt;/h3&gt;

&lt;p&gt;No. Stop distances, freeze rules, order state and server conditions still matter. Check the actual function result and stored order values.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.mql5.com/en/forum/152744" rel="noopener noreferrer"&gt;Original OrderModify error 1 question with stop and target follow-up&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stratcorealpha.com/fix/mt4-ordermodify-error-1" rel="noopener noreferrer"&gt;Original article and free EA check&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Native MT4 offline/default tester test case on supplied EURUSD H4 history, fixed 20-point spread, zero account orders sent. No broker acceptance, live execution or strategy performance is established.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>mql4</category>
      <category>debugging</category>
      <category>programming</category>
    </item>
    <item>
      <title>A 100 USD counter example: when your reset starts an hour too early</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Tue, 27 Oct 2026 11:58:44 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/a-100-usd-counter-example-when-your-reset-starts-an-hour-too-early-2lp5</link>
      <guid>https://dev.to/stratcorealpha/a-100-usd-counter-example-when-your-reset-starts-an-hour-too-early-2lp5</guid>
      <description>&lt;p&gt;On 25 October, a hardcoded 22:00 UTC reset could have erased a hypothetical 100 USD daily loss from your counter one hour early. That code would have started the next rule day one hour early on 25 October 2026.&lt;/p&gt;

&lt;p&gt;Eight original offline clock checks from 25 October 2026 passed. This is a clock check about rule dates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the written reset rule
&lt;/h2&gt;

&lt;p&gt;The question is simple. How is the limit calculated? The &lt;a href="https://academy.ftmo.com/lesson/maximum-daily-loss/" rel="noopener noreferrer"&gt;FTMO Academy lesson&lt;/a&gt; discusses that question. The &lt;a href="https://ftmo.com/en/trading-objectives/" rel="noopener noreferrer"&gt;current trading objectives&lt;/a&gt; describe a recalculation at midnight, 00:00 CE(S)T. CE(S)T means Central European time with its summer change. I use the IANA timezone Europe/Prague for the mappings below. A named timezone carries the change between UTC plus two hours in summer and UTC plus one hour in winter. A fixed offset misses that change.&lt;/p&gt;

&lt;p&gt;The local rule date matters. It is not always the date on a broker server, your laptop or an unlabelled UTC log.&lt;/p&gt;

&lt;p&gt;Many counters rest on one idea. A daily reset always happens at the same UTC hour. On 25 October the same local midnight maps to a different UTC hour. That shift is the point of this example.&lt;/p&gt;

&lt;h2&gt;
  
  
  The disputed half hour
&lt;/h2&gt;

&lt;p&gt;At 22:30 UTC on 25 October 2026, the Prague clock read 23:30 with an offset of plus one hour. That was still 25 October. A program that changed its daily counter at 22:00 UTC had already moved to 26 October 2026. It was thirty minutes before the correct local boundary.&lt;/p&gt;

&lt;p&gt;In the hypothetical 100 USD example, that program would show a fresh daily counter while the written rule still belonged to the old day. The loss stayed live under the challenge rule. The program had started the next day too soon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8biyt7o0gzzw5rc8tru6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8biyt7o0gzzw5rc8tru6.png" alt="Three exact UTC-to-Prague mappings from the offline clock checks" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are three of the saved timestamp cases.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;24 October, 22:00 UTC becomes 25 October, 00:00 at UTC+02.&lt;/li&gt;
&lt;li&gt;25 October, 22:30 UTC becomes 25 October, 23:30 at UTC+01.&lt;/li&gt;
&lt;li&gt;25 October, 23:00 UTC becomes 26 October, 00:00 at UTC+01.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The saved set holds seven timestamp cases plus one check for the elapsed time between those local midnights. That local day lasted 25 hours.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a 24-hour timer gives the wrong answer
&lt;/h2&gt;

&lt;p&gt;A common shortcut is to save the prior reset and add 24 hours. Another is to hardcode 22:00 UTC because that matched the prior summer midnight. Both hide the same idea. They assume the UTC span between local midnights never changes.&lt;/p&gt;

&lt;p&gt;On 25 October 2026 it changed. The next Prague midnight was at 23:00 UTC. I would calculate the next midnight in the written rule timezone first, then convert that instant to UTC for storage and comparison. I would not silently rename an uncertain server timestamp as UTC.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check your counter before you rely on it
&lt;/h2&gt;

&lt;p&gt;Use these four steps. They take about five minutes.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find the timezone and reset wording for your exact challenge product.&lt;/li&gt;
&lt;li&gt;Convert the next local midnight to UTC with a timezone database that includes daylight saving rules.&lt;/li&gt;
&lt;li&gt;Compare that instant with the firm's dashboard countdown. If they disagree, fix the rule or timestamp source before you trust the local counter.&lt;/li&gt;
&lt;li&gt;Test one instant just before the boundary and one exactly on it. The first must keep the old local date. The second must start the new one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For this example, 25 October 2026 at 22:59:59 UTC was still the old rule day. At 23:00:00 UTC, the Prague date changed to 26 October 2026. That one-second boundary in a repeatable clock check tells you more than a glance at a clock face.&lt;/p&gt;

&lt;p&gt;Your own check is the next reset instant and the dashboard countdown. The optional &lt;a href="https://stratcorealpha.com/rule-guard?ref=devto" rel="noopener noreferrer"&gt;free Pre-Check&lt;/a&gt;, the free Prop Rule Guard, can help organise the written rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this check does not show
&lt;/h2&gt;

&lt;p&gt;This clock check from 25 October 2026 shows these mappings only. It does not show breach detection, broker server mapping, live fills or profit. It does not set a loss percent shared by every challenge. It does not show remaining loss allowance under a limit, which also needs exact equity, the account value including open trades, plus open positions, fees and product rules. Check the rule text for your exact product.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stratcorealpha.com/guides/challenge-reset-dst-utc-2026-10-25.html" rel="noopener noreferrer"&gt;Original website article with clock proof&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>trading</category>
      <category>python</category>
      <category>programming</category>
      <category>fintech</category>
    </item>
    <item>
      <title>MT4 error 4107: log the exact price before changing it</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Mon, 26 Oct 2026 11:35:11 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/mt4-error-4107-log-the-exact-price-before-changing-it-b1j</link>
      <guid>https://dev.to/stratcorealpha/mt4-error-4107-log-the-exact-price-before-changing-it-b1j</guid>
      <description>&lt;p&gt;Your entry can look valid and still fail. My MT4 test returned error 4107 for an over-precise entry, then accepted current Ask.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkh89tfiq7ktzbgvharol.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkh89tfiq7ktzbgvharol.png" alt="Native MT4 tester: fractional-point entry fails with 4107, current Ask succeeds and stored entry matches. Zero account orders." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the error means
&lt;/h2&gt;

&lt;p&gt;A trader testing XAUUSD reported an invalid price of 2347.42500000. The number looked close to the market. The trader had checked for negative inputs and tried normalization, but the error remained. Without the source and symbol settings, that report does not establish which argument was wrong. A plausible-looking number is not enough to diagnose an OrderSend call.&lt;/p&gt;

&lt;p&gt;I start by keeping three things together: the exact request, the function return value, and the error captured immediately after the call. The request includes entry, stop loss and take profit. Looking only at the entry price can miss a problem in a calculated stop or target. Printing fewer decimal places can also hide the input that the function actually received.&lt;/p&gt;

&lt;p&gt;The official MQL4 error table lists 4107 as ERR_INVALID_PRICE_PARAM. It separately lists 129 as ERR_INVALID_PRICE and 130 as ERR_INVALID_STOPS. Those numbers should not be swapped in a log or folded into one guessed explanation. The OrderSend reference describes price-thread and precision conditions for 129, and stop-distance conditions for 130. Record the number that your own terminal returned.&lt;/p&gt;

&lt;p&gt;I built a small native MT4 Strategy Tester test case to isolate an over-precise entry. On supplied EURUSD H4 history, it first submitted a simulated BUY at Ask plus 0.1234567 of one point. The deliberately altered price returned ticket -1 and error 4107. The next simulated BUY used the current Ask without that extra fraction. It returned a positive ticket and error 0. A fresh order selection confirmed that the stored entry matched Ask within half a point.&lt;/p&gt;

&lt;p&gt;The simulated position was then closed inside the tester. No order went to an account. The screenshot is the actual tester output from this run, not a mock trading result. The test case uses one EURUSD dataset and a fixed 20-point spread. It does not reproduce the trader's XAUUSD setup, inspect that person's source, or establish a universal rounding rule for gold.&lt;/p&gt;

&lt;p&gt;I diagnose the exact request before adding another retry. A retry with the same invalid input adds no new information. A retry after silently rounding a pending entry can change the trading rule. Keep the original value in the record, identify the field that fails validation, and decide whether a corrected candidate still satisfies the intended rule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three code paths to check
&lt;/h2&gt;

&lt;h3&gt;
  
  
  An entry calculation adds unsupported precision
&lt;/h3&gt;

&lt;p&gt;In the native test case, adding a fractional point to Ask was enough to produce 4107. For a market BUY, use the current Ask for the actual order symbol. For a market SELL, use current Bid. A calculated pending entry has a different validation path and must retain the intended distance and direction after alignment.&lt;/p&gt;

&lt;h3&gt;
  
  
  A calculated stop or target is the bad input
&lt;/h3&gt;

&lt;p&gt;Record stop loss and take profit alongside the entry. Check that every nonzero value is finite, has the intended sign and sits on the permitted price increment. Zero can mean no stop or target. Do not reject zero indiscriminately or silently replace a requested protective stop with zero.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decimal formatting is mistaken for a valid price grid
&lt;/h3&gt;

&lt;p&gt;Digits controls decimal precision. A symbol can also have a tradable price increment that needs separate handling. Rounding to a number of decimal places does not by itself prove that a calculated price is on that grid. Read the symbol specifications and keep point, tick increment and pip conventions distinct.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the failing input and immediate error in one record
&lt;/h2&gt;

&lt;p&gt;The excerpt is deliberately invalid and belongs only in a tester. Its purpose is to show the input that caused this local failure. It is not an EA entry routine. The full test case refuses to initialize outside IsTesting, checks the successful order by ticket, reads back its open price, closes the simulated position and requires every expected result before printing PASS.&lt;/p&gt;

&lt;p&gt;The change in this test case was to stop altering a valid terminal quote. It was not a general instruction to round every value. For a real EA, first select the correct symbol and request type. Read fresh prices for that symbol. Validate calculated pending prices and stops against their own requirements. If alignment moves a level, check that the resulting request still represents the rule you intended to trade.&lt;/p&gt;

&lt;p&gt;ResetLastError before the attempt and capture GetLastError immediately afterward. Other calls can change the saved error. Treat a failed ticket as a failed attempt, not as an open position. If the request is accepted, select the returned ticket and read the stored values. That gives you evidence of what happened instead of relying on a success message alone.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Native tester test case only. OnInit rejects !IsTesting().
double badPrice = Ask + Point * 0.1234567;
ResetLastError();
int ticket = OrderSend(Symbol(), OP_BUY, 0.1, badPrice,
                       10, 0, 0, "FIX26 invalid", 260026, 0, clrNONE);
int error = GetLastError();
// Observed in this test case: ticket = -1, error = 4107.
// A separate call using current Ask returned a positive ticket and error 0.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Native MT4 offline tester, supplied EURUSD H4 history, 3 May 2021, fixed 20-point spread. One invalid entry and one accepted simulated entry. No XAUUSD diagnosis, broker execution, latency or strategy performance claim.&lt;/p&gt;

&lt;h2&gt;
  
  
  How you know it is fixed
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Negative case: preserve the deliberately invalid input
&lt;/h3&gt;

&lt;p&gt;Run the supplied test case only in the Strategy Tester. Its fractional-point entry must fail with ticket -1 and captured error 4107 in the documented environment. An unexpected result is a failed test, not permission to change the expected number.&lt;/p&gt;

&lt;h3&gt;
  
  
  Positive case: read back the accepted simulated entry
&lt;/h3&gt;

&lt;p&gt;The current-Ask call must return a positive ticket and error 0. Select that ticket again and compare its stored entry with the requested Ask. Close the simulated position and keep the complete result log.&lt;/p&gt;

&lt;h3&gt;
  
  
  Your five-minute source check
&lt;/h3&gt;

&lt;p&gt;Find the failing OrderSend. Print its symbol, operation, entry, stop, target, Digits, Point, symbol price increment, Bid and Ask. Keep enough precision to expose the actual arguments. Check all three price fields before changing rounding or retry behaviour.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does 4107 prove that my broker rejected the order?
&lt;/h3&gt;

&lt;p&gt;The number alone does not establish a broker-side rejection. Keep the exact request and local return value. This offline test case reproduced 4107 without sending any account order.&lt;/p&gt;

&lt;h3&gt;
  
  
  Will NormalizeDouble fix every invalid-price report?
&lt;/h3&gt;

&lt;p&gt;No. Decimal precision, the symbol price increment, request direction and stop distances are separate checks. The right correction depends on the actual failing field and intended rule.&lt;/p&gt;

&lt;h3&gt;
  
  
  Did this test solve the original XAUUSD report?
&lt;/h3&gt;

&lt;p&gt;No. The original report did not include enough source and symbol details. This is an independently reproduced EURUSD precision failure with an explicit before-and-after check.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.mql5.com/en/forum/467796" rel="noopener noreferrer"&gt;Original XAUUSD invalid-price question, unresolved source details&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.mql4.com/constants/errorswarnings/errorcodes" rel="noopener noreferrer"&gt;Official MQL4 runtime error codes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.mql4.com/trading/ordersend" rel="noopener noreferrer"&gt;Official MQL4 OrderSend parameters and return values&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stratcorealpha.com/fix/mt4-error-4107-invalid-price-parameter" rel="noopener noreferrer"&gt;Original article and free EA check&lt;/a&gt;&lt;/p&gt;

</description>
      <category>trading</category>
      <category>programming</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Alpaca partial fills: count 7 shares, not 10</title>
      <dc:creator>Arnold Holm</dc:creator>
      <pubDate>Sat, 24 Oct 2026 14:41:25 +0000</pubDate>
      <link>https://dev.to/stratcorealpha/alpaca-partial-fills-do-not-add-3-and-7-188g</link>
      <guid>https://dev.to/stratcorealpha/alpaca-partial-fills-do-not-add-3-and-7-188g</guid>
      <description>&lt;p&gt;Your bot should count 7 filled shares after totals of 3 and 7, not 10. In my small local check, adding both totals overstated the order by three shares. That is enough to give you the wrong view of how much of an order remains open.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://dev.to/sergei_b/a-good-price-is-not-yet-a-trade-1mab"&gt;A Good Price Is Not Yet a Trade&lt;/a&gt;, Sergei B asks: "Which orders went into the count?" His post separates orders with some filled volume from orders with none. That distinction also matters when you read a bot's filled quantity. A good fill price says little if the quantity beside it has been counted twice.&lt;/p&gt;

&lt;p&gt;This example uses invented quantities. It does not use Sergei's trading records or claim to repeat his measurement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two messages do not mean two new trades
&lt;/h2&gt;

&lt;p&gt;Suppose you ask your bot to buy seven shares. The first message says three have filled. A later message says seven have filled in total. The later seven includes the first three. Only four more shares have filled between those messages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.alpaca.markets/us/docs/websocket-streaming" rel="noopener noreferrer"&gt;Alpaca's trade-update documentation&lt;/a&gt; distinguishes the quantity of an individual execution, &lt;code&gt;qty&lt;/code&gt;, from the order's total filled quantity, &lt;code&gt;filled_qty&lt;/code&gt;. Check which field your bot stores before changing the calculation. Adding new executions and reading order totals are different ways to answer the same narrow quantity question.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Message&lt;/th&gt;
&lt;th&gt;Shares in this execution&lt;/th&gt;
&lt;th&gt;Total shares filled for the order&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First partial fill&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Final fill&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You can add the two distinct executions: three plus four makes seven. Or you can read the latest authoritative order total: seven. Adding the two order totals gives ten, which counts the first three twice.&lt;/p&gt;

&lt;p&gt;I keep an order's running filled quantity separate from each individual execution. I would stop on an unexplained lower total rather than quietly change the number shown to the trader.&lt;/p&gt;

&lt;h2&gt;
  
  
  What my local check found
&lt;/h2&gt;

&lt;p&gt;I ran six checks with invented inputs. The first sequence reported three, then seven, and kept seven as the order total. Repeating seven added zero. A second order kept its own quantity. A lower total, a negative quantity and a non-number each stopped the calculation without changing the first order's seven shares.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2x30rekzygngla7g7u3u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2x30rekzygngla7g7u3u.png" alt="Actual local check: seven shares counted correctly; adding the two reported totals gives ten. Six checks passed." width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The picture comes from the output of that local run. The bar marked ten shows the incorrect addition of the two reported totals. It is not an order sent to a broker. You can reproduce the core calculation with Python's standard library:&lt;br&gt;
&lt;/p&gt;

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

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Reconcile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;pass&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;observe_total&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;totals&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;filled_qty&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filled_qty&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_finite&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;Reconcile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;invalid filled quantity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;totals&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;Reconcile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;lower total: reconcile before changing state&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;totals&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt;

&lt;span class="n"&gt;totals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;observe_total&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;totals&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order-A&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;observe_total&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;totals&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order-A&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;7&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;observe_total&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;totals&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order-A&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;7&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;totals&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order-A&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Check one order in your own history
&lt;/h2&gt;

&lt;p&gt;Compare one order's latest filled total with the sum of its distinct executions, keeping the order identifier the same. Do this on exported history or demo data before changing a running bot. Keep the message order and any execution identifiers with the values, so a repeated message cannot look like a new trade.&lt;/p&gt;

&lt;p&gt;Also compare the filled amount with what you originally requested. Seven filled shares out of a seven-share request leaves none open in this example. Three filled out of seven leaves four. Do not mark the whole requested quantity as completed just because one part filled at a good price.&lt;/p&gt;

&lt;p&gt;If a later message shows six after seven, investigate. It may be old information, a correction or a mapping mistake. This short check cannot choose between those explanations. Keeping the larger value forever would hide a real correction; trusting whichever message arrives last would hide a delayed one.&lt;/p&gt;

&lt;p&gt;This is a check of one order's quantities, not your account's position or a trading result. The code has no lasting storage, reconnect handling or full account comparison, and restarting it loses the dictionary. The six local checks do not establish that a live bot is ready.&lt;/p&gt;

&lt;p&gt;If your bot's order history disagrees with its dashboard, the &lt;a href="https://stratcorealpha.com/bot-fix?ref=devto" rel="noopener noreferrer"&gt;bot repair page&lt;/a&gt; gives you a place to describe the expected and actual behaviour. Keep account identifiers and access details out of public comments.&lt;/p&gt;

</description>
      <category>python</category>
      <category>debugging</category>
      <category>trading</category>
      <category>algotrading</category>
    </item>
  </channel>
</rss>
