[CodeFactor] Apply fixes

This commit is contained in:
codefactor-io
2024-11-03 23:03:24 +00:00
parent c84a5dd4df
commit e60cf47d3a
43 changed files with 141 additions and 141 deletions
+2 -2
View File
@@ -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);
}