PROP FIRM CHALLENGES

Backtest your prop firm challenge strategy

Write your challenge's rules into the script, run it on CME's 1-minute NQ, MNQ, ES and MES bars with per-contract costs, and see every trade and the worst drawdown against your limits. Free and unlimited with an account, no card.

What a challenge measures, and where it goes in the script

Every firm writes its own rules and changes them; take the numbers from your plan's current page.

RULEWHAT IT LIMITSIN PINE SCRIPT
Account sizeThe balance the challenge starts frominitial_capital in strategy()
ContractsHow many you may hold, often by account sizedefault_qty_type = strategy.fixed and default_qty_value
Daily loss limitThe most the account may lose in one daystrategy.risk.max_intraday_loss
Maximum drawdownHow far equity may fall, fixed or trailingstrategy.risk.max_drawdown, or tracked in the script
Trading hoursWhen positions must be closedstrategy.close_all() at the plan's cut-off
Profit target and consistencyThe gain to reach, and how much of it one day may makeRead from the trade list after the run

The rules, written in

A Pine v6 header with the challenge's limits; the numbers are examples, not any firm's.

//@version=6
strategy("Challenge rules", overlay = true, initial_capital = 50000,
     default_qty_type = strategy.fixed, default_qty_value = 2,
     commission_type = strategy.commission.cash_per_contract, commission_value = 2.5)

// the plan's numbers, from its own page
dailyLossLimit = input.float(1000, "Daily loss limit ($)")
maxDrawdown    = input.float(2000, "Maximum drawdown ($)")

// no new trades that day after the daily loss; none after the drawdown
strategy.risk.max_intraday_loss(dailyLossLimit, strategy.cash)
strategy.risk.max_drawdown(maxDrawdown, strategy.cash)

// flat before the plan's cut-off, New York time
nyHour   = hour(time, "America/New_York")
nyMinute = minute(time, "America/New_York")
if nyHour == 15 and nyMinute >= 55
    strategy.close_all(comment = "cut-off")

// your entries and exits below

Pine's risk rules run in this tester: after the daily loss the script takes no new trade that day, and after the drawdown it stops. A drawdown that trails only at each day's close needs a few lines of its own, from the equity at the session's end.

What you see after a run

Every trade on the chart and in a list, with its entry, exit and result after costs; the net result, the worst drawdown in dollars and percent, win rate and profit factor; and the last third of the bars judged on its own, so a strategy tuned on the first part is tested on days it never saw.

The bars are CME's own 1-minute NQ and ES, two years deep, with MNQ and MES running on the same prices at their own dollars a point. Commission is $2.50 a contract each side unless the script declares its own, and market and stop orders pay a tick of slippage. The full method is in Data and methodology.

What a backtest cannot tell you

  • Whether the challenge will pass: it is judged on days that have not happened yet.
  • How your own orders will fill on a fast open or a news release.
  • Anything live: the data is eight hours behind, for testing, not trading.

Questions

Can I backtest my Topstep, Apex, MyFundedFutures or Lucid challenge strategy?

Yes, when the rules are in the script: the account size, the contracts, the daily loss limit and the drawdown. The tester runs your script as written on NQ, MNQ, ES or MES data. It does not know or store any firm's rules, and firms change them, so take the numbers from your plan's own page.

Does it model a trailing drawdown?

As your script does. Pine's strategy.risk.max_drawdown stops the strategy once equity falls a set amount below its highest point, which is how an intraday trailing drawdown works. A drawdown that trails only at the end of each day has to be tracked in the script, from the equity at each session's close.

Which contract should I test, NQ or MNQ?

The one you will trade, at the size you will trade it. Costs are per contract and the loss limits are in dollars, so one MNQ contract does not show how two NQ contracts behave against the same limit.

What costs should I put in?

Your platform's commission per contract on each side, as commission_type = strategy.commission.cash_per_contract. Without it the tester charges $2.50 a contract each side, and market and stop orders pay one tick of slippage unless the script sets its own.

If the backtest stays inside the rules, will the challenge pass?

No one can say that. A backtest shows how the rules would have played on past data with these costs. Live fills, news days and your own execution differ, and a challenge is judged on days that have not happened yet.

Is Alpha Charts a prop firm?

No. It is software for writing and testing trading scripts. It does not sell challenges, evaluations or funded accounts, does not trade for you and is not connected with any prop firm.

Alpha Charts is software for writing and testing trading scripts. It is not a prop firm: it does not sell challenges, evaluations or funded accounts, does not trade for you, holds no money and gives no investment advice. Backtests are past results with costs charged and do not predict passing a challenge or making money. Topstep, Apex, MyFundedFutures and Lucid belong to their owners; Alpha Charts is not affiliated with any of them. NQ, MNQ, ES and MES are CME Group contracts.