Click or drag to resize

Historical data

OpenECry provides historical candles, which can be used for testing, and to initialize the indicators.

Work with historical candles

  1. In order to get historic candles, call OpenECryTraderSubscribeCandles(CandleSeries, DateTimeOffset, DateTimeOffset) method:

    C#
    var tf = (TimeSpan)CandlesPeriods.SelectedItem;
    var series = new CandleSeries(typeof(TimeFrameCandle), SelectedSecurity, tf);
    Trader.SubscribeCandles(SelectedSecurity, DateTime.Now.Subtract(TimeSpan.FromTicks(tf.Ticks * 100)), DateTime.Now);
  2. Historical candles passed through the OpenECryTraderNewCandles event:

    C#
    Trader.NewCandles += _securitiesWindow.AddHistoricalCandles;
  3. Appeared candles can be drawn through the graphical control:

    blackwood history
See Also

Other Resources