ChartArea.DrawAndrewsPitchfork
method · ChartArea · cAlgo.API
Draws an Andrew's pitchfork.
Environment behaviour
CLI — works differently. The object is created and returned, but never drawn: the CLI displays no chart.
Cloud — works differently. The object is created and returned, but never drawn: the cloud displays no chart.
Overloads
DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color)
Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color)
chartArea.DrawAndrewsPitchfork(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color) -> ChartAndrewsPitchfork
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
name | string | str | The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name. |
time1 | DateTime | DateTime | The time value of the Andrew's pitchfork point 1 location on the X-axis. |
y1 | double | float | The Y-axis value of the Andrew's pitchfork point 1 location. |
time2 | DateTime | DateTime | The time value of the Andrew's pitchfork point 2 location on the X-axis. |
y2 | double | float | The Y-axis value of the Andrew's pitchfork point 2 location. |
time3 | DateTime | DateTime | The time value of the Andrew's pitchfork point 3 location on the X-axis. |
y3 | double | float | The Y-axis value of the Andrew's pitchfork point 3 location. |
color | Color | Color | The Andrew's pitchfork lines color. |
Returns ChartAndrewsPitchfork — ChartAndrewsPitchfork.
Examples
var pitchfork = Chart.DrawAndrewsPitchfork("pitchfork", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);
Print("Pitchfork drawn from {0} to {1}", pitchfork.Time1, pitchfork.Time3);
pitchfork = api.Chart.DrawAndrewsPitchfork("pitchfork", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)
api.Print(f"Pitchfork drawn from {pitchfork.Time1} to {pitchfork.Time3}")
DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness)
Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness)
chartArea.DrawAndrewsPitchfork(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color, thickness: int) -> ChartAndrewsPitchfork
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
name | string | str | The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name. |
time1 | DateTime | DateTime | The time value of the Andrew's pitchfork point 1 location on the X-axis. |
y1 | double | float | The Y-axis value of the Andrew's pitchfork point 1 location. |
time2 | DateTime | DateTime | The time value of the Andrew's pitchfork point 2 location on the X-axis. |
y2 | double | float | The Y-axis value of the Andrew's pitchfork point 2 location. |
time3 | DateTime | DateTime | The time value of the Andrew's pitchfork point 3 location on the X-axis. |
y3 | double | float | The Y-axis value of the Andrew's pitchfork point 3 location. |
color | Color | Color | The Andrew's pitchfork lines color. |
thickness | int | int | The Andrew's pitchfork lines thickness. |
Returns ChartAndrewsPitchfork — ChartAndrewsPitchfork.
Examples
var pitchfork = Chart.DrawAndrewsPitchfork("pitchfork", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red, 2);
Print("Pitchfork thickness: {0}", pitchfork.Thickness);
pitchfork = api.Chart.DrawAndrewsPitchfork("pitchfork", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red, 2)
api.Print(f"Pitchfork thickness: {pitchfork.Thickness}")
DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness, LineStyle lineStyle)
Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness, LineStyle lineStyle)
chartArea.DrawAndrewsPitchfork(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartAndrewsPitchfork
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
name | string | str | The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name. |
time1 | DateTime | DateTime | The time value of the Andrew's pitchfork point 1 location on the X-axis. |
y1 | double | float | The Y-axis value of the Andrew's pitchfork point 1 location. |
time2 | DateTime | DateTime | The time value of the Andrew's pitchfork point 2 location on the X-axis. |
y2 | double | float | The Y-axis value of the Andrew's pitchfork point 2 location. |
time3 | DateTime | DateTime | The time value of the Andrew's pitchfork point 3 location on the X-axis. |
y3 | double | float | The Y-axis value of the Andrew's pitchfork point 3 location. |
color | Color | Color | The Andrew's pitchfork lines color. |
thickness | int | int | The Andrew's pitchfork lines thickness. |
lineStyle | LineStyle | LineStyle | The Andrew's pitchfork lines style. |
Returns ChartAndrewsPitchfork — ChartAndrewsPitchfork.
Examples
var pitchfork = Chart.DrawAndrewsPitchfork("pitchfork", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red, 2, LineStyle.Dots);
Print("Pitchfork style: {0}", pitchfork.LineStyle);
pitchfork = api.Chart.DrawAndrewsPitchfork("pitchfork", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red, 2, LineStyle.Dots)
api.Print(f"Pitchfork style: {pitchfork.LineStyle}")
DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color)
Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color)
chartArea.DrawAndrewsPitchfork(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color) -> ChartAndrewsPitchfork
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
name | string | str | The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name. |
barIndex1 | int | int | The bar index of the Andrew's pitchfork point 1 location on the X-axis. |
y1 | double | float | The Y-axis value of the Andrew's pitchfork point 1 location. |
barIndex2 | int | int | The bar index of the Andrew's pitchfork point 2 location on the X-axis. |
y2 | double | float | The Y-axis value of the Andrew's pitchfork point 2 location. |
barIndex3 | int | int | The bar index of the Andrew's pitchfork point 3 location on the X-axis. |
y3 | double | float | The Y-axis value of the Andrew's pitchfork point 3 location. |
color | Color | Color | The Andrew's pitchfork lines color. |
Returns ChartAndrewsPitchfork — ChartAndrewsPitchfork.
Examples
var index = Bars.Count - 1;
var pitchfork = Chart.DrawAndrewsPitchfork("pitchfork", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Red);
Print("Pitchfork drawn from {0} to {1}", pitchfork.Time1, pitchfork.Time3);
index = api.Bars.Count - 1
pitchfork = api.Chart.DrawAndrewsPitchfork("pitchfork", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Red)
api.Print(f"Pitchfork drawn from {pitchfork.Time1} to {pitchfork.Time3}")
DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness)
Draws an Andrews pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness)
chartArea.DrawAndrewsPitchfork(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color, thickness: int) -> ChartAndrewsPitchfork
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
name | string | str | The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name. |
barIndex1 | int | int | The bar index of the Andrew's pitchfork point 1 location on the X-axis. |
y1 | double | float | The Y-axis value of the Andrew's pitchfork point 1 location. |
barIndex2 | int | int | The bar index of the Andrew's pitchfork point 2 location on the X-axis. |
y2 | double | float | The Y-axis value of the Andrew's pitchfork point 2 location. |
barIndex3 | int | int | The bar index of the Andrew's pitchfork point 3 location on the X-axis. |
y3 | double | float | The Y-axis value of the Andrew's pitchfork point 3 location. |
color | Color | Color | The Andrew's pitchfork lines color. |
thickness | int | int | The Andrew's pitchfork lines thickness. |
Returns ChartAndrewsPitchfork — ChartAndrewsPitchfork.
Examples
var index = Bars.Count - 1;
var pitchfork = Chart.DrawAndrewsPitchfork("pitchfork", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Red, 2);
Print("Pitchfork thickness: {0}", pitchfork.Thickness);
index = api.Bars.Count - 1
pitchfork = api.Chart.DrawAndrewsPitchfork("pitchfork", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Red, 2)
api.Print(f"Pitchfork thickness: {pitchfork.Thickness}")
DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness, LineStyle lineStyle)
Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness, LineStyle lineStyle)
chartArea.DrawAndrewsPitchfork(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartAndrewsPitchfork
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
name | string | str | The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name. |
barIndex1 | int | int | The bar index of the Andrew's pitchfork point 1 location on the X-axis. |
y1 | double | float | The Y-axis value of the Andrew's pitchfork point 1 location. |
barIndex2 | int | int | The bar index of the Andrew's pitchfork point 2 location on the X-axis. |
y2 | double | float | The Y-axis value of the Andrew's pitchfork point 2 location. |
barIndex3 | int | int | The bar index of the Andrew's pitchfork point 3 location on the X-axis. |
y3 | double | float | The Y-axis value of the Andrew's pitchfork point 3 location. |
color | Color | Color | The Andrew's pitchfork lines color. |
thickness | int | int | The Andrew's pitchfork lines thickness. |
lineStyle | LineStyle | LineStyle | The Andrew's pitchfork lines style. |
Returns ChartAndrewsPitchfork — ChartAndrewsPitchfork.
Examples
var index = Bars.Count - 1;
var pitchfork = Chart.DrawAndrewsPitchfork("pitchfork", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Red, 2, LineStyle.Dots);
Print("Pitchfork style: {0}", pitchfork.LineStyle);
index = api.Bars.Count - 1
pitchfork = api.Chart.DrawAndrewsPitchfork("pitchfork", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Red, 2, LineStyle.Dots)
api.Print(f"Pitchfork style: {pitchfork.LineStyle}")