mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-20 19:48:05 +00:00
Refactor code formatting and improve consistency across various test files
- Removed unnecessary blank lines in multiple test files to enhance readability. - Ensured consistent spacing and formatting in the `Trima`, `Usf`, `Vidya`, `Wma`, and `Atr` test classes. - Updated comments for clarity and consistency in the `Atr` and `Adl` classes. - Adjusted project files for better structure and maintainability.
This commit is contained in:
@@ -170,7 +170,7 @@ public sealed class AtrValidationTests : IDisposable
|
||||
var atrIndicator = Tulip.Indicators.atr;
|
||||
double[][] inputs = { hData, lData, cData };
|
||||
double[] options = { period };
|
||||
|
||||
|
||||
// Tulip ATR lookback
|
||||
int lookback = atrIndicator.Start(options);
|
||||
double[][] outputs = { new double[hData.Length - lookback] };
|
||||
@@ -208,7 +208,7 @@ public sealed class AtrValidationTests : IDisposable
|
||||
var atrIndicator = Tulip.Indicators.atr;
|
||||
double[][] inputs = { hData, lData, cData };
|
||||
double[] options = { period };
|
||||
|
||||
|
||||
// Tulip ATR lookback
|
||||
int lookback = atrIndicator.Start(options);
|
||||
double[][] outputs = { new double[hData.Length - lookback] };
|
||||
|
||||
@@ -59,8 +59,8 @@ public sealed class Atr : AbstractBase
|
||||
var tr = CalculateTrueRange(source);
|
||||
_rma.Prime(tr.Values);
|
||||
Last = _rma.Last;
|
||||
// We can't automatically subscribe to TBarSeries updates via this constructor
|
||||
// because AbstractBase doesn't enforce TBarSeries subscription structure,
|
||||
// We can't automatically subscribe to TBarSeries updates via this constructor
|
||||
// because AbstractBase doesn't enforce TBarSeries subscription structure,
|
||||
// but we can rely on manual updates or the user subscribing.
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ public sealed class Atr : AbstractBase
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the indicator state using the provided history.
|
||||
/// Note: ATR needs OHLCV data to calculate TR properly.
|
||||
/// This Prime method expects pre-calculated TR values or handles basic priming
|
||||
/// Note: ATR needs OHLCV data to calculate TR properly.
|
||||
/// This Prime method expects pre-calculated TR values or handles basic priming
|
||||
/// if the user erroneously passes non-TR data. Ideally, use Batched TBarSeries.
|
||||
/// </summary>
|
||||
public override void Prime(ReadOnlySpan<double> source, TimeSpan? step = null)
|
||||
|
||||
Reference in New Issue
Block a user