This commit is contained in:
Miha Kralj
2024-11-03 15:52:25 -08:00
parent 7b41d84c66
commit 7f6c29151c
7 changed files with 162 additions and 104 deletions
-19
View File
@@ -597,25 +597,6 @@ public class SyntheticVendor : Vendor
};
}
private HistoryItemBar GeneratePulseWave(DateTime time, TimeSpan slice)
{
double hours = (time - DateTime.UnixEpoch).TotalHours;
double period = 24; // 24-hour period
double position = hours % period;
double value = position < period / 5 ? 100 : -100; // 20% duty cycle
return new HistoryItemBar
{
TicksLeft = time.Ticks,
TicksRight = time.Add(slice).Ticks - 1,
Open = value,
High = 100,
Low = -100,
Close = value,
Volume = 100,
Ticks = 100
};
}
private HistoryItemBar GenerateTriangleWave(DateTime time, TimeSpan slice)
{