mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-21 03:58:04 +00:00
Refactor charts
This commit is contained in:
@@ -37,8 +37,6 @@ public class MED_chart : Indicator
|
||||
this.indicator =
|
||||
new(source: bars.Select(this.DataSource), period: this.Period);
|
||||
}
|
||||
|
||||
protected void OnNewData(bool update = false) { this.indicator.Add(update); }
|
||||
protected override void OnUpdate(UpdateArgs args)
|
||||
{
|
||||
bool update = !(args.Reason == UpdateReason.NewBar ||
|
||||
@@ -47,7 +45,6 @@ public class MED_chart : Indicator
|
||||
this.GetPrice(PriceType.High), this.GetPrice(PriceType.Low),
|
||||
this.GetPrice(PriceType.Close),
|
||||
this.GetPrice(PriceType.Volume), update);
|
||||
this.OnNewData(update);
|
||||
double result = this.indicator[this.indicator.Count - 1].v;
|
||||
this.SetValue(result, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user