VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Platforms and export

How to Develop a MultiCharts Strategy in Six Steps

A reliable MultiCharts strategy process has six steps: find an idea, write it in PowerLanguage, backtest with costs, validate out-of-sample, automate orders in a paper account, and go live with a small position. Each step eliminates candidate strategies, and the order cannot be reversed. The best-looking curve on a backtest report is often just the one you tested the most.

By · Published · updated · Editorial policy

Contents
  1. What is the full process for developing a MultiCharts strategy?
  2. Where do you find MultiCharts strategy examples?
  3. How do you write a MultiCharts strategy? The four parts of PowerLanguage
  4. How do you read MultiCharts backtest results?
  5. How do you validate a MultiCharts strategy and avoid overfitting?
  6. How do you automate orders in MultiCharts, and what should you check before going live?
  7. Frequently asked questions
  8. References

What is the full process for developing a MultiCharts strategy?

A reliable MultiCharts strategy process has six steps in a fixed order: find an idea, write it as PowerLanguage rules, backtest with costs, validate out-of-sample (OOS), run orders automatically in a paper account, and go live with a small position. Each step eliminates some candidate strategies. Reverse the order and an overfit strategy goes straight into a live account.

Overfitting means adjusting a strategy until it fits one stretch of historical prices exactly. What it then describes is the noise in that stretch, not a pattern that repeats. Think of the process as hiring: six interview rounds, each cutting some candidates, and only the last ones standing get a contract. If you sign someone full-time before interviewing, the interview is a formality. Strategy development works the same way. If you trade real money first and validate afterward, the validation is a formality.

  1. Find an idea. Start from a built-in signal, a public rule or your own intraday observation, and write down the entry and exit reason in one sentence. An idea you cannot explain is eliminated at this step.
  2. Write PowerLanguage rules. Turn the idea into conditions and order commands that MultiCharts can execute. The signal is calculated at the bar close and filled on the next bar. Code that fills at the close of the same bar is eliminated at this step.
  3. Backtest with costs. Add commission and slippage from the very first backtest. A strategy whose average trade is below the round-trip cost is eliminated at this step.
  4. Validate out-of-sample. Run once on the data that took no part in adjusting the parameters. A strategy whose OOS result turns negative, or that is propped up by one or two big trades, is eliminated at this step.
  5. Automate orders in a paper account. Have MultiCharts actually send orders to a paper account and compare the fill prices trade by trade. A strategy whose fills keep drifting from the backtest assumptions is eliminated at this step.
  6. Go live with a small position. Trade the smallest contract count in a live account and keep records. A strategy whose actual results fall outside the backtest range is paused at this step.
Six steps in a fixed order: idea, code, costs, out-of-sample test, paper orders and a small live position. Each gate eliminates some candidate strategies, and only the survivors reach real money Six gates, in a fixed order Candidates remaining (illustrative) 1 Idea 2 Code 3 Costs 4 OOS 5 Paper 6 Tiny live Only survivors get real capital. So: never reorder the steps.
Six steps in a fixed order, each screening out a different problem. The strategy that reaches a live account is the one that none of the six steps removed.

Where do you find MultiCharts strategy examples?

Examples come from three sources: signals built into MultiCharts, classic books and public rules, and your own intraday observations. All three are only templates. Parameter ranges, stop loss and session must be re-tested, not copied.

MultiCharts ships with a set of ready-made signals, such as moving average crossovers and channel breakouts, and you can open their source code directly in the PowerLanguage Editor. The code already runs. The default parameters are sample values, not values tested for your instrument and session, so re-test them on your own instrument and session.

Public rules are the second source. Channel breakouts, ATR stops and opening range breakouts are described in full in books and forums, but most come without parameter ranges for TAIEX futures or NQ, and few say anything about costs. Turning a written rule into code is itself a chance to rethink it: which bar counts as the breakout, where the stop goes, and whether to flatten before the close.

The third source is your own intraday observation, for example "after the first fifteen minutes of the TAIEX futures day session, a break of that range often continues." Ideas like this sit closest to the instrument you actually watch, but you tend to remember only the days it worked. Write it as an explicit rule and run it over ten years of data to find out whether your memory holds up.

