#include <Color>
#include <TIlib>

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

Volume_draw($Blue)

if !$MA1
    $MA1 = VolumeMA_new(5)
    $MA2 = VolumeMA_new(25)
    $MA3 = VolumeMA_new(75)
else
    VolumeMA_next($MA1)
    VolumeMA_draw($MA1, $Colors[0])
    VolumeMA_next($MA2)
    VolumeMA_draw($MA2, $Colors[1])
    VolumeMA_next($MA3)
    VolumeMA_draw($MA3, $Colors[2])
end
