public void RemoveFunction() { AvailableFunctions.Add(SelectedFunctionToRemove); SelectedFunctions.Remove(SelectedFunctionToRemove); NotifyOfPropertyChange(() => SelectedFunctions); NotifyOfPropertyChange(() => CanPrint); NotifyOfPropertyChange(() => CanReset); }
public void Reset() { AquiredDate = null; SelectedEmployees.Clear(); SelectedDepartment = null; SelectedFunction = null; AvailableFunctions.Clear(); NotifyOfPropertyChange(() => CanSave); NotifyOfPropertyChange(() => CanReset); }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Load"/> event. /// </summary> /// <param name="e">The <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); bool isEditAllowedToUser = (Membership.QueryMembershipLevel(CurrentPage) == MembershipLevels.Administer); AvailableFunctions.Enabled = isEditAllowedToUser; if (!IsPostBack) { AvailableFunctions.DataBind(); } }
public void CancelDept() { if (!string.IsNullOrWhiteSpace(DeptName)) { DeptName = null; SelectedDepartment = null; AvailableFunctions.Clear(); NotifyOfPropertyChange(() => CanDeleteDept); NotifyOfPropertyChange(() => CanDeptFunctToggle); NotifyOfPropertyChange(() => CanSaveAll); NotifyOfPropertyChange(() => CanAvailableFunctionsInitialize); NotifyOfPropertyChange(() => CanDeptName); } }
public BitfinexExchange(ExchangeManager exchangeManager) : base(exchangeManager) { Name = "Bitfinex"; ExchangeAPI = new ExchangeAPI { Name = Name }; PublicFunctions.Add(APIFunction.RequestOrderBook); PublicFunctions.Add(APIFunction.RequestTicker); PublicFunctions.Add(APIFunction.RequestTrades); AvailableFunctions.Add(APIFunction.RequestTicker); AvailableFunctions.Add(APIFunction.RequestBalances); AvailableFunctions.Add(APIFunction.RequestTrades); AvailableFunctions.Add(APIFunction.RequestOrderBook); AvailableFunctions.Add(APIFunction.RequestOpenOrders); AvailableFunctions.Add(APIFunction.RequestNewOrder); AvailableFunctions.Add(APIFunction.CancelOrder); OrderSides.Add(OrderSide.Buy); OrderSides.Add(OrderSide.Sell); DefaultOrderType = new OrderType("exchange limit", "exchange limit"); OrderTypes.Add(new OrderType("exchange market", "exchange market")); OrderTypes.Add(DefaultOrderType); OrderTypes.Add(new OrderType("exchange stop", "exchange stop")); OrderTypes.Add(new OrderType("exchange trailing-stop", "exchange trailing-stop")); OrderTypes.Add(new OrderType("exchange fill-or-kill", "exchange fill-or-kill")); OrderTypes.Add(new OrderType("market", "market")); OrderTypes.Add(new OrderType("limit", "limit")); OrderTypes.Add(new OrderType("stop", "stop")); OrderTypes.Add(new OrderType("trailing-stop", "trailing-stop")); OrderTypes.Add(new OrderType("fill-or-kill", "fill-or-kill")); PairManager.AddSupportedPair(PairBase.BTCUSD, "btcusd"); PairManager.AddSupportedPair(PairBase.LTCUSD, "ltcusd"); PairManager.AddSupportedPair(PairBase.LTCBTC, "ltcbtc"); PairManager.AddSupportedPair(PairBase.DRKUSD, "drkusd"); PairManager.AddSupportedPair(PairBase.DRKBTC, "drkbtc"); }
public KrakenExchange(ExchangeManager exchangeManager) : base(exchangeManager) { Name = "Kraken"; ExchangeAPI = new ExchangeAPI { Name = Name }; PublicFunctions.Add(APIFunction.RequestOrderBook); PublicFunctions.Add(APIFunction.RequestTicker); PublicFunctions.Add(APIFunction.RequestTrades); AvailableFunctions.Add(APIFunction.RequestTicker); AvailableFunctions.Add(APIFunction.RequestOrderBook); AvailableFunctions.Add(APIFunction.RequestBalances); AvailableFunctions.Add(APIFunction.RequestOpenOrders); AvailableFunctions.Add(APIFunction.RequestNewOrder); OrderSides.Add(OrderSide.Buy); OrderSides.Add(OrderSide.Sell); DefaultOrderType = new OrderType("limit", "limit"); OrderTypes.Add(new OrderType("market", "market")); OrderTypes.Add(DefaultOrderType); // limit OrderTypes.Add(new OrderType("stop-loss", "stop Loss")); OrderTypes.Add(new OrderType("take-profit", "take profit")); OrderTypes.Add(new OrderType("stop-loss-profit", "stop-loss-profit")); OrderTypes.Add(new OrderType("stop-loss-profit-limit", "stop-loss-profit-limit")); OrderTypes.Add(new OrderType("stop-loss-limit", "stop-loss-limit")); OrderTypes.Add(new OrderType("trailing-stop", "trailing-stop")); OrderTypes.Add(new OrderType("trailing-stop-limit", "trailing-stop-limit")); OrderTypes.Add(new OrderType("stop-loss-and-limit", "stop-loss-and-limit")); PairManager.AddSupportedPair(PairBase.BTCEUR, "XBTEUR"); PairManager.AddSupportedPair(PairBase.LTCEUR, "LTCEUR"); PairManager.AddSupportedPair(PairBase.BTCUSD, "XBTUSD"); PairManager.AddSupportedPair(PairBase.LTCUSD, "LTCUSD"); PairManager.AddSupportedPair(PairBase.BTCLTC, "XBTLTC"); PairManager.AddSupportedPair(PairBase.BTCXRP, "XBTXRP"); }
public static void Compose(FunctionData first, FunctionData second, Operation operation) { if (operation == Operation.Divide && second.Points.Any(p => Math.Abs(p.Y) < double.Epsilon)) { first.Continuous.Value = false; } if (first.Type != Signal.Composite) { first.Function = AvailableFunctions.GetFunction(first.Type); } if (second.Type != Signal.Composite) { second.Function = AvailableFunctions.GetFunction(second.Type); } first.Type = Signal.Composite; if (second.Function != null && first.Function != null) { // TODO Think about a proper way of implementing this feature first.Continuous.Value = first.Continuous.Value && second.Continuous.Value; first.Function = FunctionComposer.ComposeFunction( first.Function, second.Function, second, operation); Generator.GenerateSignal(first); } else { SimpleCompose(first, second, operation); first.PointsUpdate(); Histogram.GetHistogram(first); } }
public virtual bool IsAvailable(APIFunction function) { return((AvailableFunctions.Contains(function) && VerifyAPI()) || IsPublicFunction(function)); }