public void OnPriceOutDisarm() { (from bsl in BuySellLevels.ToSupressesList() where !HaveTrades() from x in bsl.IfAllManual() from y in x.IfAnyCanTrade() from z in y.If(srs => !IsCurrentPriceInsideTradeLevels3(srs.Height())) select z ).ForEach(srs => srs.ForEach(sr => sr.InManual = sr.CanTrade = false)); }
public void SetTradeRate(bool isBuy, double price) { BuySellLevels .Where(sr => sr.IsBuy == isBuy) .ForEach(sr => { IsTradingActive = false; sr.InManual = true; sr.Rate = price; RaiseShowChart(); }); }
public IEnumerable <bool> ToggleCanTrade(bool isBuy) { return(BuySellLevels.IsBuy(isBuy).Do(sr => sr.CanTrade = !sr.CanTrade).Select(sr => sr.CanTrade)); }
private bool ShouldTurnTradingOff() { return(BuySellLevels.Any(sr => sr.CanTrade) || HaveTrades()); }