Skip to content
All library documents

Generating Synthetic Candles and Volume with Pseudorandom Methods

Article TradingView scripts

Summary

This indicator generates synthetic candle data for experimentation and strategy research. It offers two pseudorandom methods, a seed for varying the generated series, a price multiplier for scaling it, and an intrabar volatility setting that influences wick size. From random changes it constructs open, high, low, and close values, then derives volume and true range. The outputs can be displayed as candles or enabled separately for volume, change, and true range.

The description presents synthetic data as a way to test or develop scripts, including backtesting on generated series. It also explains that the plotted instance cannot reliably serve as input to another indicator because separate instances may produce different data; matching instances are needed to display price and volume together. The document provides no statistical validation that the generated series resembles real markets or preserves their risks, so results on it should be treated as software or method experiments rather than evidence of live-market performance.

Key ideas

  • The indicator builds synthetic OHLC candles from pseudorandom price changes.
  • Users can choose between two random number generation methods and vary the seed.
  • Intrabar volatility changes the generated wick behavior, while the price multiplier rescales values.
  • The script also derives synthetic volume, candle change, and true range for display or experimentation.
  • Separate instances can differ, limiting the indicator's use as a consistent input to other chart studies.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.