
EA Line Recognition: How "Tolerance Band Width" Changes Performance!
## The Case for "Wobbly" Lines: Why Precision Isn't Always Your Friend in FX Trading
A beginner-friendly summary of the verification: “EA Line Recognition: How “Tolerance Band Width” Changes Performance!”.

Breakout entry example (XAUUSD daily, real data): buy when price breaks above the recent high.
The Case for “Wobbly” Lines: Why Precision Isn’t Always Your Friend in FX Trading
Ever looked at an FX chart and drawn a perfect trendline, only for the price to “touch” it, “bounce” off it, or “slightly break” it before reversing? If you’re using an Expert Advisor (EA) to trade these lines, you know how frustrating it can be when the market doesn’t respect your perfectly drawn geometry. Our community brought up a great point: charts aren’t always precise. There’s often a slight delay in reaction, a “touch” that isn’t quite exact, or a “fakeout” where price seems to break a level only to snap back. This suggests our lines need some “wiggle room” – a tolerance band around them.
We’ve actually had this concept of “width” or “tolerance bands” built into our EA engine for a while, dynamically linked to Average True Range (ATR). (Quick jargon check: Average True Range, or ATR, is a measure of market volatility. It helps our EA adjust these bands dynamically, so they get wider in choppy markets and narrower in calm ones.) We use it for various line types: merge_atr for touch zones, break_atr for fakeout zones, and level_atr for general proximity for channels, plus retest_atr for trendlines.
However, while we’d thoroughly tested the robustness of horizontal levels by sweeping their level_atr width (that was Research 73), we hadn’t done the same for the actual widths of channels and trendlines themselves. It was time to put them to the test! We decided to systematically “sweep” (test a range of values for) these band widths, from narrow to wide, and see how it impacted our forward test results.
Putting Our “Wobbly” Lines to the Test
We focused on two main types of lines: channels and trendlines. For each, we ran extensive forward tests, exploring how different band widths affected profitability, consistency, and overall robustness.
Channels: A Little Wiggle Room Helps, But Not Always
First up were channels, using our YosugaDow min_channel_score strategy on the H1 (1-hour) timeframe.
The “Aha!” Moment:
We found something significant right away. When we broadened the “proximity band” (level_atr) from its default of 1.0 ATR to 1.5 ATR, our forward test results completely flipped! We went from a cumulative -6.8% loss to a +15.7% profit! This partially corrects our previous Research 75, where we noted a “1/6 channel failure” – it seems that failure was partly due to our proximity band being too narrow. Giving the channels a bit more breathing room really made a difference.
The Catch:
But here’s the kicker: even with this improvement, the consistency of winning years maxed out at only 3 out of 6 years. Compare that to horizontal levels, which often showed 5 out of 6 winning years. This positive cumulative return was also heavily dependent on one single, very profitable year. For example, a band setting of 1.5/0.7 ATR gave us a massive +34% in one year, leading to a total of +23.6%, but only won in 2 out of 6 years. This is a classic “fingerprint of over-optimization” – like tailoring a suit so perfectly for one person that it won’t fit anyone else.
We also found that broadening the internal “touch bands” (merge/break) within the channel engine actually had the opposite effect. It led to a Profit Factor (PF) of only 1.08 (meaning gross profit was just 8% higher than gross loss), a high Drawdown (DD) of -14%, and a massive increase in the number of trades. This tells us the EA was picking up a lot of low-quality, unreliable channel lines.
Conclusion for Channels:
While adjusting the channel width can push them into profitable territory, their overall robustness and consistency are still not as strong as horizontal levels. Our existing hierarchy (horizontal lines are generally more robust than diagonal lines) remains valid, though our previous Research 75 might have been too harsh in its outright rejection of channels, largely due to these narrow band settings.
Trendlines: A Hidden Gem Uncovered!
Next, we turned our attention to trendlines, specifically a long-only TrendlineRetest strategy. Our previous Research 60 had labeled this “non-deployable,” so we were keen to see if band width played a role.
The Real Culprit:
Here’s a major discovery: the band width was not the “cause of death” for trendlines on the D1 (Daily) timeframe. Instead, the D1 timeframe itself was the problem. It simply has fewer swings and less statistical data to work with, leading to structural issues.
Surprising Robustness:
On the other hand, the H1 (1-hour) and H4 (4-hour) timeframes showed remarkable robustness across the entire range of retest_atr band widths we tested (from 0.3 to 1.2 ATR)!
- H4: Showed 5 out of 6 winning years, with a cumulative profit of +8% to +12%.
- H1: Even better, with 4 out of 6 winning years and a cumulative profit of +21% to +53%! This is fantastic news! It means that the “non-deployable” verdict from Research 60 was primarily due to a combination of trying to trade the short side, conflicts with the M1 (1-minute) timeframe, and the collapse of performance on the D1 timeframe – not because the trendlines themselves were inherently flawed. Our long-only trendline strategy on H1 and H4 timeframes actually shows a real, robust edge! This is a significant correction to Research 60’s underestimation.
The Big Takeaways & A Reality Check
This research confirms what our users pointed out: band width significantly impacts trading results. It shows the importance of meticulous validation discipline, where we systematically sweep parameters along their robustness axes, much like we did in Research 73.
The Final Gauntlet: Trendline-Long’s Performance
Given the strong performance of the long-only trendline strategy on H1/H4, we put it through our formal gate test (scripts/research/study_trendline_long_gates.py, using retest_atr of 0.8) to see if it could be promoted to a confirmed trading system.
M1 Safety:
First, the good news: the strategy passed our M1 (1-minute) intraday safety checks with flying colors. The worst daily drawdown was only 2.29% for H1, 1.62% for H4, and 3.05% combined, with zero days of conflict. This confirms that the M1 conflict in Research 60 was indeed primarily caused by the short side of the strategy, which is now resolved by focusing on long trades only.
The “Marginal” Edge:
However, the edge, while real, proved to be somewhat marginal:
- H1: +21.9% cumulative profit, but a high Drawdown (DD) of -18.7% and a thin Profit Factor (PF) of 1.08. (Reminder: PF = gross profit / gross loss; >1 means profitable, but 1.08 is barely above break-even). Monte Carlo simulations (a fancy way of stress-testing with slight variations) showed that while the core strategy was stable (72% passed STEP1, 56% overall), a significant 23% of simulations resulted in disqualification due to maximum loss (compared to ~2% for our core systems). This indicates higher tail risk.
- H4: Performance was almost flat at +0.4% profit with a PF of 1.01 (barely profitable).
- Combined: +22% profit, DD of -21%, and PF of 1.06. Correlation with Our Core System: We also looked at how this trendline strategy’s daily returns correlated with our existing core trading systems. The correlation ranged from +0.42 (H1) to +0.51 (combined). While this is more independent than the 0.62 seen in Research 60, it’s still quite high and indicates that this strategy is largely capturing similar market trends as our existing systems. It doesn’t offer enough diversification value to warrant a completely new, separate system.
Final Conclusion: Real, But Not New
So, what’s the verdict? The long-only trendline strategy is real – it’s forward-robust and safe for M1 intraday trading. However, its thin Profit Factor (~1.0-1.1), high Drawdown (-18% to -21%), and elevated tail risk (23-30% maximum loss disqualification in stress tests) mean it doesn’t surpass the performance or diversification benefits of our existing Core v1.2.0 or Sat2 systems. In essence, while the lines themselves are robust, the edge they provide is already largely captured by our current core strategies. It’s similar to what we found with Research 55 (Ichimoku/Supertrend) – it’s a valid way to identify trends, but it’s not bringing a fundamentally new, uncorrelated source of profit to the table. Therefore, it will not be promoted to a confirmed standalone system, and our confirmed system remains Core v1.2.0. However, this research is far from a failure! We’ve corrected our previous underestimation of trendlines, refined our understanding of channel robustness, and gained valuable insights into the critical role of tolerance bands. The underlying channel and trendline engine, along with the optimized width parameters, remain permanent assets in our toolkit, ready to be leveraged in future research and potentially integrated into more complex strategies. It’s a testament to the fact that even when a strategy doesn’t make the cut as a standalone system, the journey of discovery and refinement is always incredibly valuable!
How this connects
This verification builds on earlier ones (what failed before and what I tried this time, comparisons between approaches).
- Ichimoku Kinko Hyo & Supertrend: Can They Deliver a Winning EA…
- Trendline Break Strategy: Can This Unique EA Catch the First…
- EA’s New Vision: Quantifying “Effective” Lines! A Game-Changer…
- Diagonal Lines for EA: Can “Channels” Be Quantified? Why This…
Code to reproduce
You can reproduce this with the following scripts (see repo).
scripts/research/study_trendline_long_gates.py