Skip to content

The guide ​

Which page answers your question? Each page below takes one thing a script author asks, answers it first, and gives a script you can paste. Read them in order to learn the language, or go straight to the page your question names.

pine
//@version=6
indicator("Where each line is explained", overlay = true)
int len = input.int(20, "Length", minval = 1)  // Inputs
var int crosses = 0                             // var and varip
float avg = ta.sma(close, len)                  // Functions
bool up = ta.crossover(close, avg)              // Operators
if up                                           // Control flow
    crosses += 1
plot(avg, "Average", color.orange)              // Plots and colours
float d = request.security(syminfo.tickerid, "W",
     close[1], lookahead = barmerge.lookahead_on) // Other symbols
plot(d, "Last week's close", color.gray)

The example is Pine Script. Its last request reads last week's close from each week's first bar with lookahead_on, which AmenoScript refuses: Other symbols has what to write there instead.

Running scripts ​

Language ​

Inputs and data ​

Output ​

Strategies ​

  • Strategies: orders, exits, sizing, costs and the Strategy Tester's report.

Working with scripts ​

See also ​

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