ModScript Language

An embeddable scripting language that lets your users write trading strategies, custom indicators, alerts, and scans in plain, readable syntax, and lets your developers run them at native speed.
ModScript is the preferred programming language for traders: flexible, powerful, and easy to learn. It gives end users a concise way to express trading logic without touching your application's internals, while giving your developers a fully embeddable engine to drop into any product.
Modulus is a modern fintech company building on more than 30 years and millions of lines of proven code, accelerated by AI.
Easy for traders, powerful for developers
ModScript was designed so a trader can describe an idea the way they think about it: cross a moving average, break a high, fire an alert. The syntax is similar to Ruby, one of the easiest languages to read and learn, so traders can express their ideas in clean, intuitive code without a steep learning curve. And because Ruby has one of the largest collections of tutorials, courses, and community resources of any programming language, users already have a wealth of learning material at their fingertips.
Under that approachable surface is a real expression engine. Developers embed ModScript into their applications, expose the symbols and functions they choose, and let users build on top safely. You decide what data and capabilities the language can reach, and ModScript handles parsing, evaluation, and execution.

One language for everything
The same scripting language powers several jobs across a trading product. Define a complete entry-and-exit strategy for backtesting and automation, compute a custom indicator from price and volume, raise a real-time alert when a condition is met, or run a scan across thousands of instruments to surface the ones that match.
- Trading strategy definition for backtesting and automation
- Custom indicators built from price, volume, and other series
- Real-time alerts on user-defined conditions
- Market scans across large symbol universes
- Reusable expressions shared between scripts
- Clear, readable syntax that is simple to maintain
Built to integrate with the Modulus stack

ModScript is part of a complete developer toolchain. It pairs naturally with our StockChartX charting library and TA-SDK technical-analysis engine, so the indicators a script references are the same validated calculations your charts render, and a strategy authored in ModScript drops straight into our back-testing and walk-forward testing engines.
Optimize with Sharpe, Calmar, Sortino, and Sterling ratios, Maximum drawdown and Monte Carlo drawdown, Total P&L, largest profit, and largest loss, Risk-to-reward ratio and percent profitable, Standard deviation and downside deviation, Value Added Monthly Index (VAMI), Average trades per month, Profitable versus losing trades and more.
ModScript also interfaces natively with large language models, so teams can use AI to generate, refine, and explain trading strategies in plain conversation.
Why developers choose ModScript
A scripting language that turns trading ideas into executable logic, built to embed cleanly into the applications you ship.
Readable syntax
A concise, trader-friendly grammar for conditions, comparisons, and arithmetic over price and indicator series, approachable for users, predictable for developers.
Embeddable engine
Drop the parser and evaluator into your application, expose exactly the data and functions you want, and let users script safely on top of your platform.
Strategy & test ready
Author entry and exit logic once, then run it for live signals, automation, or historical evaluation through the Trading System Test Suite.
Custom indicators
Express new indicators in script form, computed from any series you provide, with results that line up with the TA-SDK and StockChartX libraries.
Alerts & scans
Evaluate the same expressions in real time to fire alerts, or run them in bulk to scan large instrument universes for matches.
Similar to Ruby
ModScript syntax is similar to Ruby, and hundreds of example scripts are available. Embed the language in native or managed applications.
Editions and capabilities
ModScript fits both native and managed stacks and slots into the wider Modulus developer toolchain.
Editions
- ModScript native (compiled)
- ModScript script (3rd generation)
- Complete source code included
- Perpetual license, no revenue share
Language features
- Plain, trader-readable syntax
- Conditions, comparisons, and arithmetic
- Reference to price, volume, and indicators
- User-defined variables and expressions
- Extensible function library
Use cases
- Trading strategy development
- Strategy backtesting and optimization
- Custom indicator authoring
- Real-time alerting
- Market scanning across many symbols
Embeddable, with full source
Every edition includes complete source code, so you can audit the parser, extend the function library with your own primitives, and tune the engine to your platform. There are no runtime royalties and no revenue sharing, license it once and ship it inside your product.
Let's build.
Request an instant meeting or schedule a call with our team to discuss your financial software or hardware project.