File: tradingview.actual

package info (click to toggle)
golang-github-alecthomas-chroma 0.10.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports
  • size: 6,264 kB
  • sloc: python: 426; javascript: 79; sh: 32; makefile: 32
file content (14 lines) | stat: -rw-r--r-- 392 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@version=3
study(title="Chroma example script", overlay=true, precision=3)

emaLen = input(title="EMA Length", type=integer, defval=10)
emaVal = ema(close, emaLen)

plot(series=emaVal, style=circles, offset=2, linewidth=3)

// Colour background
bgcolor(color=close > open ? orange :
     close != high[1] ? purple :
     na, transp=80)

// Comment as last line should be recognised properly