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.
Every firm writes its own rules and changes them; take the numbers from your plan's current page.
| RULE | WHAT IT LIMITS | IN PINE SCRIPT |
|---|---|---|
| Account size | The balance the challenge starts from | initial_capital in strategy() |
| Contracts | How many you may hold, often by account size | default_qty_type = strategy.fixed and default_qty_value |
| Daily loss limit | The most the account may lose in one day | strategy.risk.max_intraday_loss |
| Maximum drawdown | How far equity may fall, fixed or trailing | strategy.risk.max_drawdown, or tracked in the script |
| Trading hours | When positions must be closed | strategy.close_all() at the plan's cut-off |
| Profit target and consistency | The gain to reach, and how much of it one day may make | Read from the trade list after the run |
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 belowPine'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.
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.
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.
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.
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.
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.
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.
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.