require "Color"
require "TIlib"

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

Candle_draw($White, $Blue)

if !$MA5
    $MA5 = MA_new(5)
else
    MA_next($MA5)
    MA_draw($MA5, $Colors[0])
end
Indicator(0, $MA5[1])

if !$MA25
    $MA25 = MA_new(25)
else
    MA_next($MA25)
    MA_draw($MA25, $Colors[1])
end
Indicator(1, $MA25[1])

if !$MA75
    $MA75 = MA_new(75)
else
    MA_next($MA75)
    MA_draw($MA75, $Colors[2])
end
Indicator(2, $MA75[1])
