require "Color"
require "TIlib"

$Names[0] = "%EMA(13)"
$Colors[0] = $Red
$Names[1] = "%EMA(26)"
$Colors[1] = $Green

if !$EMA0
    $EMA0 = DiffEMA_new(13)
else
    DiffEMA_next($EMA0)
    DiffEMA_draw($EMA0, $Colors[0])
end
Indicator(0, $EMA0[1])

if !$EMA1
    $EMA1 = DiffEMA_new(26)
else
    DiffEMA_next($EMA1)
    DiffEMA_draw($EMA1, $Colors[1])
end
Indicator(1, $EMA1[1])
