Appearance
Examples
Which script does what you're trying to do? Each example below is a complete script you can paste into the Script Editor, followed by how it works and the traps it avoids. Each one runs on the terminal's engines as part of this site's build. None is a trading recommendation.
Each row names its dialect. A Pine Script example runs on TradingView as well. An AmenoScript one runs only here, and leak-safe; its page names the line that makes it AmenoScript.
Indicators
| Example | Answers | Dialect |
|---|---|---|
| RSI with alerts | How do I build an indicator with settings that alerts me? | Pine Script |
| A weekly value on a daily chart | How do I show a weekly value on a daily chart that doesn't move on a live chart? | Pine Script and AmenoScript |
| A table dashboard | How do I show a few current numbers in a corner? | Pine Script |
Strategies
| Example | Answers | Dialect |
|---|---|---|
| A mean-reversion strategy | How do I buy a dip and sell the bounce, with a stop? | Pine Script |
| A trend-following strategy | How do I ride a breakout and cap the loss when it fails? | Pine Script |
Portfolios
| Example | Answers | Dialect |
|---|---|---|
| Momentum rotation | How do I hold the coins that rose most, without hindsight? | AmenoScript |
| Risk parity | How do I size a portfolio so each asset adds the same risk? | AmenoScript |
Research
| Example | Answers | Dialect |
|---|---|---|
| Pair ratio scan | Which pairs have drifted furthest from their usual ratio? | AmenoScript |
| Correlation matrix | Which coins move together, pair by pair? | AmenoScript |
| Cross-section rank | How do I rank fifty coins each day, and test the ranking? | AmenoScript |
Reuse
| Example | Answers | Dialect |
|---|---|---|
| A script as a function | How do I reuse a saved indicator without copying it? | AmenoScript |
| A strategy as a value | How do I act on another strategy's own results? | AmenoScript |