VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Using AlphaPrime

How to export an AlphaPrime strategy to MultiCharts, step by step

Open the strategy's source code in the Performance report, export it for MultiCharts, import it, set the items the code's header lists, then compare trade lists on the same data before going live.

By · Published · updated · Editorial policy

Contents
  1. What do you need before you start?
  2. How do you export the strategy from AlphaPrime?
  3. How do you import it into MultiCharts?
  4. Which settings must match the backtest?
  5. How do you check MultiCharts against AlphaPrime before going live?
  6. Frequently asked questions

To run a strategy from AlphaPrime (Valynox) in MultiCharts, export its PowerLanguage source code from the Performance report, import it into MultiCharts, set the chart and strategy the way the code's header describes, and compare both trade lists on the same data before you trade it live.

What do you need before you start?

You need a strategy in the AlphaPrime strategy databank, MultiCharts installed, and the same market and history you tested on. The trial version can also view and export source code, so you can follow every step before buying.

How do you export the strategy from AlphaPrime?

Export happens in the Performance report, on the strategy's source code tab. The file is saved as powerlanguage.txt by default; you can save it as a .pla file instead, which holds the signal together with the functions and indicators it uses.

  1. In the strategy databank, double-click the strategy to open it in the Performance report.
  2. Open the Strategy source code tab. The left column lists the conditions and parameters; the right column shows the source code.
  3. Choose MultiCharts, then click Export file to save it, or Copy code.
  4. The first time only, press Export library and import the AlphaPrime library once. The library file is AlphaPrime_Functions.pla, which holds all the functions. Import it in the PowerLanguage Editor with File → Import; if asked whether to overwrite functions with the same name, answer yes. Signals compile only after this.

How do you import it into MultiCharts?

Import the strategy, make sure it compiles, then add it to a chart.

  1. Save the strategy as a .pla file.
  2. In the PowerLanguage Editor, use File → Import to import it.
  3. Compile the signal, then add it to a chart.

Which settings must match the backtest?

The header of the exported code lists what the backtest used. Set the same in MultiCharts:

  • Instrument, bar period and date range
  • Initial capital and number of contracts
  • Commission per contract per side, and slippage in ticks per side
  • Big point value, tick size and MaxBarsBack
  • Chart time zone (the exchange time zone) and trading session
  • Any additional data series
  • Bar Magnifier: keep it off

A different time zone or session moves every bar, and missing costs make the platform's results look better than the backtest. The header ends with the backtest results to compare against.

How do you check MultiCharts against AlphaPrime before going live?

Run the strategy in MultiCharts on the same data and period, then compare its trade list with AlphaPrime's trade list, trade by trade.

  1. Use the same instrument, bar size and date range as the backtest.
  2. Compare entry and exit times first: a shift of one bar usually means a time zone or session difference.
  3. Then compare prices and costs: different fills or missing commission show up here.
  4. Where they differ, check the data source next: two data feeds can build slightly different bars.

The checklist From generated strategy to MultiCharts: a PowerLanguage comparison checklist lists each item to compare.

The guide to trading costs in backtests: commission, slippage and the average trade explains why costs matter, and walk-forward analysis covers how a strategy is checked on data it didn't see.

What this means if you use AlphaPrime (Valynox): the exported code is plain text you can read and edit, and the platform export page lists every supported platform.

Frequently asked questions

Do I need to export the library every time?

No. For MultiCharts, export and import the AlphaPrime library once; strategies exported afterwards use it.

Can I edit the exported code?

Yes. It is plain-text PowerLanguage you can read and change. After an edit, compare the trade list again, because the strategy is no longer the one AlphaPrime tested.

Can the trial version export strategies?

Yes. The trial can view and export source code, so you can try the whole process before buying.

What AlphaPrime does here

AlphaPrime exports strategy source code to MultiCharts, TradingView, TradeStation and NinjaTrader; the platform export page has the list. MultiCharts: https://www.multicharts.com/

See plans and pricing