require "Color"
require "TIlib"

$Names[0] = "+DI(14)"
$Colors[0] = $Red
$Names[1] = "-DI(14)"
$Colors[1] = $Green
$Names[2] = "ADX(14)"
$Colors[2] = $Blue

if !$DMI
    $DMI = DMI_new(14, 14, 0)
else
    DMI_next($DMI)
    DMI_draw($DMI, $Colors[0], $Colors[1], $Colors[2])
end
Indicator(0, $DMI[1])
Indicator(1, $DMI[3])
Indicator(2, $DMI[5])
