OPEN-SOURCE SCRIPT
Random Candles

**What if the patterns you see in the market aren't as meaningful as you think?**
This indicator generates a completely random price series, tick by tick, and displays it as candles.
There is no market data being used to determine the direction of the next tick. There is no trend-following logic, no support/resistance calculation, no order flow, no indicators, and no hidden trading strategy deciding where price should go.
**The price is random.**
And yet, look at the chart.
You will often see things that look surprisingly familiar:
* Trends
* Support and resistance
* Breakouts
* Pullbacks
* Consolidation
* Higher highs and higher lows
* Lower highs and lower lows
* Reversals
* Channels
* Double tops and bottoms
* Candle patterns
* "Strong" moves followed by retracements
You can even draw trendlines and horizontal levels on a completely random chart and find that price appears to respect them.
That is the point of this experiment.
---
## Why does this matter?
As traders, we are extremely good at finding patterns in noisy data.
Give us a chart and our brains will naturally try to explain what happened:
*"Price rejected resistance."*
*"The trend is clearly bullish."*
*"This was a liquidity sweep."*
*"The breakout failed."*
*"The market is accumulating."*
*"The reversal was confirmed by the structure."*
But if a visually convincing version of these events can emerge from a process that contains **no market information whatsoever**, we should at least question how much information our eyes are actually extracting from a chart.
This doesn't prove that markets are completely random.
It does, however, demonstrate something important:
> **A pattern looking meaningful does not necessarily mean that the pattern contains predictive information.**
---
## Try it yourself
Instead of taking my word for it, put the indicator on a chart and watch it.
Change the **Resolution** input to increase the number of simulated ticks.
Then start looking for setups.
Draw your support and resistance levels.
Find your favorite candlestick patterns.
Look for trends.
Pretend you don't know that the candles are random.
You may find yourself doing exactly what you normally do on a real market.
That's the experiment.
---
## What this indicator is — and isn't
This is **not** a realistic market simulator.
It does not attempt to reproduce volatility distributions, correlations, order-book dynamics, news reactions, market microstructure, or other properties of real financial markets.
It is intentionally much simpler:
**Start from the previous close → randomly move up or down by one tick → repeat.**
The purpose is not to recreate the market.
The purpose is to create a visually convincing random price path and see how much structure our brains can find inside it.
---
## The uncomfortable question
If a completely random process can produce charts that look remarkably similar to real markets, how much of what we call a "setup" is actually predictive information...
...and how much is simply our brain finding structure in noise?
Maybe your strategy works.
Maybe there is a genuine edge.
Or maybe you have discovered a beautiful explanation for something that was going to happen anyway.
**Don't take this indicator as proof that trading strategies are useless.**
Use it as a reason to demand stronger evidence.
Backtest.
Out-of-sample test.
Forward test.
Test across different markets and regimes.
And most importantly, ask yourself:
**Does my strategy actually predict the future, or does it simply explain the past?**
---
*This indicator is an experiment in randomness, pattern recognition, and the limits of visual interpretation. If it makes you question your own chart analysis, then it has done its job.*
This indicator generates a completely random price series, tick by tick, and displays it as candles.
There is no market data being used to determine the direction of the next tick. There is no trend-following logic, no support/resistance calculation, no order flow, no indicators, and no hidden trading strategy deciding where price should go.
**The price is random.**
And yet, look at the chart.
You will often see things that look surprisingly familiar:
* Trends
* Support and resistance
* Breakouts
* Pullbacks
* Consolidation
* Higher highs and higher lows
* Lower highs and lower lows
* Reversals
* Channels
* Double tops and bottoms
* Candle patterns
* "Strong" moves followed by retracements
You can even draw trendlines and horizontal levels on a completely random chart and find that price appears to respect them.
That is the point of this experiment.
---
## Why does this matter?
As traders, we are extremely good at finding patterns in noisy data.
Give us a chart and our brains will naturally try to explain what happened:
*"Price rejected resistance."*
*"The trend is clearly bullish."*
*"This was a liquidity sweep."*
*"The breakout failed."*
*"The market is accumulating."*
*"The reversal was confirmed by the structure."*
But if a visually convincing version of these events can emerge from a process that contains **no market information whatsoever**, we should at least question how much information our eyes are actually extracting from a chart.
This doesn't prove that markets are completely random.
It does, however, demonstrate something important:
> **A pattern looking meaningful does not necessarily mean that the pattern contains predictive information.**
---
## Try it yourself
Instead of taking my word for it, put the indicator on a chart and watch it.
Change the **Resolution** input to increase the number of simulated ticks.
Then start looking for setups.
Draw your support and resistance levels.
Find your favorite candlestick patterns.
Look for trends.
Pretend you don't know that the candles are random.
You may find yourself doing exactly what you normally do on a real market.
That's the experiment.
---
## What this indicator is — and isn't
This is **not** a realistic market simulator.
It does not attempt to reproduce volatility distributions, correlations, order-book dynamics, news reactions, market microstructure, or other properties of real financial markets.
It is intentionally much simpler:
**Start from the previous close → randomly move up or down by one tick → repeat.**
The purpose is not to recreate the market.
The purpose is to create a visually convincing random price path and see how much structure our brains can find inside it.
---
## The uncomfortable question
If a completely random process can produce charts that look remarkably similar to real markets, how much of what we call a "setup" is actually predictive information...
...and how much is simply our brain finding structure in noise?
Maybe your strategy works.
Maybe there is a genuine edge.
Or maybe you have discovered a beautiful explanation for something that was going to happen anyway.
**Don't take this indicator as proof that trading strategies are useless.**
Use it as a reason to demand stronger evidence.
Backtest.
Out-of-sample test.
Forward test.
Test across different markets and regimes.
And most importantly, ask yourself:
**Does my strategy actually predict the future, or does it simply explain the past?**
---
*This indicator is an experiment in randomness, pattern recognition, and the limits of visual interpretation. If it makes you question your own chart analysis, then it has done its job.*
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。