mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-24 05:28:05 +00:00
feat: add new indicators (Decay, Edecay, MinusDi, MinusDm, PlusDi, PlusDm, Maxindex, Minindex, Sarext) and update pine scripts, core libs, validation tests, and python bindings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Arnaud Legoux Moving Average (ALMA)", "ALMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Blackman Moving Average (BLMA)", "BLMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Bessel-Weighted Moving Average (BWMA)", "BWMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Convolution Moving Average (CONV)", "CONV", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Cubic Regression Moving Average (CRMA)", "CRMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Double Weighted Moving Average (DWMA)", "DWMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Fibonacci Weighted Moving Average (FWMA)", "FWMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Gaussian-Weighted Moving Average (GWMA)", "GWMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Hamming Moving Average (HAMMA)", "HAMMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Hanning Moving Average (HANMA)", "HANMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Henderson Moving Average (HEND)", "HEND", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Hull Moving Average (HMA)", "HMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Integral of Linear Regression Slope (ILRS)", "ILRS", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Kaiser Window Moving Average (KAISER)", "KAISER", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Lanczos (Sinc) Window Moving Average (LANCZOS)", "LANCZOS", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Least Squares Moving Average (LSMA)", "LSMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Non-Lag Moving Average (NLMA)", "NLMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Nyquist Moving Average (NYQMA)", "NYQMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Parzen Window Moving Average (PARZEN)", "PARZEN", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
// Indicator algorithm (C) 2004-2024 John F. Ehlers
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Pascal Weighted Moving Average (PWMA)", "PWMA", overlay=true)
|
||||
|
||||
@@ -132,7 +132,7 @@ public sealed class Rwma : ITValuePublisher
|
||||
{
|
||||
double c = _closeBuffer[i];
|
||||
double r = _rangeBuffer[i];
|
||||
sumCR += c * r;
|
||||
sumCR = Math.FusedMultiplyAdd(c, r, sumCR);
|
||||
sumR += r;
|
||||
}
|
||||
|
||||
@@ -222,12 +222,12 @@ public sealed class Rwma : ITValuePublisher
|
||||
|
||||
if (s.Count >= _period)
|
||||
{
|
||||
s.SumCR -= oldClose * oldRange;
|
||||
s.SumCR = Math.FusedMultiplyAdd(-oldClose, oldRange, s.SumCR);
|
||||
s.SumR -= oldRange;
|
||||
}
|
||||
|
||||
// Add new values
|
||||
s.SumCR += currentClose * currentRange;
|
||||
s.SumCR = Math.FusedMultiplyAdd(currentClose, currentRange, s.SumCR);
|
||||
s.SumR += currentRange;
|
||||
|
||||
// Store in circular buffer
|
||||
@@ -421,12 +421,12 @@ public sealed class Rwma : ITValuePublisher
|
||||
|
||||
if (count >= period)
|
||||
{
|
||||
sumCR -= oldClose * oldRange;
|
||||
sumCR = Math.FusedMultiplyAdd(-oldClose, oldRange, sumCR);
|
||||
sumR -= oldRange;
|
||||
}
|
||||
|
||||
// Add new values
|
||||
sumCR += currentClose * currentRange;
|
||||
sumCR = Math.FusedMultiplyAdd(currentClose, currentRange, sumCR);
|
||||
sumR += currentRange;
|
||||
|
||||
// Store in circular buffer
|
||||
@@ -449,7 +449,7 @@ public sealed class Rwma : ITValuePublisher
|
||||
sumR = 0;
|
||||
for (int j = 0; j < period; j++)
|
||||
{
|
||||
sumCR += closeBuffer[j] * rangeBuffer[j];
|
||||
sumCR = Math.FusedMultiplyAdd(closeBuffer[j], rangeBuffer[j], sumCR);
|
||||
sumR += rangeBuffer[j];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Savitzky-Golay Moving Average (SGMA)", "SGMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Sine-weighted Moving Average (SINEMA)", "SINEMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Simple Moving Average (SMA)", "SMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Triangular Moving Average (TRIMA)", "TRIMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Weighted Moving Average (WMA)", "WMA", overlay=true)
|
||||
|
||||
Reference in New Issue
Block a user