Click or drag to resize

Historical data

LMAX 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 SubscribeCandles 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 CandleSeriesProcessing event:

    C#
    Trader.CandleSeriesProcessing += ProcessCandle;
  3. Appeared candles can be drawn through the graphical control:

    lmax sample history
See Also

Other Resources