Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 3.53 KB

File metadata and controls

47 lines (37 loc) · 3.53 KB
uid annotationsAPIs.PitchforkAnnotation

The PitchforkAnnotation

The xref:com.scichart.charting.visuals.annotations.tradingAnnotations.PitchforkAnnotation (also known as Andrew's Pitchfork) is a specialized trading annotation that uses three points to identify support and resistance levels.

Pitchfork Annotation

Structure and Points

The PitchforkAnnotation is defined by 3 base points:

  • Point 0 (Handle): The starting point of the median line.
  • Point 1 (High/Low): The first point of the cross-line.
  • Point 2 (Low/High): The second point of the cross-line.

The median line starts at Point 0 and passes through the midpoint of the segment connecting Point 1 and Point 2. Two additional lines are drawn parallel to the median line, starting from Point 1 and Point 2.

Appearance Properties

The following properties can be used to customize the appearance of the PitchforkAnnotation:

  • stroke: Sets the pen style for all the lines in the pitchfork.
  • sidesFill: Sets the brush style for the outer filled areas.
  • middleFill: Sets the brush style for the inner filled area around the median line.

Create a PitchforkAnnotation

A xref:com.scichart.charting.visuals.annotations.tradingAnnotations.PitchforkAnnotation can be added onto a chart using the following code:

[!code-javaAddPitchforkAnnotation]

[!code-javaAddPitchforkAnnotation]

[!code-swiftAddPitchforkAnnotation]


Note

For interactive creation of the PitchforkAnnotation, use the PitchforkAnnotationCreationModifier.

Note

To learn more about other Annotation Types, available out of the box in SciChart, please find the comprehensive list in the Annotation APIs article.