mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 10:38:05 +00:00
[CodeFactor] Apply fixes
This commit is contained in:
@@ -13,7 +13,7 @@ public class VolumeUpdateTests
|
||||
{
|
||||
byte[] bytes = new byte[8];
|
||||
rng.GetBytes(bytes);
|
||||
return (double)BitConverter.ToUInt64(bytes, 0) / ulong.MaxValue * 200 - 100; // Range: -100 to 100
|
||||
return ((double)BitConverter.ToUInt64(bytes, 0) / ulong.MaxValue * 200) - 100; // Range: -100 to 100
|
||||
}
|
||||
|
||||
private TBar GetRandomBar(bool IsNew)
|
||||
@@ -21,7 +21,7 @@ public class VolumeUpdateTests
|
||||
double open = GetRandomDouble();
|
||||
double high = open + Math.Abs(GetRandomDouble());
|
||||
double low = open - Math.Abs(GetRandomDouble());
|
||||
double close = low + (high - low) * GetRandomDouble();
|
||||
double close = low + ((high - low) * GetRandomDouble());
|
||||
double volume = Math.Abs(GetRandomDouble()) * 1000; // Random positive volume
|
||||
return new TBar(DateTime.Now, open, high, low, close, volume, IsNew);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user