#include <Color>
#include <TIlib>

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

Candle_draw($White, $Blue)

if ! $EMA5
    $EMA5 = EMA_new(5)
else
    EMA_next($EMA5)
    EMA_draw($EMA5, $Colors[0])
end

if ! $EMA25
    $EMA25 = EMA_new(25)
else
    EMA_next($EMA25)
    EMA_draw($EMA25, $Colors[1])
end

if ! $EMA75
    $EMA75 = EMA_new(75)
else
    EMA_next($EMA75)
    EMA_draw($EMA75, $Colors[2])
end
