Страница с документацией по скриптам
Документация по скриптам для индикаторов и роботов в терминале Альфа-Инвестиции
стр. 15
DrawLine – рисовать линию на данном баре от предыдущего бара
Series.DrawLine();
Series.DrawLine(Color color, LineStyles style, int width);
Стили (style):
Line.Solid;
Line.DashBig;
Line.DashSmall;
Line.Dot;
Ширина (width) – ширина линии в пикселях
пример
Код: Выделить всё
function Initialize()
{
IndicatorName = "DrawLine";
PriceStudy = true;
AddInput("Input", Inputs.Candle, 1, true, "");
AddSeries("A", DrawAs.Custom, Color.Red);
}
function Evaluate()
{
if (CurrentIndex == MaxIndex - 50) A = Input.Close;
if (CurrentIndex == MaxIndex - 5) A = Input.Close;
A.DrawLine(Color.Black, Line.DashBig, 1);
}