MASeries.fromIndicator constructor

MASeries.fromIndicator(
  1. Indicator<Tick> indicator,
  2. MAOptions options, {
  3. String? id,
  4. LineStyle? style,
  5. int offset = 0,
})

Initializes

Implementation

MASeries.fromIndicator(
  Indicator<Tick> indicator,
  MAOptions options, {
  String? id,
  LineStyle? style,
  super.offset,
}) : super(
       indicator,
       id ?? 'SMASeries-period${options.period}-type${options.type}',
       options: options,
       style: style ?? const LineStyle(thickness: 0.5),
       lastTickIndicatorStyle: style != null
           ? getLastIndicatorStyle(
               style.color,
               showLastIndicator: options.showLastIndicator,
             )
           : null,
     );