feat(dotnet): migrate core formulas, deploy tools, and blazor admin web app to .NET 10
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-core (pull_request) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-core (pull_request) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Has been cancelled
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace QuantEngine.Core.Domain
|
||||
{
|
||||
public class AntiChasingResult
|
||||
{
|
||||
public string AntiChasingVerdict { get; set; } = "CLEAR";
|
||||
public string AntiChasingVelocityStatus { get; set; } = "PASS";
|
||||
public double Velocity1dInput { get; set; }
|
||||
}
|
||||
|
||||
public static class AntiChasingCalculator
|
||||
{
|
||||
public static AntiChasingResult ComputeAntiChasing(double velocity1d)
|
||||
{
|
||||
string verdict;
|
||||
string status;
|
||||
|
||||
if (velocity1d >= 3.0)
|
||||
{
|
||||
verdict = "BLOCK_CHASE";
|
||||
status = "BLOCKED";
|
||||
}
|
||||
else if (velocity1d >= 1.5)
|
||||
{
|
||||
verdict = "PULLBACK_WAIT";
|
||||
status = "WAIT";
|
||||
}
|
||||
else
|
||||
{
|
||||
verdict = "CLEAR";
|
||||
status = "PASS";
|
||||
}
|
||||
|
||||
return new AntiChasingResult
|
||||
{
|
||||
AntiChasingVerdict = verdict,
|
||||
AntiChasingVelocityStatus = status,
|
||||
Velocity1dInput = Math.Round(velocity1d, 4)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user