Код: Выделить всё
if (BarDate() == DateTime.Today)
{
//бар сегодня
}
Код: Выделить всё
function Initialize()
{
IndicatorName = "now";
PriceStudy = false;
AddInput("Input", Inputs.Candle);
AddSeries("A", DrawAs.Histogram, Color.Green);
}
function Evaluate()
{
if (BarDate() == DateTime.Now.Date) A = DateTime.Now.Hour;
}
Код: Выделить всё
function Initialize()
{
IndicatorName = "nowUTC";
PriceStudy = false;
AddInput("Input", Inputs.Candle);
AddSeries("A", DrawAs.Histogram, Color.Green);
}
function Evaluate()
{
if (BarDate() == DateTime.UtcNow.Date) A = DateTime.UtcNow.Hour;
}