CandleStickMark
[Serializable]public class CandleStickMark : ChartMark, IChartMark, IChartContentRepresents a candlestick mark for financial charts. Composed of:
- A body (BarMark) showing open-close range
- A wick (RuleMark) showing high-low range
Usage: var candle = new CandleStickMark( x: 0, open: 100, high: 110, low: 95, close: 105 ); chart.AddMarks(candle.GetMarks());
Properties
Section titled “Properties”
MarkType
Section titled “MarkType”public override ChartType MarkType { get; }No description is available for this member.
Returns
ChartGuru.ChartType — No return description is available.
public float X { get; set; }X Position (typically represents time/date index).
Returns
System.Single — No return description is available.
public float Open { get; set; }Opening price.
Returns
System.Single — No return description is available.
public float High { get; set; }Highest price.
Returns
System.Single — No return description is available.
public float Low { get; set; }Lowest price.
Returns
System.Single — No return description is available.
public float Close { get; set; }Closing price.
Returns
System.Single — No return description is available.
WickLineWidth
Section titled “WickLineWidth”public float WickLineWidth { get; set; }Width of the wick line in pixels.
Returns
System.Single — No return description is available.
BodyWidthRatio
Section titled “BodyWidthRatio”public float BodyWidthRatio { get; set; }Width ratio of the body relative to available slot width.
Returns
System.Single — No return description is available.
BullishColor
Section titled “BullishColor”public Color BullishColor { get; set; }Color for bullish candles (close > open).
Returns
UnityEngine.Color — No return description is available.
BearishColor
Section titled “BearishColor”public Color BearishColor { get; set; }No description is available for this member.
Returns
UnityEngine.Color — No return description is available.
CornerRadiusValue
Section titled “CornerRadiusValue”public float CornerRadiusValue { get; set; }Corner radius for the body.
Returns
System.Single — No return description is available.
IsBullish
Section titled “IsBullish”public bool IsBullish { get; }Whether this is a bullish candle (close >= open).
Returns
System.Boolean — No return description is available.
CurrentColor
Section titled “CurrentColor”public Color CurrentColor { get; }The current color based on bullish/bearish state.
Returns
UnityEngine.Color — No return description is available.
BodyMin
Section titled “BodyMin”public float BodyMin { get; }No description is available for this member.
Returns
System.Single — No return description is available.
BodyMax
Section titled “BodyMax”public float BodyMax { get; }No description is available for this member.
Returns
System.Single — No return description is available.
WickMin
Section titled “WickMin”public float WickMin { get; }No description is available for this member.
Returns
System.Single — No return description is available.
WickMax
Section titled “WickMax”public float WickMax { get; }No description is available for this member.
Returns
System.Single — No return description is available.
Constructors
Section titled “Constructors”
CandleStickMark()
Section titled “CandleStickMark()”public CandleStickMark()No description is available for this member.
CandleStickMark(float, float, float, float, float)
Section titled “CandleStickMark(float, float, float, float, float)”public CandleStickMark(float x, float open, float high, float low, float close)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
x |
System.Single | |
open |
System.Single | |
high |
System.Single | |
low |
System.Single | |
close |
System.Single |
Methods
Section titled “Methods”
FromOHLC(float, float, float, float, float)
Section titled “FromOHLC(float, float, float, float, float)”public static CandleStickMark FromOHLC(float x, float open, float high, float low, float close)Creates a candlestick from OHLC data.
Parameters
| Name | Type | Description |
|---|---|---|
x |
System.Single | |
open |
System.Single | |
high |
System.Single | |
low |
System.Single | |
close |
System.Single |
Returns
ChartGuru.CandleStickMark — No return description is available.
Colors(Color, Color)
Section titled “Colors(Color, Color)”public CandleStickMark Colors(Color bullish, Color bearish)Sets the bullish and bearish colors.
Parameters
| Name | Type | Description |
|---|---|---|
bullish |
UnityEngine.Color | |
bearish |
UnityEngine.Color |
Returns
ChartGuru.CandleStickMark — No return description is available.
BodyWidth(float)
Section titled “BodyWidth(float)”public CandleStickMark BodyWidth(float ratio)Sets the body width ratio.
Parameters
| Name | Type | Description |
|---|---|---|
ratio |
System.Single |
Returns
ChartGuru.CandleStickMark — No return description is available.
WickWidth(float)
Section titled “WickWidth(float)”public CandleStickMark WickWidth(float width)Sets the wick line width.
Parameters
| Name | Type | Description |
|---|---|---|
width |
System.Single |
Returns
ChartGuru.CandleStickMark — No return description is available.
CornerRadius(float)
Section titled “CornerRadius(float)”public CandleStickMark CornerRadius(float radius)Sets the corner radius for the body.
Parameters
| Name | Type | Description |
|---|---|---|
radius |
System.Single |
Returns
ChartGuru.CandleStickMark — No return description is available.
GetMarks()
Section titled “GetMarks()”public IEnumerable<IChartMark> GetMarks()Expands the candlestick into its component marks:
- A vertical RuleMark for the wick (high-low range)
- A range BarMark for the body (open-close range)
Returns
System.Collections.Generic.IEnumerable{ChartGuru.IChartMark} — No return description is available.
GetBodyMark()
Section titled “GetBodyMark()”public BarMark GetBodyMark()Gets just the body mark for custom rendering.
Returns
ChartGuru.BarMark — No return description is available.
GetWickMark()
Section titled “GetWickMark()”public RuleMark GetWickMark()Gets just the wick mark for custom rendering.
Returns
ChartGuru.RuleMark — No return description is available.
GetMorphTargets(ChartType, Rect)
Section titled “GetMorphTargets(ChartType, Rect)”public override (Vector2 source, Vector2 target) GetMorphTargets(ChartType targetType, Rect plotArea)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
targetType |
ChartGuru.ChartType | |
plotArea |
UnityEngine.Rect |
Returns
System.ValueTuple{UnityEngine.Vector2,UnityEngine.Vector2} — No return description is available.
Clone()
Section titled “Clone()”public override IChartMark Clone()No description is available for this member.
Returns
ChartGuru.IChartMark — No return description is available.