ILNumerics Ultimate VS

Candlestick Constructor (InArraySingle, InArraySingle, InArraySingle, Single, NullableColor, NullableColor, NullableColor, NullableColor, NullableColor, NullableColor, Int32, Int32, Int32, Int32, DashStyle, DashStyle, DashStyle, DashStyle, Object)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Constructor defines Candlestick on the basis of the row vector X, the arrays Shadow and Body

[ILNumerics Drawing2 Toolbox]

Namespace:  ILNumerics.Drawing.Plotting
Assembly:  ILNumerics.Toolboxes.Drawing2 (in ILNumerics.Toolboxes.Drawing2.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public Candlestick(
	InArray<float> X,
	InArray<float> Shadow,
	InArray<float> Body,
	float bodyWidth = 0,05f,
	Nullable<Color> bullShadowColor = null,
	Nullable<Color> bearShadowColor = null,
	Nullable<Color> bullFrameColor = null,
	Nullable<Color> bearFrameColor = null,
	Nullable<Color> bullFillColor = null,
	Nullable<Color> bearFillColor = null,
	int bullShadowWidth = 2,
	int bearShadowWidth = 2,
	int bullFrameWidth = 2,
	int bearFrameWidth = 2,
	DashStyle bullShadowStyle = DashStyle.Solid,
	DashStyle bearShadowStyle = DashStyle.Solid,
	DashStyle bullFrameStyle = DashStyle.Solid,
	DashStyle bearFrameStyle = DashStyle.Solid,
	Object tag = null
)

Parameters

X
Type: ILNumericsInArraySingle
Row vector that usually contains periods.
Shadow
Type: ILNumericsInArraySingle
(2 x n) Array that contains lowest and highest price for each period.
Body
Type: ILNumericsInArraySingle
(2 x n) Array that contains opening and closing price for each period.
bodyWidth (Optional)
Type: SystemSingle
[optional] Width of candlestick bodies, default: 0.05.
bullShadowColor (Optional)
Type: SystemNullableColor
[optional] Line color of bull candlestick shadows, default: Black.
bearShadowColor (Optional)
Type: SystemNullableColor
[optional] Line color of bear candlestick shadows, default: Black.
bullFrameColor (Optional)
Type: SystemNullableColor
[optional] Line color of bull candlestick frames, default: Black.
bearFrameColor (Optional)
Type: SystemNullableColor
[optional] Line color of bear candlestick frames, default: Black.
bullFillColor (Optional)
Type: SystemNullableColor
[optional] Color of bull candlestick fill areas, default: White.
bearFillColor (Optional)
Type: SystemNullableColor
[optional] Color of bear candlestick fill areas, default: Black.
bullShadowWidth (Optional)
Type: SystemInt32
[optional] Line width of bull candlestick shadow, default: 2px.
bearShadowWidth (Optional)
Type: SystemInt32
[optional] Line width of bear candlestick shadow, default: 2px.
bullFrameWidth (Optional)
Type: SystemInt32
[optional] Line width of bull candlestick frame, default: 2px.
bearFrameWidth (Optional)
Type: SystemInt32
[optional] Line with of bear candlestick frame, default: 2px.
bullShadowStyle (Optional)
Type: ILNumerics.DrawingDashStyle
[optional] Line style of bull candlestick shadow, default: Solid.
bearShadowStyle (Optional)
Type: ILNumerics.DrawingDashStyle
[optional] Line style of bear candlestick shadow, default: Solid.
bullFrameStyle (Optional)
Type: ILNumerics.DrawingDashStyle
[optional] Line Style of bull candlestick frame, default: Solid.
bearFrameStyle (Optional)
Type: ILNumerics.DrawingDashStyle
[optional] Line Style of bear candlestick frame, default: Solid.
tag (Optional)
Type: SystemObject
[optional] Identifies Candlestick objects in the scene graph.
Exceptions

ExceptionCondition
ArgumentExceptionIf input argument Shadow is not a (2 x n) array.
ArgumentExceptionIf input argument Body is not a (2 x n) array.
Remarks

[ILNumerics Drawing2 Toolbox]

Examples

Creation of an Candlestick object

private void ilPanel1_Load(object sender, EventArgs e) {
// Create Data
int n = 10;
Array<float> X = linspace<float>(0, 9, n);
Array<float> Shadow = ones<float>(1, n);
Shadow[1,full] = ones<float>(1, n) + 4;
Array<float> Body = new float[,] { { 1, 2, 3, 2, 1, 4, 5, 3, 4, 5 }, { 2, 1, 2, 4, 5, 3, 3, 4, 1, 5 } };
var myPlotCube = ilPanel1.Scene.Add(new PlotCube());
var myCandlestick = myPlotCube.Add(new Candlestick(X, Shadow, Body.T, bodyWidth: 0.1f,
bullFillColor: Color.Olive, bearFillColor: Color.DarkRed,
bullFrameStyle: DashStyle.Dashed, bearFrameStyle: DashStyle.Dashed,
bullShadowStyle: DashStyle.Dashed, bearShadowStyle: DashStyle.Dashed));
}
See Also

Reference