mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-20 11:38: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("Accumulation/Distribution Line (ADL)", "ADL", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Chaikin A/D Oscillator (ADOSC)", "ADOSC", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("AOBV - Archer On-Balance Volume (AOBV)", "AOBV", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Chaikin Money Flow (CMF)", "CMF", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Elder's Force Index (EFI)", "EFI", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Ease of Movement (EOM)", "EOM", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Elastic Volume Weighted Moving Average (EVWMA)", "EVWMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Intraday Intensity Index (III)", "III", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Klinger Volume Oscillator (KVO)", "KVO", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Money Flow Index (MFI)", "MFI", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Negative Volume Index (NVI)", "NVI", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("On Balance Volume (OBV)", "OBV", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Price Volume Divergence (PVD)", "PVD", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Positive Volume Index (PVI)", "PVI", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Percentage Volume Oscillator (PVO)", "PVO", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Price Volume Rank (PVR)", "PVR", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Price Volume Trend (PVT)", "PVT", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Trade Volume Index (TVI)", "TVI", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Time Weighted Average Price (TWAP)", "TWAP", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Volume Accumulation (VA)", "VA", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Volume Force (VF)", "VF", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Volume Oscillator (VO)", "VO", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Volume Rate of Change (VROC)", "VROC", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Volume Weighted Accumulation/Distribution (VWAD)", "VWAD", overlay=false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Volume Weighted Average Price (VWAP)", "VWAP", overlay=true)
|
||||
|
||||
@@ -135,7 +135,7 @@ public sealed class Vwma : ITValuePublisher
|
||||
double v = _volBuffer[i];
|
||||
if (v > 0)
|
||||
{
|
||||
sumPV += p * v;
|
||||
sumPV = Math.FusedMultiplyAdd(p, v, sumPV);
|
||||
sumVol += v;
|
||||
}
|
||||
}
|
||||
@@ -224,14 +224,14 @@ public sealed class Vwma : ITValuePublisher
|
||||
|
||||
if (s.Count >= _period && oldVol > 0)
|
||||
{
|
||||
s.SumPV -= oldPrice * oldVol;
|
||||
s.SumPV = Math.FusedMultiplyAdd(-oldPrice, oldVol, s.SumPV);
|
||||
s.SumVol -= oldVol;
|
||||
}
|
||||
|
||||
// Add new values
|
||||
if (currentVol > 0)
|
||||
{
|
||||
s.SumPV += currentPrice * currentVol;
|
||||
s.SumPV = Math.FusedMultiplyAdd(currentPrice, currentVol, s.SumPV);
|
||||
s.SumVol += currentVol;
|
||||
}
|
||||
|
||||
@@ -437,14 +437,14 @@ public sealed class Vwma : ITValuePublisher
|
||||
|
||||
if (count >= period && oldVol > 0)
|
||||
{
|
||||
sumPV -= oldPrice * oldVol;
|
||||
sumPV = Math.FusedMultiplyAdd(-oldPrice, oldVol, sumPV);
|
||||
sumVol -= oldVol;
|
||||
}
|
||||
|
||||
// Add new values
|
||||
if (currentVol > 0)
|
||||
{
|
||||
sumPV += currentPrice * currentVol;
|
||||
sumPV = Math.FusedMultiplyAdd(currentPrice, currentVol, sumPV);
|
||||
sumVol += currentVol;
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ public sealed class Vwma : ITValuePublisher
|
||||
double vj = volBuffer[j];
|
||||
if (vj > 0)
|
||||
{
|
||||
sumPV += pj * vj;
|
||||
sumPV = Math.FusedMultiplyAdd(pj, vj, sumPV);
|
||||
sumVol += vj;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Volume Weighted Moving Average (VWMA)", "VWMA", overlay=true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The MIT License (MIT)
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
// © mihakralj
|
||||
//@version=6
|
||||
indicator("Williams Accumulation/Distribution (WAD)", "WAD", overlay=false)
|
||||
|
||||
Reference in New Issue
Block a user