mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 18:48:05 +00:00
readme
This commit is contained in:
+4
-4
@@ -1,18 +1,18 @@
|
|||||||
# QuanTAlib - quantitative technical indicators for Quantower and other C#-based trading platorms
|
# QuanTAlib - quantitative technical indicators for Quantower and other C#-based trading platorms
|
||||||
|
|
||||||

|
|
||||||
[](https://sonarcloud.io/summary/overall?id=mihakralj_QuanTAlib)
|
[](https://sonarcloud.io/summary/overall?id=mihakralj_QuanTAlib)
|
||||||
[](https://app.codacy.com/gh/mihakralj/QuanTAlib/dashboard)
|
[](https://app.codacy.com/gh/mihakralj/QuanTAlib/dashboard)
|
||||||
[](https://codecov.io/gh/mihakralj/QuanTAlib)
|
[](https://codecov.io/gh/mihakralj/QuanTAlib)
|
||||||
[](https://sonarcloud.io/summary/new_code?id=mihakralj_QuanTAlib)
|
[](https://sonarcloud.io/summary/new_code?id=mihakralj_QuanTAlib)
|
||||||
|
[](https://www.codefactor.io/repository/github/mihakralj/quantalib/overview/main)
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/QuanTAlib/)
|
[](https://www.nuget.org/packages/QuanTAlib/)
|
||||||
|

|
||||||
[](https://www.nuget.org/packages/QuanTAlib/)
|
[](https://www.nuget.org/packages/QuanTAlib/)
|
||||||
[](https://github.com/mihakralj/QuanTAlib/watchers)
|
[](https://github.com/mihakralj/QuanTAlib/watchers)
|
||||||
|
|
||||||
[](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
|
[
|
||||||
[](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
|
|
||||||
[](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48)
|
|
||||||
[](Docs/LICENSE)
|
[](Docs/LICENSE)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
namespace QuanTAlib;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
/* <summary>
|
||||||
|
ZL: Zero Lag
|
||||||
|
Data is de-lagged by removing the data from “lag” days ago, thus removing
|
||||||
|
(or attempting to) the cumulative effect of the moving average.
|
||||||
|
|
||||||
|
Calculation:
|
||||||
|
Lag = (Period-1)/2
|
||||||
|
ZL = Data + (Data - Data(Lag days ago) )
|
||||||
|
|
||||||
|
Sources:
|
||||||
|
https://mudrex.com/blog/zero-lag-ema-trading-strategy/
|
||||||
|
|
||||||
|
</summary> */
|
||||||
|
|
||||||
|
public class ZL_Series : Single_TSeries_Indicator
|
||||||
|
{
|
||||||
|
public ZL_Series(TSeries source, int period, bool useNaN = false) : base(source, period:period, useNaN:useNaN) {
|
||||||
|
if (this._data.Count > 0) { base.Add(this._data); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Add((DateTime t, double v) TValue, bool update)
|
||||||
|
{
|
||||||
|
int _lag = (int)((_p-1) * 0.5);
|
||||||
|
_lag = (_data.Count-_lag < 0) ? 0 : _data.Count-_lag;
|
||||||
|
|
||||||
|
double _zl = TValue.v + (TValue.v - _data[_lag].v);
|
||||||
|
|
||||||
|
var ret = (TValue.t, (base.Count==0 && base._NaN) ? double.NaN : _zl );
|
||||||
|
base.Add(ret, update);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -51,11 +51,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PackageIcon>images\icon.png</PackageIcon>
|
<PackageIcon>QuanTAlib2.png</PackageIcon>
|
||||||
<PackageIconUrl>https://raw.githubusercontent.com/mihakralj/QuanTAlib/main/.github/QuanTAlib2.png</PackageIconUrl>
|
<PackageIconUrl>https://raw.githubusercontent.com/mihakralj/QuanTAlib/main/.github/QuanTAlib2.png</PackageIconUrl>
|
||||||
|
<SignAssembly>False</SignAssembly>
|
||||||
|
<AssemblyOriginatorKeyFile>C:\Dropbox\SSH keys\Certum\MihaKralj_OpenSource.pem</AssemblyOriginatorKeyFile>
|
||||||
|
<DelaySign>True</DelaySign>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\.github\QuanTAlib2.png" Pack="true" Visible="false" PackagePath="images\icon.png" />
|
<None Include="..\.github\QuanTAlib2.png" Pack="true" Visible="false" PackagePath="\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user