Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTTradingRangePlot.h
Go to the documentation of this file.
1 #import "CPTDefinitions.h"
2 #import "CPTFill.h"
3 #import "CPTLineStyle.h"
4 #import "CPTPlot.h"
5 
7 
9 
14 
29 
33 typedef NS_ENUM (NSInteger, CPTTradingRangePlotStyle) {
36 };
37 
41 typedef NS_ENUM (NSInteger, CPTTradingRangePlotField) {
47 };
48 
49 #pragma mark -
50 
55 @optional
56 
59 
65 -(nullable CPTFillArray *)increaseFillsForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndexRange:(NSRange)indexRange;
66 
76 -(nullable CPTFill *)increaseFillForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndex:(NSUInteger)idx;
77 
82 -(nullable CPTFillArray *)decreaseFillsForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndexRange:(NSRange)indexRange;
83 
93 -(nullable CPTFill *)decreaseFillForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndex:(NSUInteger)idx;
94 
100 -(nullable CPTNumberArray *)barWidthsForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndexRange:(NSRange)indexRange;
101 
110 -(nullable NSNumber *)barWidthForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndex:(NSUInteger)idx;
111 
113 
116 
122 -(nullable CPTLineStyleArray *)lineStylesForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndexRange:(NSRange)indexRange;
123 
133 -(nullable CPTLineStyle *)lineStyleForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndex:(NSUInteger)idx;
134 
140 -(nullable CPTLineStyleArray *)increaseLineStylesForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndexRange:(NSRange)indexRange;
141 
151 -(nullable CPTLineStyle *)increaseLineStyleForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndex:(NSUInteger)idx;
152 
158 -(nullable CPTLineStyleArray *)decreaseLineStylesForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndexRange:(NSRange)indexRange;
159 
169 -(nullable CPTLineStyle *)decreaseLineStyleForTradingRangePlot:(nonnull CPTTradingRangePlot *)plot recordIndex:(NSUInteger)idx;
170 
172 
173 @end
174 
175 #pragma mark -
176 
181 
182 @optional
183 
186 
195 -(void)tradingRangePlot:(nonnull CPTTradingRangePlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)idx;
196 
206 -(void)tradingRangePlot:(nonnull CPTTradingRangePlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)idx withEvent:(nonnull CPTNativeEvent *)event;
207 
216 -(void)tradingRangePlot:(nonnull CPTTradingRangePlot *)plot barTouchDownAtRecordIndex:(NSUInteger)idx;
217 
227 -(void)tradingRangePlot:(nonnull CPTTradingRangePlot *)plot barTouchDownAtRecordIndex:(NSUInteger)idx withEvent:(nonnull CPTNativeEvent *)event;
228 
237 -(void)tradingRangePlot:(nonnull CPTTradingRangePlot *)plot barTouchUpAtRecordIndex:(NSUInteger)idx;
238 
248 -(void)tradingRangePlot:(nonnull CPTTradingRangePlot *)plot barTouchUpAtRecordIndex:(NSUInteger)idx withEvent:(nonnull CPTNativeEvent *)event;
249 
251 
252 @end
253 
254 #pragma mark -
255 
257 
260 @property (nonatomic, readwrite, assign) CPTTradingRangePlotStyle plotStyle;
261 @property (nonatomic, readwrite, assign) CGFloat barWidth; // In view coordinates
262 @property (nonatomic, readwrite, assign) CGFloat stickLength; // In view coordinates
263 @property (nonatomic, readwrite, assign) CGFloat barCornerRadius;
264 @property (nonatomic, readwrite, assign) BOOL showBarBorder;
266 
269 @property (nonatomic, readwrite, copy, nullable) CPTLineStyle *lineStyle;
270 @property (nonatomic, readwrite, copy, nullable) CPTLineStyle *increaseLineStyle;
271 @property (nonatomic, readwrite, copy, nullable) CPTLineStyle *decreaseLineStyle;
272 @property (nonatomic, readwrite, copy, nullable) CPTFill *increaseFill;
273 @property (nonatomic, readwrite, copy, nullable) CPTFill *decreaseFill;
275 
278 -(void)reloadBarFills;
279 -(void)reloadBarFillsInIndexRange:(NSRange)indexRange;
280 -(void)reloadBarLineStyles;
281 -(void)reloadBarLineStylesInIndexRange:(NSRange)indexRange;
282 -(void)reloadBarWidths;
283 -(void)reloadBarWidthsInIndexRange:(NSRange)indexRange;
285 
286 @end
CPTLineStyle
Immutable wrapper for various line drawing properties. Create a CPTMutableLineStyle if you want to cu...
Definition: CPTLineStyle.h:20
CPTTradingRangePlotBindingXValues
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingXValues
X values.
Definition: CPTTradingRangePlot.m:30
CPTTradingRangePlot::increaseFill
CPTFill * increaseFill
The fill used with a candlestick plot when close >= open.
Definition: CPTTradingRangePlot.h:272
NSArray
CPTTradingRangePlotFieldHigh
@ CPTTradingRangePlotFieldHigh
High values.
Definition: CPTTradingRangePlot.h:44
CPTPlotDataSource-p
A plot data source.
Definition: CPTPlot.h:51
CPTTradingRangePlotFieldOpen
@ CPTTradingRangePlotFieldOpen
Open values.
Definition: CPTTradingRangePlot.h:43
NSRange
typedef NSRange
-[CPTTradingRangePlot reloadBarWidths]
void reloadBarWidths()
Reload all bar widths from the data source immediately.
Definition: CPTTradingRangePlot.m:565
NSUInteger
typedef NSUInteger
CPTTradingRangePlotField
CPTTradingRangePlotField
Enumeration of Quote plot data source field types.
Definition: CPTTradingRangePlot.h:41
CPTFill.h
-[CPTTradingRangePlot reloadBarFills]
void reloadBarFills()
Reload all bar fills from the data source immediately.
Definition: CPTTradingRangePlot.m:375
CPTTradingRangePlot
A trading range financial plot.
Definition: CPTTradingRangePlot.h:257
CPTTradingRangePlot::increaseLineStyle
CPTLineStyle * increaseLineStyle
The line style used to outline candlestick symbols or draw OHLC symbols when close >= open....
Definition: CPTTradingRangePlot.h:270
CPTTradingRangePlotBindingHighValues
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingHighValues
High price values.
Definition: CPTTradingRangePlot.m:32
CPTTradingRangePlotBindingDecreaseFills
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingDecreaseFills
Fills used with a candlestick plot when close < open.
Definition: CPTTradingRangePlot.m:36
CPTTradingRangePlotStyleCandleStick
@ CPTTradingRangePlotStyleCandleStick
Candlestick plot.
Definition: CPTTradingRangePlot.h:35
CPTTradingRangePlotBindingLowValues
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingLowValues
Low price values.
Definition: CPTTradingRangePlot.m:33
CPTFill
Draws area fills.
Definition: CPTFill.h:18
CPTTradingRangePlot::decreaseFill
CPTFill * decreaseFill
The fill used with a candlestick plot when close < open.
Definition: CPTTradingRangePlot.h:273
CPTTradingRangePlotDataSource-p
A trading range plot data source.
Definition: CPTTradingRangePlot.h:54
-[NSObject copy]
id copy
CPTTradingRangePlotBindingDecreaseLineStyles
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingDecreaseLineStyles
Line styles used to outline candlestick symbols when close < open.
Definition: CPTTradingRangePlot.m:39
CPTTradingRangePlotFieldLow
@ CPTTradingRangePlotFieldLow
Low values.
Definition: CPTTradingRangePlot.h:45
CPTTradingRangePlotStyle
CPTTradingRangePlotStyle
Enumeration of Quote plot render style types.
Definition: CPTTradingRangePlot.h:33
CPTTradingRangePlotBindingIncreaseFills
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingIncreaseFills
Fills used with a candlestick plot when close >= open.
Definition: CPTTradingRangePlot.m:35
CPTTradingRangePlot::barCornerRadius
CGFloat barCornerRadius
The corner radius used for candlestick plots. Defaults to 0.0.
Definition: CPTTradingRangePlot.h:263
CPTTradingRangePlot::lineStyle
CPTLineStyle * lineStyle
The line style used to draw candlestick or OHLC symbols.
Definition: CPTTradingRangePlot.h:269
CPTTradingRangePlot::plotStyle
CPTTradingRangePlotStyle plotStyle
The style of trading range plot drawn. The default is CPTTradingRangePlotStyleOHLC.
Definition: CPTTradingRangePlot.h:260
CPTDefinitions.h
CPTTradingRangePlotBindingBarWidths
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingBarWidths
Bar widths.
Definition: CPTTradingRangePlot.m:40
CPTPlot.h
CPTTradingRangePlotBindingOpenValues
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingOpenValues
Open price values.
Definition: CPTTradingRangePlot.m:31
CPTPlot
An abstract plot class.
Definition: CPTPlot.h:258
CPTTradingRangePlotBindingLineStyles
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingLineStyles
Line styles used to draw candlestick or OHLC symbols.
Definition: CPTTradingRangePlot.m:37
CPTLineStyle.h
cpt_swift_struct
#define cpt_swift_struct
Marks a type definition to be imported into Swift as a structure.
Definition: CPTDefinitions.h:73
CPTTradingRangePlotFieldX
@ CPTTradingRangePlotFieldX
X values.
Definition: CPTTradingRangePlot.h:42
NSString
CPTTradingRangePlot::stickLength
CGFloat stickLength
The length of close and open sticks on OHLC plots (view coordinates).
Definition: CPTTradingRangePlot.h:262
CPTTradingRangePlot::showBarBorder
BOOL showBarBorder
If YES, the candlestick body will show a border.
Definition: CPTTradingRangePlot.h:264
CPTTradingRangePlot::barWidth
CGFloat barWidth
The width of bars in candlestick plots (view coordinates).
Definition: CPTTradingRangePlot.h:261
CPTTradingRangePlotStyleOHLC
@ CPTTradingRangePlotStyleOHLC
Open-High-Low-Close (OHLC) plot.
Definition: CPTTradingRangePlot.h:34
-[CPTTradingRangePlot reloadBarLineStyles]
void reloadBarLineStyles()
Reload all bar line styles from the data source immediately.
Definition: CPTTradingRangePlot.m:456
CPTTradingRangePlotBindingCloseValues
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingCloseValues
Close price values.
Definition: CPTTradingRangePlot.m:34
CPTTradingRangePlotFieldClose
@ CPTTradingRangePlotFieldClose
Close values.
Definition: CPTTradingRangePlot.h:46
CPTTradingRangePlotDelegate-p
Trading range plot delegate.
Definition: CPTTradingRangePlot.h:180
CPTTradingRangePlotBindingIncreaseLineStyles
CPTTradingRangePlotBinding __nonnull const CPTTradingRangePlotBindingIncreaseLineStyles
Line styles used to outline candlestick symbols when close >= open.
Definition: CPTTradingRangePlot.m:38
CPTPlotDelegate-p
Plot delegate.
Definition: CPTPlot.h:170
CPTTradingRangePlot::decreaseLineStyle
CPTLineStyle * decreaseLineStyle
The line style used to outline candlestick symbols or draw OHLC symbols when close < open....
Definition: CPTTradingRangePlot.h:271