public void OnPrice_NotPriceSignal__ReturnsFalse() { SignalSelector.OnPrice(new Signal() { Type = SignalType.EnterOnOpen }, StockPricesDataUtils.CreatePricesData(0, 0, 0, 0), 0).ShouldBeFalse(); }
public void OnClose_CloseSignal__ReturnsTrue() { SignalSelector.OnClose(new Signal() { Type = SignalType.EnterOnClose }, StockPricesDataUtils.CreatePricesData(0, 0, 0, 0), 0).ShouldBeTrue(); }
public void OnPrice(PositionDir positionDir, float price, bool expected) { SignalSelector.OnPrice( new Signal() { Type = SignalType.EnterOnPrice, Direction = positionDir, Price = price }, StockPricesDataUtils.CreatePricesData(0, 100, 50, 0), 0).ShouldBe(expected); }