ComparisonBuilt-in signalsClassic public rulesYour own intraday observations
Difficulty to obtainLow; already in the softwareLow to medium; you must read the written rulesHigh; you must first turn an impression into rules
Code already written?YesUsually no; you write it yourselfNo
What you still have to addParameter ranges, stop loss, sessionParameter ranges, stop loss, session, costsEverything, including a precise definition of the rule itself
Common pitfallUsing the default parameters as they areNo costs; works only in the author's marketLooking at one stretch of market; remembering only the winning days
Ready-made code has not been tested: in a hypothetical example, a built-in signal earns $60 per trade with default parameters and no costs, but loses $8 per trade after the parameters are re-tested and costs are included Ready-made code is untested Built-in signal, hypothetical, per trade Original setup No costs Re-tested With costs +$60 −$8 Defaults can hide a losing strategy. So: re-test parameters, add costs.
The three sources sit at different distances from something testable, but none of them lets you skip re-testing parameters and adding costs.

How do you write a MultiCharts strategy? The four parts of PowerLanguage

A PowerLanguage strategy has four parts in order: input parameters, variables, entry and exit conditions, and order commands. Calculating the signal at the bar close and filling on the next bar is a simple pattern, and it is the first defense against peeking at future prices.

Think of a strategy as a recipe. Input parameters are the portions you can adjust, variables are the ingredients already chopped, entry and exit conditions are "when it goes in the pan," and order commands are "which pan, how many servings."

  1. Input parameters. The numbers you will optimize later, such as the lookback, the stop distance in points and the entry session. Every extra input gives the optimizer one more knob to turn, and one more chance to fit noise. Three to five are usually enough.
  2. Variables. Intermediate values recalculated on every bar, such as the channel top, ATR or today's opening range. Keeping them separate makes the conditions easier to read and check.
  3. Entry and exit conditions. When to go long, when to go short and when to exit. Each condition should have a reason you can state in one sentence.
  4. Order commands. Market or stop order, how many contracts, and when to send it. In MultiCharts, order commands apply to the next bar by default, which is what you want here.
A channel breakout rule split into four PowerLanguage parts, top to bottom: the input sets the length to 20, the variable takes the highest high over that length, the condition checks whether the close is above it, and the order buys on the next bar; every line uses a name defined above One rule, four parts One breakout rule, top to bottom 1 Inputs Len = 20 2 Variables Top = highest high in Len 3 Condition Close > Top 4 Order Buy on the next bar Every line uses a name defined above. So: declare first, use later.
The four parts of a PowerLanguage strategy and their fixed order. What is written first can be used later.

The timing of signal calculation and fills is where programs most often go wrong. Peeking at future prices means the strategy uses a price it could not have had at the moment of decision, for example deciding on a bar's close and then filling at that same close. By default, MultiCharts calculates the signal once at the bar close and applies order commands to the next bar. So if you do not change that setting and do not reference values that become known only after the bar closes, most leaks are avoided on their own. Other common leak points and a one-bar self-check are in Look-ahead bias in backtests: common leaks and a one-bar check.

The signal is calculated at the bar close and filled at the next bar's open; the loop arrow pointing to a fill at the same close is crossed out because that price is not known when the decision is made Fill on the next bar Signal at the close (gold dot) Same close Next open Bar N Next bar Filling at the same close peeks ahead. So: keep the default next-bar fill.
Calculate at the close, fill on the next bar. The arrow looping back to a fill at the same close uses a price that did not exist when the decision was made.

If your rules were generated outside MultiCharts, confirm after import that all four parts match, especially the fill timing and contract count of the order commands. The steps are in How to import a strategy into MultiCharts and match the backtest.

How do you read MultiCharts backtest results?

Read four numbers on a backtest report first: net profit relative to maximum drawdown, number of trades, profit factor, and average trade as a multiple of round-trip cost. Together these four say more than annualized return alone.

