//@version=4
study("Crlf in arithmetic statement: plus")
a(x) =>
y = x
+ 2
y
plot(a(close))
//@version=4
study("Crlf in arithmetic statement: asterisk")
a(x) =>
y = x
* 2
y
plot(a(close))
//@version=4
study("Var keyword example")
a1_1 = 0.0
var float a2_1 = 0.0
a1_2 = 0.0
var float a2_2 = 0.0
if close > open
var x1 = close
x2 = close
a1_1 := x1
a1_2 := x2
a2_1 := x1
a2_2 := x2
plot(a1_1, color = color.red)
plot(a1_2, color = color.yellow)
plot(a2_1, color = color.blue)
plot(a2_2, color = color.green)