require "Color"
require "TIlib"

$Names[0] = "%EMA(5)"
$Colors[0] = $Red
$Names[1] = "%EMA(25)"
$Colors[1] = $Green
$Names[2] = "%EMA(75)"
$Colors[2] = $Blue

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

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

if !$EMA2
    $EMA2 = DiffEMA_new(75)
else
    DiffEMA_next($EMA2)
    DiffEMA_draw($EMA2, $Colors[2])
end
