protected override void OnBarUpdate() { if (Close[0] >= Open[0]) { UpVolume[0] = Volume[0]; DownVolume.Reset(); } else { UpVolume.Reset(); DownVolume[0] = Volume[0]; } }
protected override void OnBarUpdate() { if (Close[0] >= Open[0]) { UpVolume[0] = Instrument.MasterInstrument.InstrumentType == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[0]) : Volume[0]; DownVolume.Reset(); } else { UpVolume.Reset(); DownVolume[0] = Instrument.MasterInstrument.InstrumentType == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[0]) : Volume[0]; } }