protected override void Initialize(ExchangeTradeInfo tradeInfo)
        {
            base.Initialize(tradeInfo);

            SetPlotListCount(1);
            AnchorPrice = TradeInfo.Trade.Price;
            HitValley   = HitPeak = false;
            ProcessTrade();
        }
예제 #2
0
        protected virtual void Initialize(ExchangeTradeInfo info)
        {
            TradeInfo          = info;
            LastTradeTimestamp = info.Trade.Ticks;
            UpdateAmounts();
            StartCashFlow = CashFlow;
            Profit        = (CashFlow - StartCashFlow) + (ItemCount * (decimal)info.Trade.Price);
            ItemCount     = 0.0m;
            Buys          = Sells = 0;
            Spend         = 0.0m;

#if DEBUG
            lastTradeTicks = info.Trade.Ticks;
#endif
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="api">Exchange API</param>
 /// <param name="symbol">The symbol to trade by default, can be null</param>
 public ExchangeInfo(IExchangeAPI api, string symbol = null)
 {
     API       = api;
     Symbols   = api.GetSymbols().ToArray();
     TradeInfo = new ExchangeTradeInfo(this, symbol);
 }