Skip to content

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 ​

ExampleAnswersDialect
RSI with alertsHow do I build an indicator with settings that alerts me?Pine Script
A weekly value on a daily chartHow do I show a weekly value on a daily chart that doesn't move on a live chart?Pine Script and AmenoScript
A table dashboardHow do I show a few current numbers in a corner?Pine Script

Strategies ​

ExampleAnswersDialect
A mean-reversion strategyHow do I buy a dip and sell the bounce, with a stop?Pine Script
A trend-following strategyHow do I ride a breakout and cap the loss when it fails?Pine Script

Portfolios ​

ExampleAnswersDialect
Momentum rotationHow do I hold the coins that rose most, without hindsight?AmenoScript
Risk parityHow do I size a portfolio so each asset adds the same risk?AmenoScript

Research ​

ExampleAnswersDialect
Pair ratio scanWhich pairs have drifted furthest from their usual ratio?AmenoScript
Correlation matrixWhich coins move together, pair by pair?AmenoScript
Cross-section rankHow do I rank fifty coins each day, and test the ranking?AmenoScript

Reuse ​

ExampleAnswersDialect
A script as a functionHow do I reuse a saved indicator without copying it?AmenoScript
A strategy as a valueHow do I act on another strategy's own results?AmenoScript

AmenoScript is compatible with Pine Script v6. Pine Script is a trademark of TradingView, Inc., which has no part in AmenoScript.