Type/to search
Getting Started
Platform Basics
Writing Strategies
Strategy Structure
Programming Languages
Strategy Parameters
Interactive Controls
Strategy Frontend
Template Library
Export Functions of Template Libraries
Template Library Parameters
Reference Template Library
Built-in Libraries
UI Text Localization
API Quick Reference
Development Tools
Backtesting System
Advanced Topics
Data and Research
Extended API Interface

Exported functions are the interface a template library offers; strategies that reference the template library can call them. How each language exports them is described in Template Library.

Examples

Declare and implement the exported function Test in a template library, in each language.

javascript
/* -- after referencing this template, a strategy calls this method directly as $.Test() -- main is never triggered in the strategy; it is only the entry point for debugging the template */ $.Test = function() { Log('Test') } function main() { $.Test() }
python
def Test(): Log("template call") # export Test; the main strategy calls it as ext.Test() ext.Test = Test
rust
// after referencing this template, a strategy calls it as ext::Test() // functions called by the strategy must be declared pub pub fn Test() { Log!("template call"); }