Skip to content

CandleStickMark

ClassChartGuruChartGuru
[Serializable]
public class CandleStickMark : ChartMark, IChartMark, IChartContent

Represents 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());

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.

public float WickLineWidth { get; set; }

Width of the wick line in pixels.

Returns

System.Single — No return description is available.

public float BodyWidthRatio { get; set; }

Width ratio of the body relative to available slot width.

Returns

System.Single — No return description is available.

public Color BullishColor { get; set; }

Color for bullish candles (close > open).

Returns

UnityEngine.Color — No return description is available.

public Color BearishColor { get; set; }

No description is available for this member.

Returns

UnityEngine.Color — No return description is available.

public float CornerRadiusValue { get; set; }

Corner radius for the body.

Returns

System.Single — No return description is available.

public bool IsBullish { get; }

Whether this is a bullish candle (close >= open).

Returns

System.Boolean — No return description is available.

public Color CurrentColor { get; }

The current color based on bullish/bearish state.

Returns

UnityEngine.Color — No return description is available.

public float BodyMin { get; }

No description is available for this member.

Returns

System.Single — No return description is available.

public float BodyMax { get; }

No description is available for this member.

Returns

System.Single — No return description is available.

public float WickMin { get; }

No description is available for this member.

Returns

System.Single — No return description is available.

public float WickMax { get; }

No description is available for this member.

Returns

System.Single — No return description is available.

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

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.

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.

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.

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.

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.

public IEnumerable<IChartMark> GetMarks()

Expands the candlestick into its component marks:

  1. A vertical RuleMark for the wick (high-low range)
  2. A range BarMark for the body (open-close range)

Returns

System.Collections.Generic.IEnumerable{ChartGuru.IChartMark} — No return description is available.

public BarMark GetBodyMark()

Gets just the body mark for custom rendering.

Returns

ChartGuru.BarMark — No return description is available.

public RuleMark GetWickMark()

Gets just the wick mark for custom rendering.

Returns

ChartGuru.RuleMark — No return description is available.

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.

public override IChartMark Clone()

No description is available for this member.

Returns

ChartGuru.IChartMark — No return description is available.