mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 12:38:06 +00:00
Afirma + documentation +semver: patch
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using System.CommandLine.Rendering.Views;
|
||||
|
||||
namespace QuanTAlib;
|
||||
|
||||
public class GbmFeed : TBarSeries
|
||||
@@ -6,7 +8,7 @@ public class GbmFeed : TBarSeries
|
||||
private readonly Random _random;
|
||||
private double _lastClose, _lastHigh, _lastLow;
|
||||
|
||||
public GbmFeed(double initialPrice = 100.0, double mu = 0.05, double sigma = 0.2)
|
||||
public GbmFeed(double initialPrice = 100.0, double mu = 0.05, double sigma = 0.2) : base()
|
||||
{
|
||||
_lastClose = _lastHigh = _lastLow = initialPrice;
|
||||
_mu = mu;
|
||||
@@ -20,6 +22,7 @@ public class GbmFeed : TBarSeries
|
||||
public void Add(int count)
|
||||
{
|
||||
DateTime startTime = DateTime.UtcNow - TimeSpan.FromHours(count);
|
||||
TBar lastBar = new();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
Add(startTime, true);
|
||||
|
||||
Reference in New Issue
Block a user