32 protected Func<IBaseData, decimal>
Selector {
get;
set; }
94 Selector = selector ?? (x => x.Value);
106 : this (TryToConvertSelector(valueSelector, nameof(valueSelector)), TryToConvertSelector(volumeSelector, nameof(volumeSelector)))
118 private static Func<IBaseData, decimal> TryToConvertSelector(PyObject selector,
string selectorName)
122 Func<IBaseData, decimal> resultSelector;
123 if (selector !=
null && !selector.IsNone())
125 if (!selector.TryConvertToDelegate(out resultSelector))
127 throw new ArgumentException(
128 $
"Unable to convert parameter {selectorName} to delegate type Func<IBaseData, decimal>");
133 resultSelector =
null;
136 return resultSelector;
170 protected abstract void UpdateBar(DateTime time, decimal currentValue, decimal volume);
215 public void Scan(DateTime currentLocalTime)