From 6bc622fe229338ada0f03521a8d7f9d7e4ac6502 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 16 Feb 2023 11:18:59 +0800 Subject: [PATCH] fix: Candle Properties not accessible (#1027) --- src/_common/Candles/Models.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/_common/Candles/Models.cs b/src/_common/Candles/Models.cs index 7de0260f7..f8faeb996 100644 --- a/src/_common/Candles/Models.cs +++ b/src/_common/Candles/Models.cs @@ -6,19 +6,19 @@ namespace Skender.Stock.Indicators; public class CandleProperties : Quote { // raw sizes - internal decimal? Size => High - Low; - internal decimal? Body => (Open > Close) ? (Open - Close) : (Close - Open); - internal decimal? UpperWick => High - (Open > Close ? Open : Close); - internal decimal? LowerWick => (Open > Close ? Close : Open) - Low; + public decimal? Size => High - Low; + public decimal? Body => (Open > Close) ? (Open - Close) : (Close - Open); + public decimal? UpperWick => High - (Open > Close ? Open : Close); + public decimal? LowerWick => (Open > Close ? Close : Open) - Low; // percent sizes - internal double? BodyPct => (Size != 0) ? (double?)(Body / Size) : 1; - internal double? UpperWickPct => (Size != 0) ? (double?)(UpperWick / Size) : 1; - internal double? LowerWickPct => (Size != 0) ? (double?)(LowerWick / Size) : 1; + public double? BodyPct => (Size != 0) ? (double?)(Body / Size) : 1; + public double? UpperWickPct => (Size != 0) ? (double?)(UpperWick / Size) : 1; + public double? LowerWickPct => (Size != 0) ? (double?)(LowerWick / Size) : 1; // directional info - internal bool IsBullish => Close > Open; - internal bool IsBearish => Close < Open; + public bool IsBullish => Close > Open; + public bool IsBearish => Close < Open; } [Serializable] @@ -33,4 +33,4 @@ public CandleResult(DateTime date) public decimal? Price { get; set; } public Match Match { get; set; } public CandleProperties Candle { get; set; } -} \ No newline at end of file +}