mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-08 05:57:43 +00:00
Update automatic release tag to latest
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
mode: ContinuousDeployment
|
||||
branches:
|
||||
main:
|
||||
regex: ^main$
|
||||
is-release-branch: true
|
||||
is-mainline: true
|
||||
prevent-increment-of-merged-branch-version: true
|
||||
track-merge-target: false
|
||||
increment: inherit
|
||||
develop:
|
||||
regex: ^dev$
|
||||
is-release-branch: false
|
||||
prevent-increment-of-merged-branch-version: false
|
||||
track-merge-target: true
|
||||
ignore:
|
||||
sha: []
|
||||
major-version-bump-message: '\+semver:\s?(feature|major)'
|
||||
minor-version-bump-message: '\+semver:\s?(new|update|minor)'
|
||||
no-bump-message: '\+semver:\s?(skip|none|fix)'
|
||||
|
||||
@@ -28,6 +28,19 @@ jobs:
|
||||
with:
|
||||
java-version: 1.11
|
||||
|
||||
- name: Install GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v0
|
||||
with:
|
||||
versionSpec: '6.x'
|
||||
includePrerelease: true
|
||||
- name: Determine Version
|
||||
uses: gittools/actions/gitversion/execute@v0
|
||||
with:
|
||||
useConfigFile: true
|
||||
configFilePath: .\.github\GitVersion.yml
|
||||
additionalArguments: '/verbosity Diagnostic'
|
||||
|
||||
|
||||
- name: Install JetBrains
|
||||
run: dotnet tool install JetBrains.dotCover.GlobalTool --global
|
||||
- name: Install Sonar Scanner
|
||||
@@ -39,7 +52,6 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
#run: dotnet sonarscanner begin /o:"mihakralj" /k:"mihakralj_QuanTAlib" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths="./coverage.xml"
|
||||
run: dotnet sonarscanner begin /o:"mihakralj" /k:"mihakralj_QuanTAlib"
|
||||
/d:sonar.login="${{ secrets.SONAR_TOKEN }}"
|
||||
/d:sonar.host.url="https://sonarcloud.io"
|
||||
@@ -68,18 +80,16 @@ jobs:
|
||||
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
|
||||
|
||||
- name: Codacy coverage reporter
|
||||
if: ${{ github.ref == 'refs/heads/dev' }}
|
||||
uses: codacy/codacy-coverage-reporter-action@v1
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
coverage-reports: ./coveragereport.xml
|
||||
|
||||
- name: Release
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "latest"
|
||||
automatic_release_tag: latest
|
||||
prerelease: true
|
||||
title: "Latest Build"
|
||||
files: |
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
namespace QuanTAlib;
|
||||
using System;
|
||||
|
||||
/* <summary>
|
||||
OVER - Generates +1 if A is above B, -1 if A is below B and 0 if A=B
|
||||
|
||||
Remarks:
|
||||
OVER.Cross generates 1 when A breaks B from below and -1 when A breaks B from above
|
||||
|
||||
</summary> */
|
||||
|
||||
public class OVER_Series : Pair_TSeries_Indicator {
|
||||
public TSeries Cross = new();
|
||||
private double _previous = double.NaN;
|
||||
public OVER_Series(TSeries d1, TSeries d2) : base(d1, d2) {
|
||||
if (base._d1.Count > 0 && base._d2.Count > 0) { for (int i = 0; i < base._d1.Count; i++) { this.Add(base._d1[i], base._d2[i], false); } }
|
||||
}
|
||||
public OVER_Series(TSeries d1, double dd2) : base(d1, dd2) {
|
||||
if (base._d1.Count > 0) { for (int i = 0; i < base._d1.Count; i++) { this.Add(base._d1[i], (base._d1[i].t, dd2), false); } }
|
||||
}
|
||||
public OVER_Series(double dd1, TSeries d2) : base(dd1, d2) {
|
||||
if (base._d2.Count > 0) { for (int i = 0; i < base._d2.Count; i++) { this.Add((base._d2[i].t, dd1), base._d2[i], false); } }
|
||||
}
|
||||
|
||||
public override void Add((System.DateTime t, double v) TValue1, (System.DateTime t, double v) TValue2, bool update) {
|
||||
(System.DateTime t, double v) over = ((TValue1.t > TValue2.t) ? TValue1.t : TValue2.t, TValue1.v > TValue2.v ? 1 : TValue1.v < TValue2.v ? -1 : 0);
|
||||
if (update) { this.Cross[^1] = over; }
|
||||
else { this.Cross.Add(over); }
|
||||
|
||||
(System.DateTime t, double v) result = ((TValue1.t > TValue2.t) ? TValue1.t : TValue2.t,
|
||||
((_previous == over.v) || (_previous != 0) || Double.IsNaN(_previous)) ? 0 : (_previous < over.v) ? 1 : -1);
|
||||
_previous = over.v;
|
||||
|
||||
if (update) { base[^1] = result; }
|
||||
else { base.Add(result); }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Title>QuanTAlib</Title>
|
||||
<Version>0.1.32</Version>
|
||||
<Version>$(GitVersion_NuGetVersionV2)</Version>
|
||||
<Product>Library of TA Calculations, Charts and Strategies for Quantower</Product>
|
||||
<Description>Quantitative Technical Analysis Library in C# for Quantower</Description>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
mode: Mainline
|
||||
branches:
|
||||
main:
|
||||
regex: ^main$
|
||||
increment: Patch
|
||||
is-mainline: true
|
||||
is-release-branch: true
|
||||
source-branches: [ 'dev' ]
|
||||
prevent-increment-of-merged-branch-version: true
|
||||
tag: ''
|
||||
dev:
|
||||
regex: ^dev$
|
||||
increment: Patch
|
||||
is-mainline: false
|
||||
is-release-branch: false
|
||||
source-branches: []
|
||||
prevent-increment-of-merged-branch-version: false
|
||||
tracks-release-branches: true
|
||||
track-merge-target: true
|
||||
tag: dev
|
||||
tag-prefix: ''
|
||||
Reference in New Issue
Block a user