Skip to content
All library documents

Randomized Entries and Exits as a Trading Benchmark

Article TradingView scripts

Summary

This strategy uses a seeded pseudorandom-number routine to trigger entries and exits when generated values fall below fixed probability thresholds. Users can enable long or short trading; the script sets position size as a percentage of equity, disables pyramiding, and includes a commission assumption. Its description frames the approach as a way to investigate whether random trade timing can have positive expectancy, especially when long positions align with a broad market uptrend.

The document reports that 100 daily S&P 500 generations using seeds from 1 to 101 had positive mathematical expectations, and says similar results appeared for higher-timeframe assets in global uptrends. It also reports negative results for higher-timeframe random shorts and possible positive expectancy for short trades on very short intervals. These are claims in the source description, not independently documented test results: no sample dates, return distribution, benchmark comparison, or detailed cost analysis is provided. The script's deterministic seeded sequence is not a fresh independent random draw on every bar, so its mechanics and statistical interpretation deserve scrutiny before treating the reported outcomes as evidence.

Key ideas

  • The script uses a seeded pseudorandom sequence and thresholds to generate entry and exit events.
  • Long and short directions can be toggled, and the strategy sizes trades as a percentage of equity.
  • The accompanying description reports positive expectancy in its tested long-only upward-market cases and weaker results for higher-timeframe shorts.
  • The stated results lack enough test detail in the document for independent assessment.
  • A deterministic seeded sequence should not be assumed to produce independent random trades.

Tags

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