Documentation
Cuprel documentation
The full guide lives in the MillionChart wiki, next to the chart that runs the scripts, in English and in Persian. This page lists it. To begin, use Learn.
Start
- Write your first script and the sample programs on this site.
- Write your own scripts: the front page of the scripting guide (Persian).
- Already write scripts elsewhere? How Cuprel differs from what you may know (Persian).
The course
Lessons in order, from a first script to the Strategy Lab. Each also exists in Persian.
- Your first script
- Settings people can change
- Lines, colours and levels
- Signals, arrows and zones
- Values that remember
- Your own functions
- Lists and maps
- Labels, lines and boxes
- Sessions and a small table
- Other timeframes and symbols
- Alerts that say something
- Modules you reuse
- Finding mistakes with the log
- Your first strategy
- Testing in the Strategy Lab
- Results that look too good
- Staying inside the limits
- Reading the editor’s messages
Sample programs
All sample programs (Persian), by kind: moving averages and trend, channels and levels, oscillators, candle patterns, sessions, patterns and volume, statistics and tools, strategies. The engine's example set by topic is there too.
Reference
- Functions and values by group (Persian) and the function index.
- Cheat sheet, glossary and FAQ (cheat sheet, glossary, FAQ in Persian).
- Diagnostics and engine messages: what each message means and how to fix it (Persian). This site also has an error index.
- Limits and budgets and determinism.
- What is not available yet (Persian). Script alerts on your own scripts are not switched on for members in this release.
Groups of the reference: core · bar · tech · math · stats · color · chart · chart-point · mark · label · line · box · polyline · table · text · log · array · map · matrix · clock · session · period · tf · symbol · data · alert · orders · position · side · sizing · risk · trades · trades-open · trades-closed
The language
- Syntax and layout
- Values
- let, mut and state
- Types
- Inputs
- Choices and loops
- Functions, types and enums
- na, errors and arithmetic
- Lazy operators
- Calls that keep a state
- Text
- Units and literals
- Ids
On the chart
- The editor
- Plots and drawings
- Tables
- Trading day and sessions
- Other timeframes
- Modules and libraries
- Strategies
Members can test a strategy in the chart's Strategy Lab. On the free chart plan it has 10 runs a month on up to 92 days of history.
The editor is in the chart at millionchart.com/chart. You need to be signed in.