Exemple #1
0
            protected override State <Config> Run(TradingProvider trading, DataProvider data)
            {
                trading.CancelOrder(_stopLoss);
                trading.ExecuteFullMarketOrderSell(FirstPair);

                return(new EntryState());
            }
            protected override State <Config> Run(TradingProvider trading, DataProvider data)
            {
                // Marketsell the asset and return to entry.
                trading.ExecuteFullMarketOrderSell(FirstPair);

                return(new EntryState());
            }
Exemple #3
0
            protected override State <Config> Run(TradingProvider trading, DataProvider data)
            {
                // If the Filter and CrossoverSMA signal the trade, we buy at market.
                trading.ExecuteFullMarketOrderSell(FirstPair);

                return(new EntryState());
            }
Exemple #4
0
            protected override State <KeiraNightlyConfiguration> Run(TradingProvider trading, DataProvider data)
            {
                var pair = AlgorithmConfiguration.TradingPairs.First();

                trading.ExecuteFullMarketOrderSell(pair);
                WaitForNextCandle();
                return(new MarketBuyState());
            }
            protected override State <Config> Run(TradingProvider trading, DataProvider data)
            {
                for (int i = 0; i < 10; i++)
                {
                    WaitForNextCandle();
                }

                trading.ExecuteFullMarketOrderSell(FirstPair);
                return(new EntryState());
            }
Exemple #6
0
            protected override State <Config> Run(TradingProvider trading, DataProvider data)
            {
                trading.ExecuteFullMarketOrderBuy(FirstPair);
                for (var i = 0; i < AlgorithmConfiguration.CandleCount; i++)
                {
                    WaitForNextCandle();
                }

                trading.ExecuteFullMarketOrderSell(FirstPair);
                return(new CheckState());
            }
Exemple #7
0
 protected override State <Config> Run(TradingProvider trading, DataProvider data)
 {
     trading.ExecuteFullMarketOrderSell(_oldBuy.Pair);
     return(new EntryState());
 }
Exemple #8
0
 protected override State <Config> Run(TradingProvider trading, DataProvider data)
 {
     trading.CancelOrder(oldLimit);
     trading.ExecuteFullMarketOrderSell(AlgorithmConfiguration.TradingPairs.First());
     return(new WaitState());
 }