| uid | annotationsAPIs.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.
Note
Examples of the Annotations usage can be found in the SciChart Android Examples Suite as well as on GitHub:
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.
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.
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.
