Summary
Represents the Andrew's Pitchfork chart object. A tool that helps to identify possible support and resistance levels with the three parallel lines.
Syntax
public interface ChartAndrewsPitchfork : ChartObject
Members
Name | Type | Summary |
---|---|---|
Color | Property | Gets or sets the chart object lines color. |
LineStyle | Property | Gets or sets the chart object lines style. |
Thickness | Property | Gets or sets the chart object lines thickness. |
Time1 | Property | Gets or sets the time value for the Andrew's Pitchfork point 1. |
Time2 | Property | Gets or sets the time value for the Andrew's Pitchfork point 2. |
Time3 | Property | Gets or sets the time value for the Andrew's Pitchfork point 3. |
Y1 | Property | Gets or sets the Y-axis value for the Andrew's Pitchfork point 1. |
Y2 | Property | Gets or sets the Y-axis value for the Andrew's Pitchfork point 2. |
Y3 | Property | Gets or sets the Y-axis value for the Andrew's Pitchfork point 3. |
Example 1
using cAlgo.API; namespace cAlgo { // This indicator shows how to draw an Andrews Pitchfork by using Chart.DrawAndrewsPitchfork method [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class AndrewsPitchforkSample : Indicator { protected override void Initialize() { var barIndex1 = Chart.FirstVisibleBarIndex; var barIndex2 = Chart.FirstVisibleBarIndex + ((Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex) / 5); var barIndex3 = Chart.FirstVisibleBarIndex + ((Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex) / 2); var y1 = Bars.ClosePrices[barIndex1]; var y2 = Bars.ClosePrices[barIndex2]; var y3 = Bars.ClosePrices[barIndex3]; var andrewsPitchfork = Chart.DrawAndrewsPitchfork("AndrewsPitchfork", barIndex1, y1, barIndex2, y2, barIndex3, y3, Color.Red); andrewsPitchfork.IsInteractive = true; } public override void Calculate(int index) { } } }