Represents the Andrew's Pitchfork chart object. A tool that helps to identify possible support and resistance levels with the three parallel lines.
Signature
1
publicabstractinterfaceChartAndrewsPitchfork
Namespace
cAlgo.API
Examples
1 2 3 4 5 6 7 8 91011121314151617181920212223
usingcAlgo.API;namespacecAlgo{// This indicator shows how to draw an Andrews Pitchfork by using Chart.DrawAndrewsPitchfork method[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]publicclassAndrewsPitchforkSample:Indicator{protectedoverridevoidInitialize(){varbarIndex1=Chart.FirstVisibleBarIndex;varbarIndex2=Chart.FirstVisibleBarIndex+((Chart.LastVisibleBarIndex-Chart.FirstVisibleBarIndex)/5);varbarIndex3=Chart.FirstVisibleBarIndex+((Chart.LastVisibleBarIndex-Chart.FirstVisibleBarIndex)/2);vary1=Bars.ClosePrices[barIndex1];vary2=Bars.ClosePrices[barIndex2];vary3=Bars.ClosePrices[barIndex3];varandrewsPitchfork=Chart.DrawAndrewsPitchfork("AndrewsPitchfork",barIndex1,y1,barIndex2,y2,barIndex3,y3,Color.Red);andrewsPitchfork.IsInteractive=true;}publicoverridevoidCalculate(intindex){}}}