iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIStopLossTakeProfitAnnotation
@interface SCIStopLossTakeProfitAnnotation : SCIMultiPointAnnotationBase
Defines a Stop Loss / Take Profit annotation, a trade planning tool placed on the chart using two anchor points which marks the zone between an entry level and a target level.
The zone is coloured as a take profit when the second point is above the first, and as a stop loss when it is below, and is bounded by two level lines with matching axis labels.
-
Defines the
SCIPenStyleused for the level lines when the second point is above the first.Declaration
Objective-C
@property (nonatomic, strong) SCIPenStyle *_Nonnull takeProfitStroke;Swift
var takeProfitStroke: SCIPenStyle { get set } -
Defines the
SCIBrushStyleused to fill the zone when the second point is above the first.Declaration
Objective-C
@property (nonatomic, strong) SCIBrushStyle *_Nonnull takeProfitFill;Swift
var takeProfitFill: SCIBrushStyle { get set } -
Defines the
SCIPenStyleused for the level lines when the second point is below the first.Declaration
Objective-C
@property (nonatomic, strong) SCIPenStyle *_Nonnull stopLossStroke;Swift
var stopLossStroke: SCIPenStyle { get set } -
Defines the
SCIBrushStyleused to fill the zone when the second point is below the first.Declaration
Objective-C
@property (nonatomic, strong) SCIBrushStyle *_Nonnull stopLossFill;Swift
var stopLossFill: SCIBrushStyle { get set } -
Defines the value indicating whether axis labels are shown - price badges on the Y-Axis for the two levels, and badges on the X-Axis at the two anchor points.
Declaration
Objective-C
@property (nonatomic) BOOL showAxisLabels;Swift
var showAxisLabels: Bool { get set } -
Defines the opacity of the band filled on the axes between the two axis labels.
Note
Set to 0 to hide the band. Defaults to 0.2.Declaration
Objective-C
@property (nonatomic) float axisSpanFillOpacity;Swift
var axisSpanFillOpacity: Float { get set } -
Defines the labels drawn by this annotation.
Note
Empty by default, in which case no point or segment labels are drawn. Axis-anchored labels with anaxisLabelDrawModeofXorBothadd badges on the X-Axis; the Y-Axis badges are always derived from the two levels and are governed byshowAxisLabelsinstead.Declaration
Objective-C
@property (nonatomic, copy) NSArray<SCIMultiPointLabel *> *_Nonnull labels;Swift
var labels: [SCIMultiPointLabel] { get set } -
Defines a block which supplies the complete text of each label, re-evaluated whenever the annotation changes.
Note
Takes precedence overSCIMultiPointLabel.text. Returningnil, an empty or a whitespace-only string falls back to that text; when neither yields text the label is not drawn.Declaration
Objective-C
@property (nonatomic, copy, nullable) SCIMultiPointLabelFormatter formatLabel;Swift
var formatLabel: SCIMultiPointLabelFormatter? { get set }
View on GitHub