Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mihakralj committed Oct 17, 2024
1 parent e5a1948 commit fbe4046
Show file tree
Hide file tree
Showing 17 changed files with 2,623 additions and 290 deletions.
6 changes: 3 additions & 3 deletions Tests/test_iTBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public BarIndicatorTests()
private static readonly ITValue[] indicators = new ITValue[]
{
new Atr(period: 14),
new Jvolty(period: 14)

// Add other TBar-based indicators here
};

Expand Down Expand Up @@ -80,14 +80,14 @@ private static MethodInfo FindCalcMethod(Type type)
if (methods.Count > 0)
{
// Prefer the method with TBar parameter
var method = methods.FirstOrDefault(m =>
var method = methods.Find(m =>
{
var parameters = m.GetParameters();
return parameters.Length == 1 && parameters[0].ParameterType == typeof(TBar);
});

// If not found, return the first method
return method ?? methods.First();
return method ?? methods[0];
}

type = type.BaseType!;
Expand Down
3 changes: 1 addition & 2 deletions Tests/test_quantower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace QuanTAlib
{
public class QuantowerTests
{
private void TestIndicator<T>(string fieldName = "ma") where T : Indicator, new()
private static void TestIndicator<T>(string fieldName = "ma") where T : Indicator, new()
{
var indicator = new T();
try
Expand Down Expand Up @@ -95,7 +95,6 @@ public class QuantowerTests

// Volatility Indicators
[Fact] public void Atr() => TestIndicator<AtrIndicator>("atr");
[Fact] public void Jvolty() => TestIndicator<JvoltyIndicator>("jvolty");

[Fact] public void Historical() => TestIndicator<HistoricalIndicator>("historical");
[Fact] public void Realized() => TestIndicator<RealizedIndicator>("realized");
Expand Down
15 changes: 0 additions & 15 deletions Tests/test_updates_volatility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,6 @@ public void Historical_Update()
Assert.Equal(initialValue, finalValue, precision);
}

[Fact]
public void Jvolty_Update()
{
var indicator = new Jvolty(period: 14);
double initialValue = indicator.Calc(new TBar(DateTime.Now, ReferenceValue, ReferenceValue, ReferenceValue, ReferenceValue, 1000, IsNew: true));

for (int i = 0; i < RandomUpdates; i++)
{
indicator.Calc(GetRandomBar(false));
}
double finalValue = indicator.Calc(new TBar(DateTime.Now, ReferenceValue, ReferenceValue, ReferenceValue, ReferenceValue, 1000, IsNew: false));

Assert.Equal(initialValue, finalValue, precision);
}

[Fact]
public void Realized_Update()
{
Expand Down
134 changes: 134 additions & 0 deletions docs/Progress.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
AC,Acceleration Oscillator
AD,Chaikin A/D Line
ADOSC,Chaikin A/D Oscillator
ADL,Accumulation / Distribution Line
ADX,Average Directional Movement Index
ADXR,Average Directional Movement Index Rating
Alligator,Alligator Indicator
ALMA,Arnaud Legoux Moving Average
AO,Awesome Oscillator
APO,Absolute Price Oscillator
AROON,Aroon Indicator
AROONOSC,Aroon Oscillator
ATS,ATR Trailing Stop
ATR,Average True Range
AVGPRICE,Average Price
BB,Bollinger Bands
BBF,Bollinger Bands Flat
BBP,Bull and Bear Power
BC,Beta Coefficient
BETA,Beta
BOP,Balance of Power
CCI,Commodity Channel Index
CE,Chandelier Exit
Channel,Price Channel
CI,Choppiness Index
CMF,Chaikin Money Flow
CMO,Chande Momentum Oscillator
CORREL,Pearson's Correlation Coefficient
CRSI,ConnorsRSI
DC,Donchian Channels
DCP,Dominant Cycle Periods
DEMA,Double Exponential Moving Average
DMI,Directional Movement Index
DPO,Detrended Price Oscillator
DX,Directional Movement Index
EMA,Exponential Moving Average
EPMA,Endpoint Moving Average
ERI,Elder-ray Index
FCB,Fractal Chaos Bands
FI,Force Index
GO,Gator Oscillator
HE,Hurst Exponent
HMA,Hull Moving Average
HT_TRENDLINE,Hilbert Transform - Instantaneous Trendline
HT_TRENDMODE,Hilbert Transform - Trend vs Cycle Mode
HV,Historical Volatility
IC,Ichimoku Cloud
KAMA,Kaufman Adaptive Moving Average
KDJ,KDJ Index
Keltner,Keltner Channel
KVO,Klinger Volume Oscillator
LINEARREG,Linear Regression
LINEARREG_ANGLE,Linear Regression Angle
LINEARREG_INTERCEPT,Linear Regression Intercept
LINEARREG_SLOPE,Linear Regression Slope
LSMA,Least Squares Moving Average
LWMA,Linearly Weighted Moving Average
MACDEXT,MACD with controllable MA type
MACDFIX,Moving Average Convergence Divergence Fix 12/26
MAD,Mean absolute deviation
MAE,Moving Average Envelope
MAMA,MESA Adaptive Moving Average
MAPE,Mean absolute percentage error
MAX,Highest value over a specified period
MAXINDEX,Index of highest value over a specified period
MD,McGinley Dynamic
MEDPRICE,Median Price
MFI,Money Flow Index
MIN,Lowest value over a specified period
MININDEX,Index of lowest value over a specified period
MINMAX,Lowest and highest values over a specified period
MINMAXINDEX,Indexes of lowest and highest values over a period
MMA,Modified Moving Average
MOM,Momentum
MSE,Mean square error
NATR,Normalized Average True Range
OBV,On Balance Volume
OsMA,Moving Average of Oscillator
PAZ,Price Action Zones
Pivots,Pivots
PMO,Price Momentum Oscillator
PP,Pivot Points
PPO,Percentage Price Oscillator
PPMA,Pivot Point Moving Average
PRS,Price Relative Strength
PVI,Positive Volume Index
PVO,Percentage Volume Oscillator
Qstick,Qstick Indicator
R2,R-Squared (Coefficient of Determination)
Regression,Regression Line Indicator
RLW,%R Larry Williams
RMA,Running Moving Average
ROC,Rate of Change
ROCB,ROC with Bands
RPP,Rolling Pivot Points
RRA,Rescaled Range Analysis
RSI,Relative Strength Index
SAR,Parabolic SAR
SAREXT,Parabolic SAR - Extended
SDC,Standard Deviation Channels
SI,Swing Index
SLR,Slope and Linear Regression
SMA,Simple Moving Average
SMI,Stochastic Momentum Index
SMMA,Smoothed Moving Average
ST,SuperTrend
STARC,STARC Bands
STC,Schaff Trend Cycle
STDDEV,Standard Deviation
STOCH,Stochastic
STOCHF,Stochastic Fast
STOCHRSI,Stochastic Relative Strength Index
SUM,Summation
T3,Triple Exponential Moving Average (T3)
TEMA,Triple Exponential Moving Average
TRANGE,True Range
TRIMA,Triangular Moving Average
TRIX,1-day Rate-Of-Change (ROC) of a Triple Smooth EMA
TSI,True Strength Index
TYPPRICE,Typical Price
UI,Ulcer Index
ULTOSC,Ultimate Oscillator
VAR,Variance
VI,Vortex Indicator
Volume,Volume Indicator
VS,Volatility Stop
VWAP,Volume Weighted Average Price
VWMA,Volume Weighted Moving Average
WA,Williams Alligator
WCLPRICE,Weighted Close Price
WF,Williams Fractal
WMA,Weighted Moving Average
ZS,Z-Score
ZZ,ZigZag Indicator
Loading

0 comments on commit fbe4046

Please sign in to comment.