The example below is an NQ daily backtest run in AlphaPrime (Valynox). First, what it tested: NQ (Nasdaq-100 futures), daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $10 slippage per trade. It tested a substitute rule, not the subject of this article: entries and exits from a linear regression rule only, with no stop loss, no profit target and no filter. The search tried 1,024 variants in total and kept one candidate by return versus drawdown; the numbers in the table are for the one that was kept. Picking the best of over a thousand after the fact always produces numbers that look better than the true ability. These numbers do not mean the linear regression rule earned this money, and they are not a result you should expect.

Source: AlphaPrime product engine (CPU), run 2026-10-31. NQ daily, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $10 slippage per trade.

NumberResult
Net profit (closed trades)$150,865
Max drawdown$111,615
Trades127
Win rate53.54%
Profit factor1.355
Average trade$1,187.91
Time in market86.09%
The summary bar at the top of the report: find net profit and maximum drawdown first, then number of trades and profit factor, and look at win rate last.
The summary bar at the top of the report: find net profit and maximum drawdown first, then number of trades and profit factor, and look at win rate last. NQ · daily · 2019-01-02 to 2025-06-30 · CPU engine backtest

The first number is net profit against maximum drawdown. Maximum drawdown is the largest drop in the equity curve, in dollars, from a high to the lowest point after it, which makes it the most painful paper loss in the period. This backtest shows net profit of $150,865 and maximum drawdown of $111,615. Net profit is only a notch above maximum drawdown, so for a stretch of the six and a half years the account gave back most of what it had earned. Whether a real account could have held through that stretch is a better question than the net profit itself.

The second number is the number of trades. 127 trades over six and a half years works out to one every few weeks on average, a low-frequency strategy. With few trades, the luck in each one weighs more on the total result. Treat it as a clue, not a conclusion, when you use it for statistical judgment.

The third number is profit factor. Profit factor is the total of all winning trades divided by the total of all losing trades; 1.355 means that every 1 lost is matched by 1.355 earned. It is worth discussing only above 1, and the closer it is to 1, the easier it is for a little more cost or slippage to push it below 1.

The fourth number is average trade as a multiple of round-trip cost. The average trade is $1,187.91, against assumed costs of $20 commission and $10 slippage per trade. The multiple is very high, the most reassuring cell in this table. This check shows its problems on high-frequency strategies, which the TAIEX futures example below illustrates.

Hypothetical example

Suppose a Mini-TAIEX (MXF) day-trading strategy earns NT$400,000 over a ten-year backtest across 10,000 trades, an average trade of NT$40. Assume round-trip commission plus tax is NT$100 per trade and slippage is NT$50 per side, so the round-trip cost is NT$200. An average trade of NT$40 is less than half of the cost, so after costs each trade loses NT$160. Without costs this strategy looks far better than the NQ daily example above, but with costs it is eliminated at step 3.

Equity curve with the drawdown below it: look at whether the slope is even, which year has the deepest drawdown, and whether the slope changes once the out-of-sample stretch begins.
Equity curve with the drawdown below it: look at whether the slope is even, which year has the deepest drawdown, and whether the slope changes once the out-of-sample stretch begins. NQ · daily · 2019-01-02 to 2025-06-30 · CPU engine backtest

One more cell is worth a second look: time in market is 86.09%, meaning this rule is in the market most of the time. Over this period the Nasdaq as a whole rose, so for a long/short rule that is almost always in a position, part of the result follows the index's own gain. That is not wrong, but it is a reminder to look at long and short performance separately to see how much the rule itself contributed.

How do you validate a MultiCharts strategy and avoid overfitting?

Validation comes down to four things: split the data into in-sample (IS) and OOS, run walk-forward analysis, check that neighboring parameters perform similarly, and remember how many variants you tested. The more variants you tested, the more likely the best backtest curve is luck.

Out-of-sample data is the stretch the strategy never touched while its parameters were being adjusted, used only to run once and read the result. It is like an exam: in-sample is the lecture notes and out-of-sample is the test paper. A student who saw the paper beforehand and scored high has shown nothing. How to split the data and how many OOS trades you need are covered in In-sample vs out-of-sample: how to split and how much is enough.

