DrawingObjects
​

AddChartAndrewsPitchfork()

Description

This drawing object draws an Andrew’s Pitchfork.
Information concerning its usage: - vtad.de - hvolumen-analyse.de - Godmode-Trader.de​

Usage

AddChartAndrewsPitchfork(string name, bool autoScale, int start1BarsBack, double start1Y, int start2BarsBack, double start2Y, int start3BarsBack, double start3Y, Color color, DashStyle dashStyle, int width)
AddChartAndrewsPitchfork(string name, bool autoScale, DateTime start1Time, double start1Y, DateTime start2Time, double start2Y, DateTime start3Time, double start3Y, Color color, DashStyle dashStyle, int width)

Return Value

A drawing object of the type IAndrewsPitchfork (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
start1BarsBack
Number of bars ago for start point 1 (x-axis)
start1Time
Date/time for start point 1 (x-axis)
start1Y
y-value for start point 1
start2BarsBack
Number of bars ago for start point 2 (x-axis)
start2Time
Date/time for start point 2 (x-axis)
start2Y
y-value for start point 2
start3BarsBack
Number of bars ago for start point 3 (x-axis)
start3Time
Date/time for start point 3 (x-axis)
start3Y
y-value for start point 3
color
Color of the object
dashStyle
LevelLine styles:
​
DashStyle.Dash
​
DashStyle.DashDot
​
DashStyle.DashDotDot
​
DashStyle.Dot
​
DashStyle.Solid
​
​
​
You may have to integrate: using System.Drawing.Drawing2D;

Example

// Draw the Andrew’s Pitchfork (β€œMyAPF”)
AddChartAndrewsPitchfork("MyAPF-" + ProcessingBarIndex, true, 4, Low[4], 3, High[3], 1, Low[1], Color.Black, DashStyle.Solid, 2);

AddChartArc()

Description

AddChartArc() draws a circular arc.

Usage

AddChartArc(string name, int barsBackStart, double startY, int barsBackEnd, double endY, Color color)
AddChartArc(string name, bool isAutoScale, int barsBackStart, double startY, int barsBackEnd, double endY, Color color, DashStyle dashStyle, int width)
AddChartArc(string name, bool isAutoScale, double startX, double startY,double endX,double endY, double middleX, double middleY, Color color, DashStyle dashStyle, int width, showOnTop);

Return Value

A drawing object of the type IArc (interface)

Parameter

name
A clearly identifiable name for the drawing object
IsAutoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
startX, startY
Beginning of the arch line
middleX, middleY
Top arc coordinate
endX, endY
end of the arch line
barsBackEnd
Number of bars ago for the end point
endTime
Date/time for the end point
endY
y-value for the end point
color
Color of the drawing object
dashStyle
LevelLine style:
​
DashStyle.Dash
​
DashStyle.DashDot
​
DashStyle.DashDotDot
​
DashStyle.Dot
​
DashStyle.Solid
​
​
​
You may have to integrate: using System.Drawing.Drawing2D;
width
LevelLine strength in points

Example

// AddChart a blue arc
AddChartArc("MyArc-" + ProcessingBarIndex, true, 10, 10, 0, 20, Color.Blue, DashStyle.Solid, 3);
//Add Arc
AddChartArc("test", true, first.Time, 1854, last.Time, 1854, mid.Time, 1938, Color.Black, DashStyle.Custom, 1, true);

AddChartArrowDown()

Description

AddChartArrowDown() draws an arrow pointing downwards:
Could not load image
AddChartArrowDown()

Usage

AddChartArrowDown(string name, bool autoScale, int barsAgo, double y, Color color)
AddChartArrowDown(string name, bool autoScale, DateTime time, double y, Color color)

Return Value

A drawing object of the type IArrowDown (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsAgo
Sets the preceding bar on which the arrow should be drawn (0 = current bar)
time
Date/time of the bar on which the arrow should be drawn
y
y-value for the arrow
color
Color of the drawing object

Example

// Draws a red arrow 3 ticks above the high for the current bar
AddChartArrowDown("MyArrow-" + ProcessingBarIndex, true, 0, High[0] + 3*TickSize, Color.Red);
// Draws a red arrow on a three-bar reversal pattern
if(High[2] > High[3] && High[1] > High[2] && Close[0] < Open[0])
AddChartArrowDown(ProcessingBarIndex.ToString(), true, 0, High[0] + 3*TickSize, Color.Red);

AddChartArrowLine()

Description

AddChartArrowLine() draws an arrow:
Could not load image
AddChartArrowLine()

Usage

AddChartArrowLine (string name, int barsBackStart, double startY, int barsBackEnd, double endY, Color color)
AddChartArrowLine (string name, bool autoScale, int barsBackStart, double startY, int barsBackEnd, double endY, Color color, DashStyle dashStyle, int width)
AddChartArrowLine (string name, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, DashStyle dashStyle, int width)

Return Value

A drawing object of the type IArrowLine (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsBackStart
Sets the preceding bar at which the arrow should start (0 = current bar)
startTime
Date/time of the bar at which the arrow should start
startY
y-value for the starting point of the arrow
barsBackEnd
Sets the preceding bar at which the arrow should end (0 = current bar)
endTime
Date/time at which the arrow should end
endY
y-value at which the arrow should end
color
Color of the drawing object
dashStyle
LevelLine style:
​
DashStyle.Dash
​
DashStyle.DashDot
​
DashStyle.DashDotDot
​
DashStyle.Dot
​
DashStyle.Solid
​
​
​
You may have to integrate: using System.Drawing.Drawing2D;
width
LevelLine strength in points

Example

// Draws a black arrow
AddChartArrowLine("MyArrow-" + ProcessingBarIndex, false, 10, 10, 0, 5, Color.Black, DashStyle.Solid, 4);

AddChartArrowUp()

Description

AddChartArowUp() draws an arrow pointing upwards:
Could not load image
AddChartArrowUp()

Usage

AddChartArrowUp(string name, bool autoScale, int barsAgo, double y, Color color)
AddChartArrowUp(string name, bool autoScale, DateTime time, double y, Color color)

Return Value

A drawing object of the type IArrowUp (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsAgo
Sets the preceding bar on which the arrow should be drawn (0 = current bar)
time
Date/time at which the arrow should be drawn
y
y-value for the arrow
color
Color of the drawing object

Example

// Draws a green arrow for the current bar 3 ticks below the low
AddChartArrowUp("MyArrow-" + ProcessingBarIndex, true, 0, Low[0] - 3*TickSize, Color.Green);

AddChartDiamond()

Description

AddChartDiamond() draws a diamond:
Could not load image
AddChartDiamond()

Usage

AddChartDiamond(string name, bool autoScale, int barsAgo, double y, Color color)
AddChartDiamond(string name, bool autoScale, DateTime time, double y, Color color)

Return Value

A drawing object of the type IDiamond (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsAgo
Defines the preceding bar on which the diamond should be drawn
time
Date/time of the bar on which the diamond should be drawn
y
y-value on which the diamond should be drawn
color
Color of the drawing object

Example

// Draws a light blue diamond for the current bar 5 ticks below the low
AddChartDiamond("MyDiamond-" + ProcessingBarIndex, true, 0, Low[0] - 5*TickSize, Color.SteelBlue);

AddChartDot()

Description

AddChartDot() draws a dot:
Could not load image
AddChartDot()

Usage

AddChartDot(string name, bool autoScale, int barsAgo, double y, Color color)
AddChartDot(string name, bool autoScale, DateTime time, double y, Color color)

Return Value

A drawing object of the type IDot (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsAgo
Defines the preceding bar on which the dot should be drawn (0 = current bar)
time
The date/time at which the dot should be drawn
y
y-value at which the dot should be drawn
color
Color of the drawing object

Example

// Draws an orange dot for the current bar 5 ticks above the high
AddChartDot("MyDot-" + ProcessingBarIndex, true, 0, High[0] + 5*TickSize, Color.Orange);

AddChartEllipse()

Description

AddChartEllipse() draws an ellipse.

Usage

AddChartEllipse(string name, int barsBackStart, double startY, int barsBackEnd, double endY, Color color)
AddChartEllipse(string name, bool autoScale, int barsBackStart, double startY, int barsBackEnd, double endY, Color color, Color areaColor, int areaOpacity)
AddChartEllipse(string name, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, Color areaColor, int areaOpacity)

Return Value

A drawing object of the type IEllipse (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsBackStart
Sets the preceding bar at which the ellipse should start
startTime
Date/time at which the ellipse should start
startY
y-value for the start of the ellipse
barsBackEnd
Sets the preceding bar at which the ellipse should end (0 = current bar)
endTime
Date/time at which the ellipse should end
endY
y-value for the end of the ellipse
color
Border color of the drawing object
areaColor
Fill color of the drawing object
areaOpacity
Transparency of the fill color value between 0 and 255 (0 = completely transparent , 255 = completely opaque)

Example

// Draws a yellow ellipse from the current bar to 5 bars ago
AddChartEllipse("MyEllipse-" + ProcessingBarIndex, true, 5, High[5], 0, Close[0], Color.Yellow, Color.Yellow, 1);

AddChartExtendedLine()

Description

AddChartExtendedLine() draws a line with an infinite end point.

Usage

AddChartExtendedLine(string name, int barsBackStart, double startY, int barsBackEnd, double endY, Color color)
AddChartExtendedLine(string name, bool autoScale, int barsBackStart, double startY, int barsBackEnd, double endY, Color color, DashStyle dashStyle, int width)
AddChartExtendedLine(string name, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, DashStyle dashStyle, int width)

Return Value

A drawing object of the type IExtendedLine (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsBackStart
Number of bars ago for the start point
startTime
Date/time for the start point
startY
y-value for the start point
barsBackEnd
Number of bars ago for the second point (a true end point does not exist; the line extends to infinity)
endTime
Date/time for the end point
endY
y-value for the end point
color
Color of the drawing object
dashStyle
LevelLine styl :
​
DashStyle.Dash
​
DashStyle.DashDot
​
DashStyle.DashDotDot
​
DashStyle.Dot
​
DashStyle.Solid
​
​
​
You may have to integrate: using System.Drawing.Drawing2D;
width
LevelLine strength in points

Example

// Draws a line without an end point
AddChartExtendedLine("MyExt.LevelLine-" + ProcessingBarIndex, false, 10, Close[10], 0, Close[0], Color.Black, DashStyle.Solid, 1);

AddChartFibonacciCircle()

Description

AddChartFibonacciCircle() draws a Fibonacci circle.

Usage

AddChartFibonacciCircle(string name, bool autoScale, int barsBackStart, double startY, int barsBackEnd, double endY)
AddChartFibonacciCircle(string name, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY)

Return Value

A drawing object of the type IFibonacciCircle (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsBackStart
Defines the starting point in terms of bars ago
startTime
Date/time of the bar for the starting point
startY
y-value for the start of the Fibonacci circle
barsBackEnd
Defines the end point in terms of bars ago
endTime
Date/time for the end of the Fibonacci circle
endY
y-value for the end point of the Fibonacci circle

Example

//Draws a Fibonacci circle
AddChartFibonacciCircle("MyFibCircle-" + ProcessingBarIndex, true, 5, Low[5], 0, High[0]);

AddChartFibonacciExtensions()

Description

AddChartFibonacciExtensions() draws Fibonacci extensions.

Usage

AddChartFibonacciExtensions(string name, bool autoScale, int start1BarsAgo, double start1Y, int start2BarsAgo, double start2Y, int start3BarsAgo, double start3Y)
AddChartFibonacciExtensions(string name, bool autoScale, DateTime start1Time, double start1Y, DateTime start2Time, double start2Y, DateTime start3Time, double start3Y)

Return Value

A drawing object of the type IFibonacciExtensions (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
start1BarsAgo
Number of bars ago for start point 1
start1Time
Date/time for start point 1
start1Y
y-value for start point 1
start2BarsAgo
Number of bars ago for start point 2
start2Time
Date/time for start point 2
start2Y
y-value for the start point 2
start3BarsAgo
Number of bars ago for start point 3
start3Time
Date/time for start point 3
start3Y
y-value for start point 3

Example

// Draws Fibonacci extensions
AddChartFibonacciExtensions("MyFibExt-" + ProcessingBarIndex, true, 4, Low[4], 3, High[3], 1, Low[1]);

AddChartFibonacciProjections()

Description

Draw Fibonacci Projections () sketches Fibonacci Projections.

Usage

AddChartFibonacciProjections(string name, bool autoScale, DateTime start1Time, double start1Y,DateTime start2Time, double start2Y, DateTime start3Time, double start3Y)

Return Value

A drawing object of the type IFibonacciProjections (Interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
start1Time
Date/time for start point 1
start1Y
y-value for start point 1
start2Time
Date/time for start point 2
start2Y
y-value for the start point 2
start3Time
Date/time for start point 3
start3Y
y-value for start point 3

Example

// zeichnet FibonacciProjections
AddChartFibonacciProjections("MyFibPro-" + ProcessingBarIndex, true, Low[4], 3, High[3], 1, Low[1], 2);

AddChartFibonacciRetracements()

Description

AddChartFibonacciRetracements() draws Fibonacci retracements.

Usage

AddChartFibonacciRetracements(string name, bool autoScale, int barsBackStart, double startY, int barsBackEnd, double endY)
AddChartFibonacciRetracements(string name, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY)

Return Value

A drawing object of the type IFibonacciRetracements (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsBackStart
Defines how many bars ago the starting point of the Fibonacci retracement is located
startTime
Date/time of the bar at which the Fibonacci retracement should begin
startY
y-value at which the Fibonacci retracement will begin
barsBackEnd
Defines how many bars ago the end point of the Fibonacci retracement is located
endTime
Date/time at which the Fibonacci retracement should end
endY
y-value at which the Fibonacci retracement should end

Example

// Draws Fibonnaci retracements
AddChartFibonacciRetracements("MyFibRet-" + ProcessingBarIndex, true, 10, Low[10], 0, High[0]);

AddChartFibonacciTimeExtensions()

Description

AddChartFibonacciTimeExtensions() draws Fibonacci time extensions.

Usage

AddChartFibonacciTimeExtensions(string name, int barsBackStart, double startY, int barsBackEnd, double endY)
AddChartFibonacciTimeExtensions(string name, DateTime startTime, double startY, DateTime endTime, double endY)

Return Value

A drawing object of the type IFibonacciTimeExtensions (interface)

Parameter

name
A clearly identifiable name for the drawing object
barsBackStart
Defines how many bars ago the extensions should start
startTime
Date/time at which the extensions should start
startY
y-value at which the extensions should start
barsBackEnd
Defines how many bars ago the extensions should end
endTime
Date/time at which the extensions should end
endY
y-value at which the extensions should end

Example

// Draws Fibonacci time extensions
AddChartFibonacciTimeExtensions("MyFibTimeExt-" + ProcessingBarIndex, 10, Low[10], 0, High[0]);

AddChartGannFan()

Description

AddChartGannFan() draws a Gann fan.

Usage

AddChartGannFan(string name, bool autoScale, int barsAgo, double y)
AddChartGannFan(string name, bool autoScale, DateTime time, double y)

Return Value

A drawing object of the type IGannFan (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsAgo
Sets the preceding bar on which the Gann fan should be drawn
time
Date/time at which the Gann fan should start
y
y-value for the Gann fan

Example

// Shows a Gann fan at the low of the bar from 10 periods ago
AddChartGannFan("MyGannFan-" + ProcessingBarIndex, true, 10, Low[10]);

AddChartHorizontalLine()

Description

AddChartHorizontalLine() draws a horizontal line in the chart.

Usage

AddChartHorizontalLine(string name, double y, Color color)
AddChartHorizontalLine(string name, bool autoScale, double y, Color color, DashStyle dashStyle, int width)

Return Value

A drawing object of the type IHorizontalLine (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
y
Any double value of your choice
color
LevelLine color
dashStyle
LevelLine style:
​
DashStyle.Dash
​
DashStyle.DashDot
​
DashStyle.DashDotDot
​
DashStyle.Dot
​
DashStyle.Solid
​
​
​
You may have to integrate: using System.Drawing.Drawing2D;
width
LevelLine strength

Example

// Draws a horizontal line at y=10
AddChartHorizontalLine("MyHorizontalLine-" + ProcessingBarIndex, 10, Color.Black);

AddChartLine()

Description

AddChartLine() draws a (trend) line.

Usage

AddChartLine(string name, int barsBackStart, double startY, int barsBackEnd, double endY, Color color)
AddChartLine(string name, bool autoScale, int barsBackStart, double startY, int barsBackEnd, double endY, Color color, DashStyle dashStyle, int width)
AddChartLine(string name, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, DashStyle dashStyle, int width)

Return Value

A drawing object of the type ITrendLine (interface).

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsBackStart
Number of bars ago for the starting point
startTime
Date/time for the starting point
startY
y-value for the starting point
barsBackEnd
Number of bars ago for the end point
endTime
Date/time for the end point
endY
y-value for the end point
color
Color of the drawing object
dashStyle
LevelLine style:
​
DashStyle.Dash
​
DashStyle.DashDot
​
DashStyle.DashDotDot
​
DashStyle.Dot
​
DashStyle.Solid
​
​
​
You may have to integrate: using System.Drawing.Drawing2D;
width
LevelLine strength in points

Example

// Draws a line
AddChartLine("MyLine-" + ProcessingBarIndex, false, 10, Close[10], 0, Close[0], Color.Black, DashStyle.Solid, 1);

AddChartRay()

Description

AddChartRay() draws a (trend) line and extends it to infinity.

Usage

AddChartRay(string name, int start1BarsAgo, double start1Y, int start2BarsAgo, double start2Y, Color color)
AddChartRay(string name, bool autoScale, int start1BarsAgo, double start1Y, int start2BarsAgo, double start2Y, Color color, DashStyle dashStyle, int width)
AddChartRay(string name, bool autoScale, DateTime start1Time, double start1Y, DateTime start2Time, double start2Y, Color color, DashStyle dashStyle, int width)

Return Value

A drawing object of the type IRay (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
start1BarsAgo
Number of bars ago for start point 1
start1Time
Date/time for anstartchor point 1
start1Y
y-value for start point 1
start2BarsAgo
Number of bars ago for start point 2
start2Time
Date/time for start point 2
start2Y
y-value for start point 2
color
Color of the drawing object
dashStyle
LevelLine style
​
DashStyle.Dash
​
DashStyle.DashDot
​
DashStyle.DashDotDot
​
DashStyle.Dot
​
DashStyle.Solid
​
​
​
You may have to integrate: using System.Drawing.Drawing2D;
width
LevelLine strength

Example

// Draws a line from the bar from 10 periods ago to the current bar (x-axis)
// --> line is extended to the right
// from y=3 to y=7
AddChartRay("MyRay-" + ProcessingBarIndex, 10, 3, 0, 7, Color.Green);
// Draws a line from the current bar to the bar from 10 periods ago
// --> line is extended to the left
// from y=3 to y=7
AddChartRay("MyRay-" + ProcessingBarIndex, 0, 3, 10, 7, Color.Green);

AddChartRectangle()

Description

AddChartRectangle() draws a rectangle.

Usage

AddChartRectangle(string name, int barsBackStart, double startY, int barsBackEnd, double endY, Color color)
AddChartRectangle(string name, bool autoScale, int barsBackStart, double startY, int barsBackEnd, double endY, Color color, Color areaColor, int areaOpacity)
AddChartRectangle(string name, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, Color areaColor, int areaOpacity)

Return Value

A drawing object of the type IRectangle (interface)

Parameter

name
A clearly identifiable name for the drawing object
autoScale
Adjusts the scale of the y-axis so that drawing objects can be viewed in their entirety
barsBackStart
Sets the preceding bar at which the one corner of the rectangle should be located (0 = current bar)
startTime
Date/time at which the start of the one rectangle corner should be located
startY
y-value at which the one corner of the rectangle should be located
barsBackEnd
Sets the preceding bar at which the second corner of the rectangle should be located (0 = current bar)
endTime
Date/time of the second rectangle corner
endY
y-value of the second rectangle corner
color
Color of the drawing object
areaColor
Fill color of the drawing object
areaOpacity
Transparency of the fill color. Value between 0 and 255 (0 = completely transparent, 255 = completely opaque)

Example

// Draws a green rectangle from the low of 10 periods ago to the high of 5 periods ago
// with a fill color of pale green and a transparency of 2
AddChartRectangle("MyRect-" + ProcessingBarIndex, true, 10, Low[10], 5, High[5], Color.PaleGreen, Color.PaleGreen, 2);

AddChartRegion()

Description

AddChartRegion() fills a specific area on a chart.

Usage

AddChartRegion(string name, int barsBackStart, int barsBackEnd, IDataSeries series, double y, Color outlineColor, Color areaColor, int areaOpacity)
AddChartRegion