Predicting the next candlestick direction

For those of you who have not seen some of my other posts I am a computer programmer that has access to a Forex API which means I have a lot of data at my fingertips and the ability to analyse it easily. I have been doing a bit more statistical analysis and I may have come up with something useful. I was looking at the ability to predict the direction of the next candlestick, not magnitude, just direction.

Experiment 1
I just counted the number of up vs down candlesticks over the maximum number of days that the OANDA API lets me go back (5000). The result is pretty much a 50/50 split between up and down.

Experiment 2
Using a moving average I counted the number of times the candlesticks matched the price being above or below the moving average. I went from 2 to 50 days for the moving average, sma and ema and I found that the split was 50/50. In other words, being above or below the moving average had no effect on the direction of the candlestick.

Experiment 3
Using various candlestick patterns I found that after various patterns the next candlestick has a 50/50 chance of being up or down.

Experiment 4 - The interesting one.
Using RSI I found that if the RSI (periods 5) is below 50 then the up/down split for the next candle is about 60/40. Yes that is right, 60% of the time over the last 5000 daily candles the RSI has predicted the direction of the next candle. I checked and double checked the calculations and everything seems to be right.

I am going to be testing this RSI signal on a demo account to see if it works in real life.


i’ve seen (and enjoyed, and appreciated, and duly “liked”) at least some of them, and had been kind of wondering “who you are”, so i’m pleased to hear that :sunglasses:

your first 3 experiments mentioned above don’t surprise me at all - but the 4th does

i just want to check that i didn’t misunderstand (which sometimes happens!): you’re saying that when the RSI-5 is below 50, the up/down split is 60/40, in other words 60% of the time the direction of the next candle is up?

1 Like

What I meant to say was…
When the RSI(5) is below 50 then down=60% and up=40%.
When the RSI(5) is above 50 then up=60% and down=40%.
Bear in mind that this only affects the next candlestick.

The 4th experiment was very surprising and I had to step through the code to make sure that it was working properly. From everything I can see it is working just fine. I ran through 70 pairs and the 60/40 split seems to be true no matter what pair you use.
I am going to try the following, it is a slight modification of what I am already trying out.
Using AUD/NZD, CAD/CHF, EUR/USD, GBP/JPY I am waiting until an hour or so after the day starts (5pm Eastern) then I am looking at the charts. For each of the pairs…

  1. Look at RSI(5) to decide if I want to buy (RSI>50) or sell (RSI<50).
  2. Look at the ATR(5) and using that for the take profit pips.
  3. Use the ATR(5) divided by 2 for the stop loss pips.
  4. Calculating the risk at 1% for the position size.
  5. Opening the position.
  6. Letting the positions close out when they hit either the SL or TP point even if it takes more than one day.

Very interesting. I enjoy these types of stats.

One simple but often overlooked fact about the above stat is that although this is an average, there are more up bars in an uptrend and more down bars in a downtrend.

Knowing and paying attention to little things like this can help give you an edge.


You would think that there would be more up bars in an uptrend etc… but I do not notice that in my data. I have a +/- 2% “noise factor” which might be filtering that out. It also might be that using the above or below a moving average is not a good way to determine a trend (Experiment 2). This also does not take into account the magnitude of the candlesticks so it could also be that the candlesticks go up further than they go down to make an uptrend.

This is why RSI is the most useful. It also probably works with (10) as well. Add MACD 3-10-16 and use the histogram bar movements as a confirmation move, and maybe use both for scalping 1-5 m charts.

Disclaimer: I use the above on Daily (trend), 4hr (trend entry) 1hr (trend continuation) charts. All like 3 ducks in a row. My 2023 win rate is 55%.

1 Like

This is much more gambling than trading.

The majority is pretty slim whenever I have looked at trends. In a typical uptrend perhaps only 55% of days have higher closes than the day before: the longer the time duration, the more likely the result is 55:45.

Of course the 55% days with higher closes mostly have greater daily rises than the 45% with lower have falls, so the positive outcome is reinforced.

But for me, holding for one bar in a trend is something I’ve never been able to prove sustainable.

1 Like