Код: Выделить всё
function Initialize()
{
IndicatorName = "VolumeBidAskAccum";
PriceStudy = false;
AddInput("Input", Inputs.Candle);
AddSeries("Bid", DrawAs.Line, Color.Red);
AddSeries("Ask", DrawAs.Line, Color.Green);
AddGlobalVariable("VABid", Types.Int, 0);
AddGlobalVariable("VAAsk", Types.Int, 0);
}
function Evaluate()
{
if (BarDate() != BarDate(1)) { VABid = 0; VAAsk = 0; }
VABid += (int)Input.VolumeBid;
VAAsk += (int)Input.VolumeAsk;
Bid = VABid;
Ask = VAAsk;
}