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

Volume_draw($Blue)

if !$EMA1
    $EMA1 = VolumeEMA_new(5)
    $EMA2 = VolumeEMA_new(25)
    $EMA3 = VolumeEMA_new(75)
else
    VolumeEMA_next($EMA1)
    VolumeEMA_draw($EMA1, $Colors[0])
    VolumeEMA_next($EMA2)
    VolumeEMA_draw($EMA2, $Colors[1])
    VolumeEMA_next($EMA3)
    VolumeEMA_draw($EMA3, $Colors[2])
end
Indicator(0, $EMA1[1])
Indicator(1, $EMA2[1])
Indicator(2, $EMA3[1])
