Loading…

Monte Carlo Price Cone

A price target set from a fixed number of pips is really a guess about how far price is likely to travel. This indicator answers that question empirically instead: it collects the trailing InpLookbackBars bar-to-bar returns, then runs InpSimulations random walks forward for InpHorizonBars steps, at every step drawing a new return from the pool with replacement (the bootstrap step) and compounding it onto that path's running price. At each forward step, the InpLowerPercentile, 50th and InpUpperPercentile percentiles across every simulated path become the lower, median and upper cone lines. The naive version of this indicator draws a cone from a Normal distribution fitted to the mean and standard deviation of returns. Real markets do not move like that - actual return distributions have fatter tails than a Normal curve predicts, so a Gaussian cone quietly understates how wide the genuinely plausible range gets. Bootstrapping from the market's own observed returns carries whatever fat-tail behaviour was actually present in the lookback window into the cone, without needing to name or fit a specific distribution shape. The cone is rebuilt once per new closed bar, not every tick, since the underlying return pool only changes when a new bar closes. Notes and limitations - This is a resampling of past behaviour, not a prediction - it assumes the return pool measured over InpLookbackBars is a reasonable stand-in for what could happen next, which breaks down around genuine regime changes (news events, session opens the lookback window did not capture). - The bootstrap draws are independent between steps, so the simulated paths do not carry any autocorrelation or momentum that may exist in the real return series. - Rebuilding happens once per new closed bar; mid-bar price movement does not reshape the cone until the bar closes. - The cone is a probability context tool, not a trading signal - it draws no arrows and fires no alerts.

Indicator · MT4 · v1.0 · Free

About Monte Carlo Price Cone

Monte Carlo Price Cone is an indicator for MetaTrader 4. It has 7 settings, such as Lookback bars, Horizon bars and Simulations. MQL source code included.

Files in the download: MonteCarloPriceCone.ex4, MonteCarloPriceCone.mq4, MonteCarloPriceCone.txt.

Settings

SettingDefaultWhat it does
Lookback bars200Bars of history the return pool is bootstrapped from
Horizon bars24Bars projected forward for the cone
Simulations500Bootstrap paths simulated per rebuild
Lower percentile10Lower cone percentile (e.g. 10 = 10th percentile)
Upper percentile90Upper cone percentile (e.g. 90 = 90th percentile)
Median colorclrYellowColour on the chart
Band colorclrDodgerBlueColour on the chart

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Trading Sessions · Trailing Stop & Break-even · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria