Days 4–10 covered SMA, Bollinger Bands, MACD, ADX, and Ichimoku before returning to risk management. The useful result was not a winning indicator. Out-of-sample performance, trading costs, and stop-loss logic quickly exposed backtests that looked convincing in sample.
The Seven-Day Learning Map
| Day | Core Topic | Indicator Type | Key Insight |
|---|---|---|---|
| Day 4 | SMA Strategy + IBKR Integration | Trend Following | Moving average crossovers, data extraction pipeline |
| Day 5 | SMA Intraday Trading Adaptation | Trend Following (Short-term) | Timeframe switching, SMA parameter sensitivity |
| Day 6 | Bollinger Bands | Volatility + Mean Reversion | The 95% rule, the cost of overfitting |
| Day 7 | MACD Golden Cross | Momentum | Lagging indicator behavior, histogram slope filter |
| Day 8 | ADX Trend Strength | Trend Strength Filter | Direction vs. strength, false signal filtering |
| Day 9 | Ichimoku Cloud | All-in-One System | Five-line integration, the cloud as a no-trade zone |
| Day 10 | Risk Management Mindset | Psychology & Discipline | Independent stop-losses, risk of ruin, positive expectancy |
Day-by-Day Notes
Days 4–5: Starting with an SMA Trend Strategy
The Simple Moving Average (SMA) is straightforward: calculate the arithmetic mean of the past closing prices.
The SMA smooths noise so price direction is easier to see. A crossover is a possible trend-shift signal, not a prediction by itself.
What We Learned in Practice
- Day 4: We used the IBKR API to extract historical data for the MAG7 stocks (MSFT, AAPL, TSLA, NVDA, META, GOOGL, AMZN) and searched for an SMA window for each ticker. The same parameter set did not transfer cleanly across all seven.
- Day 5: We converted a daily SMA 200 strategy into a 1-minute SMA 5 intraday script. The shorter timeframe made signals more responsive and increased false signals sharply.
SMA 5 on a 1-minute chart is extremely jittery. Faster pace does not equal higher returns; it demands even stricter entry/exit discipline.
Day 6: Describing Volatility with Bollinger Bands
Bollinger Bands consist of three lines:
- Middle Band: SMA (typically 20-day)
- Upper Band: SMA + (typically )
- Lower Band: SMA -
Where is the standard deviation of closing prices.
Under a normal-distribution assumption, about 95% of observations fall within ±2 standard deviations. A band break does not guarantee reversal; it only says price is far from its recent average.
Backtest Results and Reflection
Using AAPL with a "buy at lower band, sell at upper band" mean-reversion logic over ten years:
| Metric | In-Sample (2016–2021) | Out-of-Sample (2022–2026) |
|---|---|---|
| CAGR | 25.99% | 8.85% |
| Sharpe | 1.20 | 0.59 |
| Max Drawdown | -31.43% | -16.61% |
- The grid search's best parameters
(SMA=20, σ=3.0)produced a Sharpe 2.05× above the mean, an overfitting warning. - The 3σ bandwidth was rarely touched (only 1 trade out-of-sample), meaning the strategy sat in cash most of the time — low drawdown but also low returns.
- AAPL exhibited a strong uptrend over 2016–2026; a pure mean-reversion strategy sold too early at the upper band, missing extended trend gains.
A parameter set that ranks first in a backtest is not automatically best for the future. Here, the result looks more like an overfitting warning.
Day 7: Using MACD to Read Momentum
MACD stands for Moving Average Convergence Divergence. It measures momentum through the relationship between two exponential moving averages.
- Golden Cross: MACD crosses above the signal line, treated as a bullish momentum signal
- Death Cross: MACD crosses below the signal line, treated as a bearish momentum signal
Advanced Technique: Histogram Slope Filter
Pure crossover signals are prone to whipsaws in ranging markets. Adding a histogram slope filter:
- Only allow buy entries when the histogram is rising
- Only allow sell entries when the histogram is falling
This confirmation layer removes some false signals and delays entry. That is the trade: more confirmation, less timeliness.
Day 8: ADX Measures Strength, Not Direction
ADX (Average Directional Index) does not generate direction by itself. It measures whether a trend exists and how strong that trend is.
How ADX Is Calculated
ADX isn't derived directly from price — it goes through multiple layers of processing. The full calculation chain breaks down into five steps:
Step 1: Directional Movement (+DM / -DM)
For each bar, compare the current high/low against the previous bar:
In plain terms: +DM captures the magnitude of "upward breakouts," while -DM captures "downward breakouts."
Step 2: True Range (TR)
TR measures each bar's actual volatility range, accounting for gap openings.
Step 3: Wilder's Smoothing
Apply Wilder's smoothed moving average (typically ) to +DM, -DM, and TR separately:
Wilder's smoothing is equivalent to a period EMA. So ADX 14 actually decays at roughly the same rate as EMA 27 — slower than you might intuitively expect.
Step 4: Directional Indicators (+DI / -DI) and DX
+DI represents the proportion of upward momentum relative to total volatility; -DI represents the downward proportion. DX measures the "divergence" between the two.
Step 5: ADX = Smoothed DX
The final ADX applies one more round of smoothing to DX, making the trend-strength reading more stable and less reactive to single-day spikes.
In practice, one line of Python calculates it: ta.trend.ADXIndicator(high, low, close, window=14). The formula matters because two smoothing stages make ADX slow, so it is better suited to confirmation than prediction.
ADX Value Interpretation
| ADX Value | Trend Strength | Suggested Action |
|---|---|---|
| 0–20 | Weak / No Trend | Stay on the sidelines |
| 20–40 | Moderate Trend | Trend is forming |
| 40–60 | Strong Trend | Suitable for trend-following |
| 60–100 | Extreme Trend | Exceptionally strong momentum |
ADX works alongside +DI (Positive Directional Indicator) and -DI (Negative Directional Indicator):
- Buy: ADX > 25 and +DI crosses above -DI
- Sell: ADX > 25 and -DI crosses above +DI
ADX works better as a filter than as a direction signal. ADX > 25 only says trend strength has crossed the chosen threshold; +DI, -DI, or another condition still has to supply direction.
Day 9: Ichimoku Puts Several Readings on One Chart
Ichimoku Kinko Hyo displays trend direction, momentum strength, and support or resistance on one chart through five lines:
| Component | Calculation | Role Analogy |
|---|---|---|
| Tenkan-sen (Conversion Line) | (9-day High + 9-day Low) ÷ 2 | The Scout — quick, responsive short-term detection |
| Kijun-sen (Base Line) | (26-day High + 26-day Low) ÷ 2 | The General — stable, authoritative medium-term anchor |
| Senkou Span A (Leading Span A) | (Tenkan + Kijun) ÷ 2, shifted forward 26 periods | Upper or lower edge of the cloud |
| Senkou Span B (Leading Span B) | (52-day High + 52-day Low) ÷ 2, shifted forward 26 periods | The other edge of the cloud |
| Chikou Span (Lagging Span) | Current close, shifted backward 26 periods | The Second Confirmer |
The area between Senkou Span A and B forms the "cloud."
- Price above the cloud → bullish environment
- Price below the cloud → bearish environment
- Price inside the cloud → direction unclear, best to wait
Compared to a Single MA Strategy
While SMA only tells you "where price is relative to the average," Ichimoku simultaneously provides:
- Forward-looking perspective: The cloud extends into the future, letting you anticipate support and resistance zones
- Multi-dimensional confirmation: Tenkan/Kijun crossover + cloud position + Chikou Span — triple confirmation reduces false signals
- Built-in momentum reading: The distance between price and cloud indicates momentum strength; convergence signals weakening momentum
The tradeoff: signals are more conservative, trading frequency is lower, and opportunities in choppy markets are often missed.
Day 10: How a $1.88 Million Account Went to Zero
There was no code on Day 10. We read about a trader who ran a quantitative strategy called Imhotep. The account reached $1.88 million, then went to zero overnight after untested stop-loss code, absent monitoring, 100% capital deployment, and leverage combined in one liquidation event.
- Using leverage
- Not testing the stop-loss logic
- No proper monitoring or alert system
- Trading with 100% of his capital
- Believing he was invincible when things were going well
My Safety Net Framework
Drawing from The Trading Bible's core philosophy, I distilled three survival principles:
Principle 1: Drive Single-Trade Risk Toward Zero
- Maximum risk per trade ≤ 1% of total capital
- Calculate leverage based on actual exposure, not nominal position size
Principle 2: Maximize Your Survival in the Market
- Even after 20 consecutive stop-losses, the account retains 80%+ of its capital
- Separate "trading capital" from "reserve capital" — the reserve is never touched
Principle 3: Ensure Positive Expected Value
Where = win rate, = average gain, = loss rate, = average loss. Only strategies with positive expected value are worth executing.
Code can execute your logic, but only your risk awareness can keep you in the game.
Problems That Recurred Across Seven Days
In-Sample Winners Rarely Stay Winners Out of Sample
Every parameter optimization is a battle against overfitting. Across Day 6 (Bollinger Bands), Day 7 (MACD), Day 8 (ADX), and Day 9 (Ichimoku), we repeatedly confirmed the same truth:
The best in-sample parameters often lose their lead out of sample.
How to cope:
- Always split data into in-sample (training) and out-of-sample (validation) periods
- When reading Sharpe heatmaps, choose the "plateau" over the "peak" — a stable parameter region is more reliable than a single optimal point
- When in-sample Sharpe dramatically exceeds out-of-sample, that's the overfitting red flag
The R.E.A.L. Backtesting Framework
All backtests followed the R.E.A.L. principles:
- Realistic: Include commissions ($0.005/share) and slippage (0.05%)
- Evidence-based: Validate phase by phase, never skip steps
- Avoiding Bias: Apply
signal.shift(1)— execute on the next bar's open to prevent look-ahead bias - Logged: Document observations in Markdown at every phase for reproducibility
Indicator Selection Quick Reference
| Market Condition | Well-Suited Indicators | Less Suitable Indicators |
|---|---|---|
| Clear Trend | SMA, MACD, Ichimoku | Bollinger Bands (mean reversion) |
| Range-Bound | Bollinger Bands, RSI | MACD, ADX |
| Uncertain Direction | ADX (to confirm whether it's worth trading) | All signal-type indicators |
| Need Comprehensive View | Ichimoku (trend + momentum + S/R) | Any single indicator alone |
Every indicator depends on a market regime. Identifying that regime before selecting a tool is more useful than searching for one universally “best” indicator.
Five Rules from the Week
- Simple strategies tend to be more robust. The more complex the system, the more likely it breaks in live trading.
- Backtests are maps, not territories. Historical data is perfect; markets are not.
- Risk management comes before everything. Survive first, profit second.
- Lagging isn't a flaw — it's a feature. An extra layer of confirmation means fewer false signals.
- Don't chase "optimal" — chase "robust." Peaks on a Sharpe heatmap are traps; plateaus are where you want to be.
Day 11 starts RSI divergence and indicator combinations, using the same out-of-sample checks and R.E.A.L. framework.