Why is testing more so dangerous? Imagine a thousand people each flipping a coin ten times. A few of them will land ten heads in a row, and picking the best one does not mean he can flip coins. Strategy search works the same way. The NQ backtest above kept one of 1,024 variants, and the one kept is part pattern and part luck that happened to line up in this stretch of history. Bailey, Borwein, López de Prado and Zhu (2014) showed that if you try enough variants, you will always find a curve that looks excellent in-sample even when the rule has no predictive power. The same authors went further in 2017, giving a method to calculate the probability that the best one is actually overfit.

Illustration: a single tested variant keeps rising out-of-sample just as it did in-sample, while the best of a thousand variants rises sharply in-sample and flattens out-of-sample The best pick fades out Illustration: compare after the split Single variant Best of many In-sample OOS In-sample OOS The winner owes part of it to luck. So: discount the best of many.
Test one variant and the OOS result roughly continues the in-sample result; pick the best of a thousand and the OOS curve usually flattens clearly. The one that remains is part pattern and part luck.

Walk-forward analysis repeats "optimize in-sample, test only out-of-sample" along the time axis. You select parameters on one window, run the selected parameters on the next segment without adjusting them, roll forward one segment, and repeat until the data runs out. Finally you join each segment's OOS results into one curve. Every trade on this joined curve used parameters that could have been decided at the time, so it is the only result in the whole report that was "really tradable back then." Pardo (2008) wrote this approach up as a complete procedure. The MultiCharts Walk-Forward Optimizer can run it; choosing the window length and the split is covered in Walk-forward analysis: the one backtest number you could have traded.

Walk-forward analysis: each row first optimizes parameters over an in-sample span, then tests once on the immediately following out-of-sample segment, then rolls right by one segment; the OOS segments are joined into a tradable result Roll forward, chain the OOS Each row: optimize, then test once IS OOS IS OOS IS OOS Chained Tradable Only the chained OOS is tradable. So: judge the strategy by that line.
Each row optimizes on the earlier segment, tests only on the later segment, then rolls one segment to the right. The joined OOS curve below is what could actually have been traded at the time.

The third check is neighboring parameters. Run the lookback from 10 to 40 and plot the net profit of each value as a bar chart. A robust rule shows a plateau where adjacent values are all similar, while an overfit rule shows a single isolated tall bar with poor neighbors on both sides. The market does not work only when the lookback equals exactly 23 and stop working at 24; that tall bar is most likely noise.

Illustration of net profit by lookback: on the left, a broad plateau of similar results that can be trusted; on the right, one isolated tall bar whose neighbors all do poorly, most likely just luck Trust the plateau Net profit by lookback, illustration Plateau: credible Spike: luck A lone tall bar is likely noise. So: pick from a broad plateau.
On the left, a plateau: neighboring parameters perform similarly, so you can trust it. On the right, one isolated tall bar with poor neighbors, most likely luck.

The fourth item is bookkeeping: write down how many variants you tested. Manual optimization makes it easy to underestimate this number, because every stop loss you change and every session you switch counts as a variant.

Hypothetical example

Suppose a strategy has three inputs, namely lookback 10 to 40 in steps of 1, which is 31 values; stop loss 20 to 60 points in steps of 5, which is 9 values; and trading session, either day session or electronic (full) session, which is 2 choices. All combinations come to 31 × 9 × 2 = 558 variants. The one at the top after the optimizer sorts is picked from 558, not a result you tested once, so keep that number in mind when you interpret its OOS performance.

Write down the pass thresholds for these four checks before the search starts, rather than deciding after you see the results. AlphaPrime's strategy validation runs checks such as in-sample/out-of-sample and walk-forward in order against thresholds set in advance. A candidate stops at the step where it fails, and no later data is used on it.

How do you automate orders in MultiCharts, and what should you check before going live?

Run automated orders in a paper account for at least several dozen trades, compare each fill with the slippage assumed in the backtest, and confirm that the contract month, session and broker connection settings match. Then go live with the smallest position and keep records.

