mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 02:28:05 +00:00
Remove multiple Pine Script indicators: SSFDSP, STARCHANNEL, STBANDS, STC, UBANDS, UCHANNEL, VWAPBANDS, and VWAPSD. These indicators were deleted to streamline the library and remove unused or redundant code.
This commit is contained in:
@@ -470,21 +470,12 @@ public class ImiTests
|
||||
public void Update_GbmData_ReturnsValueInRange()
|
||||
{
|
||||
var imi = new Imi(14);
|
||||
long baseTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
||||
var random = new Random(42);
|
||||
var gbm = new GBM(seed: 42);
|
||||
var bars = gbm.Fetch(100, DateTime.UtcNow.Ticks, TimeSpan.FromMinutes(1));
|
||||
|
||||
double price = 100.0;
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
for (int i = 0; i < bars.Count; i++)
|
||||
{
|
||||
double change = (random.NextDouble() - 0.5) * 4;
|
||||
double open = price;
|
||||
double high = Math.Max(open, open + Math.Abs(change) + random.NextDouble() * 2);
|
||||
double low = Math.Min(open, open - Math.Abs(change) - random.NextDouble() * 2);
|
||||
double close = open + change;
|
||||
|
||||
imi.Update(new TBar(baseTime + i * 60000, open, high, low, close, 1000));
|
||||
price = close;
|
||||
imi.Update(bars[i]);
|
||||
|
||||
// IMI should always be in [0, 100]
|
||||
Assert.InRange(imi.Last.Value, 0.0, 100.0);
|
||||
|
||||
Reference in New Issue
Block a user