Example #1
0
            protected override State <Config> Run(TradingProvider trading, DataProvider data)
            {
                var pair  = AlgorithmConfiguration.TradingPairs.First();
                var price = data.GetCurrentPriceTopBid(pair);

                _sell = trading.PlaceFullLimitOrderSell(pair, price * AlgorithmConfiguration.TakeProfit);
                SetTimer(TimeSpan.FromHours(AlgorithmConfiguration.WaitTime));
                return(new NothingState <Config>());
            }