Skip to content

Commit

Permalink
rename Candle class (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender authored Mar 6, 2022
1 parent 457cdb2 commit 57cd86d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/_includes/candle-result.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
| `Date` | DateTime | Date
| `Price` | decimal | Price of the most relevant OHLC candle element when a signal is present
| `Signal` | [Signal]({{site.baseurl}}/guide/#signal) | Generated signal type
| `Candle` | [Candle]({{site.baseurl}}/guide/#candle) | Candle properties
| `Candle` | [CandleProperties]({{site.baseurl}}/guide/#candle) | Candle properties
2 changes: 1 addition & 1 deletion docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ When a candlestick pattern is recognized, it produces a signal. In some cases,

### Candle

The `Candle` class is an extended version of `Quote`, and contains additional calculated properties.
The `CandleProperties` class is an extended version of `Quote`, and contains additional calculated properties.

| name | type | notes
| -- |-- |--
Expand Down
2 changes: 1 addition & 1 deletion src/_common/Candles/Candles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal static List<CandleResult> ConvertToCandleResults<TQuote>(
{
Date = x.Date,
Signal = Signal.None,
Candle = new Candle
Candle = new CandleProperties
{
Date = x.Date,
Open = x.Open,
Expand Down
4 changes: 2 additions & 2 deletions src/_common/Candles/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators;
// CANDLESTICK MODELS

[Serializable]
public class Candle : Quote
public class CandleProperties : Quote
{
// raw sizes
internal decimal Size => High - Low;
Expand All @@ -27,5 +27,5 @@ public class CandleResult : ResultBase
{
public decimal? Price { get; set; }
public Signal Signal { get; set; }
public Candle Candle { get; set; }
public CandleProperties Candle { get; set; }
}

0 comments on commit 57cd86d

Please sign in to comment.