In MultiCharts, automation means turning on Automate Order Execution on the chart and choosing a broker connection setting. Most futures brokers in Taiwan offer paper accounts, and MultiCharts itself has a Paper Trader that simulates fills when there is no real connection. The value of a paper account is not the profit figure. It is three things a backtest cannot show: whether orders get sent, how far the fill is from the trigger price, and whether the strategy's position state is correct after a disconnect.

  1. Turn on automation in a paper account. Connect to the paper account with exactly the same strategy file and settings as the backtest, and let it run on its own.
  2. Collect several dozen fills. With too few, one or two anomalies skew the judgment. A low-frequency strategy takes patience.
  3. Compare fill prices with the backtest slippage assumption. Subtract the strategy's trigger price from each actual fill price to get the average slippage. If the average slippage is above the backtest setting, go back to the backtest, set slippage to the measured value and re-run it, and see whether the strategy still passes step 3.
  4. Confirm that contract month, session and broker connection settings match. Backtests mostly use a continuous contract, but actual orders go to a specific month, so around a contract month change confirm that the chart instrument and the order instrument are the same one. The session template on the chart must match the exchange's actual session, and the contract count in the broker connection setting must match the backtest. The item-by-item checklist is in From generated strategy to MultiCharts: a PowerLanguage comparison checklist.
  5. Go live with the smallest position and keep records. The first real contract exists only to get real fill data. Record every fill, every disconnect and every manual intervention, and after three months compare them with the backtest's average trade, win rate and maximum drawdown range.
From paper trading, slippage check and settings check to going live with one contract, each check passed moves forward and each check failed goes back to the backtest settings Failed? Back to the backtest Each check: pass moves on, fail goes back Paper Slippage Settings Go live Pass Pass Pass Fail Fail Fail Backtest settings A failed check sends you back to retest. So: re-run with measured slippage.
From passing the backtest to the first real contract, every step has a pass exit and a fail exit. The fail exit always returns to the backtest settings, rather than tweaking parameters and going live directly.

If you are evaluating more than MultiCharts, platforms differ a lot in how far they can automate without writing code. Automate trading without code: how the platforms differ compares them feature by feature. When choosing a platform, whether you can complete the five steps above without skipping any matters more than how good the interface looks.

You can take the next step today: open the performance report of the oldest strategy in your MultiCharts, count the trades, and recall how many times you changed its parameters. Write those two numbers in the first comment line of the strategy file, and every time you look at its backtest curve afterward, read those two numbers before the curve.

Frequently asked questions

How much data should a MultiCharts strategy backtest use?

Decide by number of trades, not years. Out-of-sample you need at least a few dozen closed trades to see whether the average trade holds up, and several hundred or more is more reliable. A low-frequency strategy needs more years of data, or walk-forward analysis to produce more OOS trades from the same history. The data should also cover trending, ranging, sharply volatile and quiet markets, or a strategy may pass only because all the data was a bull market.

After optimizing parameters, how do you confirm it is not overfitting?

Do three things: run once on out-of-sample data not used in the optimization and see whether the average trade is still positive; run the neighboring values of the chosen parameters and see whether performance is similar rather than only one value working; and write down how many combinations the optimization tried in total, because the more combinations, the larger the discount you apply to the best one. Pass all three, then move to the paper account.

How long should MultiCharts automated orders run in a paper account first?

Measured in trades, at least a few dozen fills, not a fixed number of weeks. For each one, subtract the strategy's trigger price from the actual fill price to get the average slippage, then compare it with the slippage set in the backtest. Also confirm that the contract month of the orders, the chart session and the broker connection settings all match the backtest. When average slippage is above the backtest assumption, first go back to the backtest, change slippage to the measured value and re-run it, instead of going live directly.

Can you build MultiCharts strategies without knowing PowerLanguage?

You can start from MultiCharts' built-in signals, which are already written and can be backtested by adjusting only the input parameters. Next, you can learn to read the four parts of a built-in signal (input parameters, variables, entry and exit conditions, order commands) and then modify the conditions. Some tools can also export searched strategies as PowerLanguage and other platform source code. After importing into MultiCharts, you still have to pass the three gates of a backtest with costs, out-of-sample validation and a paper account; you cannot skip them because the code is ready-made.

References

  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2017). The Probability of Backtest Overfitting. Journal of Computational Finance, 20(4), 39–69.
  • Pardo, R. (2008). The Evaluation and Optimization of Trading Strategies (2nd ed.). John Wiley & Sons.