Swing Trading Based on Daily and 4-Hour Charts
Hello, this is Kabu-Ken!
After losing approximately 210,000 yen in day trading, I am currently researching swing trading by utilizing data.
In my previous article, I introduced the reasons for pausing day trading and shifting to swing trading, based on the results of 4,136 backtests.
Article 3 | Backtest Verification and Future Strategy
In this article, I will introduce the entry and exit conditions for the swing trading strategy I am currently researching, as well as past backtest results.
What I want to focus on in particular is how the stock price moved after purchasing the stock.
To explore issues that cannot be understood through simple win rates or profit and loss alone, I have categorized the price movements after purchase using cluster analysis.
This is not yet a completed investment strategy.
I plan to share the process of improving it using data, and I hope to receive advice from you, the readers.
1. Combining Daily and 4-Hour Charts
For this swing trading strategy, I use the 20-period moving average on both daily and 4-hour charts.
The basic concept is to confirm the upward trend on the daily chart and wait for a recovery from a temporary dip on the 4-hour chart.
1. Daily Chart: Confirming the breakout above the 20-day moving average
On the daily chart, I use the 20-day simple moving average (SMA20), which is the average of the closing prices over the last 20 business days.
First, I confirm that the stock price has crossed above the 20-day line from below.
Specifically, the conditions are as follows:
I use this as the starting point for the breakout.
I do not treat it as a new entry candidate every day just because it is above the 20-day line.
At the time of considering a purchase, we check the following additional conditions.
By doing this, we confirm not only the stock price but also the direction of the moving average line itself.
We use the finalized daily chart for judgment. The results determined after the market close are used starting from the next business day.
Note that if the stock price returns to or below the 20-day moving average, the starting point of the upward breakout that has not yet been used will expire.
② 4-Hour Chart: Confirming the Pullback to the 20-Period Moving Average
After confirming the direction on the daily chart, we look for the entry timing on the 4-hour chart.
On the 4-hour chart, we also use the 20-period simple moving average (SMA20), which averages the closing prices of the most recent 20 periods.
There are two conditions to check:
Condition A: Pullback to the moving average
The low of at least one of the most recent three finalized 4-hour candles must be at or below the 20-period line for that candle.
Condition B: Maintaining a position above the moving average
The closing price of the latest finalized 4-hour candle must be above the 20-period line for that candle.
In other words, we wait for a state where the price has fallen near the 20-period line once, but has returned above the line by the closing price.
Here too, we do not make judgments based on unfinalized candles during the period.
③ Entry Timing
Once the conditions for both the daily and 4-hour charts are met, we use the opening price of the first observable 1-minute candle in the next time frame as the benchmark for the entry price.
In backtesting, we use a price with an additional disadvantageous tick added as the reference purchase price.
We do not count purchases made by going back to prices before the conditions were finalized.
In addition, the 4-hour charts used in this verification are divided into the following two segments to align with Japanese stock market trading hours.
Segment Time First Half 9:00-13:00 Second Half 13:00-Market Close
Strictly speaking, the second half is not 4 hours, but for the sake of convenience in this article, it is referred to as a “4-hour chart.”
Since the segmentation method may differ from the 4-hour charts in general charting software, caution is required when making comparisons.
2. Capital Management at Entry
Even if the entry conditions are met, it does not mean that a purchase will always be made.
Capital management conditions are also checked.
The basic policy for this approach is as follows.
-
Trading volume is in 100-share units
-
Planned loss per trade is based on 1% of the valuation assets
-
If there is insufficient buying power, the purchase is skipped
-
If the planned loss limit is exceeded, the purchase is also skipped
For example, if the valuation assets are 1 million yen, the target planned loss is 10,000 yen.
However, this does not mean that losses can always be kept within 10,000 yen.
Due to sudden changes in stock prices or price gaps, losses larger than expected may occur.
Also, if you cannot enter at the initial price, the approach is to wait for the next time frame that meets the conditions rather than chasing the price within the same time frame.
3. Determining Stop-Loss Width Using ATR
For exit conditions, we use ATR, which represents the range of stock price fluctuations.
ATR stands for “Average True Range” and is an indicator that shows how much a stock price has moved over a certain period.
It is used to measure the magnitude of price movements, not to predict the direction of stock price increases or decreases.
How to calculate ATR14
First, calculate the following three values for each candle:
-
High – Low
-
Absolute value of the difference between the high and the previous candle’s close
-
Absolute value of the difference between the low and the previous candle’s close
The maximum of these values is defined as the TR (True Range).
TR = max(High – Low, |High – Previous Close|, |Low – Previous Close|)
The ATR14 used here is the simple average of the TR values of the most recent 14 completed 4-hour candles.
ATR14 = Sum of the most recent 14 TR values / 14
Note that common charting software may use different smoothing methods for ATR.
Since this verification uses a simple average, the value may differ from an ATR calculated using methods such as Wilder’s, even with the same 14-period setting.
1R is 1.5 times the ATR14
In this verification, we use the ATR14 of the most recent completed 4-hour candle available at the time of purchase.
1R = ATR14 × 1.5
1R represents the initial planned loss range in terms of stock price.
For example, in the following case:
In this case, the target selling price would be as follows.
Item Calculation Price Purchase Price – 3,000 yen ATR14 Simple average of the most recent 14 TRs 100 yen 1R 100 yen x 1.5 150 yen Stop-loss price 3,000 yen – 150 yen 2,850 yen Take-profit price 3,000 yen + 300 yen 3,300 yen
*These are hypothetical figures for explanation purposes.
Stocks with a larger ATR will have a larger assumed stop-loss range.
Conversely, stocks with a smaller ATR will have a smaller stop-loss range.
The 1R decided at the time of purchase is fixed, and the stop-loss range will not be widened just because the ATR has expanded afterward.
Also, ATR and ADR (Average Daily Range) are different indicators.
ATR has a mechanism that considers the price difference from the previous candle’s closing price. This verification uses ATR.
4. Exit conditions are provisional rules
At this point, I am considering the following three as basic exit conditions.
-
Take-profit: Purchase price + 2R
-
Stop-loss: Purchase price – 1R
-
Exit by time: 10 business days have passed since purchase
The purchase date is counted as day 0, and the next business day is counted as day 1.
Saturdays, Sundays, and market holidays are not included.
For example, if you purchase on a Monday, if there are no holidays, the following Monday is 5 business days later, and the Monday after that is 10 business days later.
If the take-profit or stop-loss conditions have not been met, the position will be closed when 10 business days have passed.
However, these are current provisional rules. They may change based on future verification results.
Also, past backtests include exits due to changes in the direction of the daily chart and settlements at the end of the verification period.
Therefore, the verification results described later cannot be reproduced solely by the three conditions of 2R take-profit, 1R stop-loss, and 10-business-day exit.
If the stock price changes suddenly
Even if the take-profit or stop-loss price is reached, there is no guarantee that the order can be executed at that exact price.
Especially if the stock price changes significantly due to a gap, the loss may exceed the planned 1R.
In this backtest, if the price gaps, the first observable price is used as the reference.
Additionally, if both the take-profit and stop-loss prices are reached within the same 1-minute candle, the stop-loss is prioritized conservatively.
5. Backtest Results
The backtest results for the swing strategy introduced here are as follows.
Item Verification Results Verification Period 2026/2/2 – 10/15 Initial Capital 1,000,000 JPY Number of Trades 64 Winning Trades 31 Losing Trades 33 Win Rate 48.44% Net Profit +165,730 JPY PF 1.71 Maximum Drawdown 83,081 JPY
※This is a backtest with 1x margin. It assumes a 2.8% annual interest rate, reflects a disadvantageous 1-tick spread at the time of trading, and assumes 0 JPY in commissions. Taxes and dividends are not included.
Over 64 trades, there was a profit of approximately 166,000 JPY.
The PF is 1.71, meaning the profit amount exceeds the loss amount.
On the other hand, the win rate is 48.44%, meaning more than half of the trades resulted in a loss.
Although a profit was made, I wondered if there might be room for improvement by analyzing the characteristics of the losing trades.
That is what I thought.
Note that the entry conditions for public use explained here and all the conditions used for this 64-trade backtest are not identical.
The PF of 1.71 is a past backtest result and is not a performance achieved solely by the entry conditions introduced this time.
Breakdown of Reasons for Sale
Reason for Sale Count 1R Stop-Loss 26 2R Take-Profit 21 10 Business Days Elapsed 4 Daily Chart Direction Change 12 Settlement at End of Verification Period 1 Total 64
Looking at these results, ending with a stop-loss is the most frequent outcome.
However, simply reducing the number of stop-losses does not necessarily improve performance.
This is because delaying the stop-loss could potentially increase the loss per trade.
Therefore, I focused on the price movement after purchase.
6. Cluster analysis of price movement after purchase
Usually, in backtesting, one checks the win rate, profit/loss, and PF.
However, that alone does not reveal what kind of price movement occurred after purchase.
For example, even for trades that ended in the same loss, there are differences such as the following:
-
Dropped immediately after purchase
-
Rose once, but then dropped
-
Hit a stop-loss after repeated rises and falls
Therefore, for the 64 trades this time, I classified the price movements from purchase to settlement using cluster analysis.
Cluster analysis is a method of grouping data with similar characteristics together.
This time, I used a method called K-means to divide the trades with similar post-purchase price movements into three groups.
Classification Results
Classification Count Win/Loss A: Upward Trend 32 trades 27 wins/5 losses B: Stalled after rise 12 trades 2 wins/10 losses C: Downward Trend 20 trades 2 wins/18 losses
A: Upward Trend
Out of 32 trades, 27 were winning trades.
Overall, there was a tendency for prices to rise after purchase.
However, it also includes some interim drops and losing trades.
B: Stalled after rise
Out of 12 trades, 10 were losing trades.
After purchase, although it rose once, there was a tendency to lose profits afterward.
Personally, I am particularly interested in this group.
Was there no way to secure profits on trades that once rose?
I believe that improving the exit conditions could potentially change the results.
C: Downtrend
18 out of 20 cases were losing trades.
A tendency to decline after purchase was observed.
For this group, there may be room for improvement in the decision-making process before purchase.
Note: It was not possible to classify them before purchase.
This is important.
In this cluster analysis, we used price movements from purchase to settlement for classification.
In other words, it was not known at the time of purchase which group, A, B, or C, it would fall into.
We cannot conclude that selecting only A in advance will result in a high win rate. I would like to be able to select them, though.
Moving forward, I would like to verify whether these differences in price movement can be predicted from information available at the time of purchase.
Also, this classification is based on a limited dataset of 64 trades.
The results might change if the number of classifications or the analysis method is altered.
7. Future improvements
Through this analysis, I was able to confirm that there are different patterns of price movement in losing trades.
However, cluster analysis alone did not reveal an effective improvement method.
Going forward, I would like to verify the following three points.
1. Can we identify stocks that are prone to decline before purchase?
For Group C, which declined after purchase, I will check for common characteristics in the pre-purchase data.
(2) Can trades that stall after rising be improved?
For Group B, I will verify whether results can be improved by changing profit-taking conditions or exit timing.
(3) Can metrics other than win rate also be improved?
Increasing only the win rate is meaningless if it results in making profits too small or incurring large losses.
I will also check the Profit Factor (PF), profit/loss per trade, and maximum drawdown.
Adjusting conditions repeatedly using the same data may lead to a strategy that only fits past data.
I believe it is necessary to verify improved conditions using unused periods or newly accumulated data.
8. How would you improve this?
I would especially like advice on the following three points:
(1) How would you improve trades that stall after an initial rise?
I would appreciate any insights on profit-taking methods, trailing stops, or other relevant concepts.
(2) Is there a way to identify stocks that will decline after purchase before buying them?
I am also interested in how to use daily and 4-hour charts, as well as indicators that work well together.
(3) How can exit rules using ATR be improved?
Currently, I am considering using ATR 14 x 1.5 as 1R, with a 2R profit target and 1R stop loss.
I would like to hear your experiences and thoughts regarding the ATR period, multiplier, and the ratio of profit-taking to stop-loss.
I welcome opinions not only from those with investment experience but also from the perspective of data analysis and system development.
I would also appreciate any feedback such as ‘There is a problem with this analysis method’ or ‘Why don’t you try this verification?’
9. Future of Kabu-Ken
Moving forward, I plan to publish swing investment watchlists extracted using daily and 4-hour chart data on X and note.
When publishing candidates, I will record the stock name, judgment date and time, and reference stock price.
For the reference stock price, I will use the closing price of the business day prior to the judgment date.
After that, I will disclose the trading profit or loss for stocks actually purchased, and I will also review the results of stocks I passed on as necessary.
Please note that publishing a stock as a candidate does not constitute a recommendation to purchase.
I will treat actual trading profits and losses separately from the price movements of stocks that were not purchased.
I will also ensure that past backtest results are not confused with actual operational results.
10. Regarding Version Control of the Methodology
I will refer to the approach introduced here as “Kabu-Ken Swing Research Methodology Ver. 1.0.”
In the future, I may change the entry or exit conditions based on actual verification and comments received.
If changes are made, I will record the version number, the details of the changes, and the effective start date.
I plan to keep this fourth article as the basic explanation of the methodology and accumulate change logs and verification results.
Conclusion
When I first started day trading, I only thought about how to make a profit.
Through two months of losses and backtesting, I feel it is necessary to first objectively confirm whether my judgment has an edge.
In this analysis, I found that there are different trends in price movements after purchase.
However, it is not yet clear whether this can be predicted before purchase.
From now on, forming hypotheses, verifying them, and making improvements is a cycle I would like to repeat.
If you have any questions or concerns about this methodology or analysis, please let me know in the comments.
I would like to make improvements little by little while also referring to everyone’s opinions.
This was Kabu-Ken!
Update History
Version Date Content Ver.1.0 November 2, 2026 First edition. Entry conditions based on daily and 4-hour charts, provisional exit conditions using ATR, and backtesting results released.
*The settings for 1R using ATR14x1.5, 2R profit-taking, 1R stop-loss, and the 10-business-day expiration are subject to change in future testing.
*The public entry conditions introduced in this article are not identical to all conditions used in the 64-trade backtest.
*This article introduces the research process of an investment method and does not recommend the buying or selling of any specific stocks.