All Projects → WillkYang → Yykline

WillkYang / Yykline

Licence: mit
iOS YYKline:Kline、Chart、Volume、Scroll、Scale、MACD、KDJ、K线图、分时图...

Programming Languages

objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to Yykline

MyTT
MyTT将通达信,同花顺,文华麦语言等指标公式,最简移植到Python中,核心库单个文件,仅百行代码,十几个核心函数,神奇的实现所有常见技术指标算法(不依赖talib库)的纯python实现和转换通达信MACD,RSI,BOLL,ATR,KDJ,CCI,PSY等公式,全部基于pandas函数计算方法封装,简洁且高性能,能非常方便的应用在股票指标公式,股市期货量化框架分析,自动程序化交易,数字货币量化等领域,它是您最精练的股市量化工具。Python library with most stock market indicators.
Stars: ✭ 888 (-61.69%)
Mutual labels:  stock, rsi, macd, kdj, boll
StockChart
StockChart是一款适用于Android的高扩展性、高性能股票图开发库,轻松完成各种子图的组合,还能灵活的定制自己的子图满足复杂的业务需求。
Stars: ✭ 62 (-97.33%)
Mutual labels:  stock, kline, macd, kdj, boll
algorithmic-market-prediction
Implementation of Algorthmic Prediction of Candle Patterns
Stars: ✭ 21 (-99.09%)
Mutual labels:  stock, rsi, macd
OKKLineMin
OKKLineMin kline for min for learning for iPhone (support Swift5 & the latest Swift & iPhone & iOS 16)(min K线图 用于学习了解)
Stars: ✭ 23 (-99.01%)
Mutual labels:  stock, kline
StockView
股票相关控件(分时图、五日分时图、自选股迷你分时图、资金趋势图、盈亏额/盈亏率)- (曲线图、折线图)
Stars: ✭ 87 (-96.25%)
Mutual labels:  stock, kline
TradeBot
Crypto trading bot using Binance API (Java)
Stars: ✭ 292 (-87.4%)
Mutual labels:  rsi, macd
QT StockFigure
QT显示股票分时线
Stars: ✭ 16 (-99.31%)
Mutual labels:  stock, kline
finmath
The collections of simple, weighted, exponential, smoothed moving averages.
Stars: ✭ 49 (-97.89%)
Mutual labels:  ema, ma
Klinechart
📈Lightweight k-line chart that can be highly customized. Zero dependencies. Support mobile.(可高度自定义的轻量级k线图,无第三方依赖,支持移动端)
Stars: ✭ 303 (-86.93%)
Mutual labels:  stock, kline
Hycharts
柱状图、折/曲线图、K线图(主图、交易量图、辅助图), 图与图可以自由组合, 支持分页加载数据 -----> 低内存、低耗电、滑动缩放顺滑
Stars: ✭ 394 (-83%)
Mutual labels:  stock, kline
Kschart
k线图/kline/kchart,已经集成MA/EMA/MACD/KDJ/BOLL/RSI/WR/AVG等指标,新增指标及其方便。适用于股票/区块链交易所等种类App。Swift5编写,CPU/内存占用率极低,60FPS稳定运行。示例集成websocket,并接入币安数据(需VPN)。
Stars: ✭ 909 (-60.79%)
Mutual labels:  stock, kline
Okklineswift
Draw the K-Line by Swift, support iOS & macOS
Stars: ✭ 406 (-82.48%)
Mutual labels:  stock, kline
Hqchart
HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据替换接口
Stars: ✭ 1,126 (-51.42%)
Mutual labels:  stock, kline
Pyetrade
Python E-Trade API Wrapper
Stars: ✭ 120 (-94.82%)
Mutual labels:  stock
Friartuck
Live Quant Trading Framework for Robinhood, using IEX Trading and AlphaVantage for Free Prices.
Stars: ✭ 142 (-93.87%)
Mutual labels:  stock
Examples Of Web Crawlers
一些非常有趣的python爬虫例子,对新手比较友好,主要爬取淘宝、天猫、微信、豆瓣、QQ等网站。(Some interesting examples of python crawlers that are friendly to beginners. )
Stars: ✭ 10,724 (+362.64%)
Mutual labels:  stock
Jjstockview
iOS股票,课程表,表格控件
Stars: ✭ 113 (-95.13%)
Mutual labels:  stock
Financereactnative
[Deprecated] iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android).
Stars: ✭ 1,947 (-16.01%)
Mutual labels:  stock
Quant Trading
Python quantitative trading strategies including VIX Calculator, Pattern Recognition, Commodity Trading Advisor, Monte Carlo, Options Straddle, Shooting Star, London Breakout, Heikin-Ashi, Pair Trading, RSI, Bollinger Bands, Parabolic SAR, Dual Thrust, Awesome, MACD
Stars: ✭ 2,407 (+3.84%)
Mutual labels:  macd
Mns
Money never sleeps! IntelliJ IDEA平台插件. 支持查看股票实时行情. 支持美股, 港股, A股.
Stars: ✭ 113 (-95.13%)
Mutual labels:  stock

YYKline

License MIT   Support   Support  

介绍

  • 支持MA、EMA、BOLL、KDJ、MACD、RSI、WR等技术指标,支持更多指标扩展
  • 支持运行于iOS、MacOS上
  • OC开发,如需Swift可直接翻译

图表示例

普通K线+MACD 分时图+MACD
普通K线+MACD 分时图+MACD
普通K线+KDJ 分时图
普通K线+KDJ 分时图
更多指标 综合演示
更多指标 综合演示

集成方法

  1. 下载Demo项目,将Y_Kline文件夹拖入需要的工程中
  2. 参考Demo,将YYKlineView添加到需要展示的view即可,其他部分(如指标)可参考Demo中Y_StockChartView进行配置。

自定义指标

  1. 实现YYPainterProtocol,可参考Painter文件夹下的其他已有指标。
@protocol YYPainterProtocol <NSObject>
// 绘制
+ (void)drawToLayer:(CALayer *)layer area:(CGRect)area models:(NSArray <YYKlineModel *> *)models minMax: (YYMinMaxModel *)minMaxModel;
// 获取边界值
+ (YYMinMaxModel *)getMinMaxValue:(NSArray <YYKlineModel *> *)data;
@end
  1. 以绘制KDJ图为例,新建YYKDJPainter,实现YYPainterProtocol
+ (YYMinMaxModel *)getMinMaxValue:(NSArray <YYKlineModel *> *)data {
    if(!data) {
        return [YYMinMaxModel new];
    }
    __block CGFloat minAssert = 999999999999.f;
    __block CGFloat maxAssert = 0.f;
    [data enumerateObjectsUsingBlock:^(YYKlineModel * _Nonnull m, NSUInteger idx, BOOL * _Nonnull stop) {
        maxAssert = MAX(maxAssert, MAX(m.KDJ.J.floatValue, MAX(m.KDJ.K.floatValue, m.KDJ.D.floatValue)));
        minAssert = MIN(minAssert, MIN(m.KDJ.J.floatValue, MIN(m.KDJ.K.floatValue, m.KDJ.D.floatValue)));
    }];
    return [YYMinMaxModel modelWithMin:minAssert max:maxAssert];
}

+ (void)drawToLayer:(CALayer *)layer area:(CGRect)area models:(NSArray <YYKlineModel *> *)models minMax: (YYMinMaxModel *)minMaxModel {
    if(!models) {
        return;
    }
    CGFloat maxH = CGRectGetHeight(area);
    CGFloat unitValue = maxH/minMaxModel.distance;
    
    YYKDJPainter *sublayer = [[YYKDJPainter alloc] init];
    sublayer.frame = area;
    UIBezierPath *path1 = [UIBezierPath bezierPath];
    UIBezierPath *path2 = [UIBezierPath bezierPath];
    UIBezierPath *path3 = [UIBezierPath bezierPath];
    [models enumerateObjectsUsingBlock:^(YYKlineModel * _Nonnull m, NSUInteger idx, BOOL * _Nonnull stop) {
        CGFloat w = [Y_StockChartGlobalVariable kLineWidth];
        CGFloat x = idx * (w + [Y_StockChartGlobalVariable kLineGap]);
        CGPoint point1 = CGPointMake(x+w/2, maxH - (m.KDJ.K.floatValue - minMaxModel.min)*unitValue);
        CGPoint point2 = CGPointMake(x+w/2, maxH - (m.KDJ.D.floatValue - minMaxModel.min)*unitValue);
        CGPoint point3 = CGPointMake(x+w/2, maxH - (m.KDJ.J.floatValue - minMaxModel.min)*unitValue);
        if (idx == 0) {
            [path1 moveToPoint:point1];
            [path2 moveToPoint:point2];
            [path3 moveToPoint:point3];
        } else {
            [path1 addLineToPoint:point1];
            [path2 addLineToPoint:point2];
            [path3 addLineToPoint:point3];
        }
    }];
    
    {
        CAShapeLayer *l = [CAShapeLayer layer];
        l.path = path1.CGPath;
        l.lineWidth = Y_StockChartLineWidth;
        l.strokeColor = UIColor.line1Color.CGColor;
        l.fillColor =   [UIColor clearColor].CGColor;
        [sublayer addSublayer:l];
    }
    {
        CAShapeLayer *l = [CAShapeLayer layer];
        l.path = path2.CGPath;
        l.lineWidth = Y_StockChartLineWidth;
        l.strokeColor = UIColor.line2Color.CGColor;
        l.fillColor =   [UIColor clearColor].CGColor;
        [sublayer addSublayer:l];
    }
    {
        CAShapeLayer *l = [CAShapeLayer layer];
        l.path = path3.CGPath;
        l.lineWidth = Y_StockChartLineWidth;
        l.strokeColor = UIColor.line3Color.CGColor;
        l.fillColor =   [UIColor clearColor].CGColor;
        [sublayer addSublayer:l];
    }
    [layer addSublayer:sublayer];
}
  1. 实现对应的Model,参考YYIndicatorModel,计算指标数据
  2. 在Y_StockChartView.m中加上该Painter对应的case
- (void)y_StockChartSegmentView:(Y_StockChartSegmentView *)segmentView clickSegmentButtonIndex:(NSInteger)index {
    ...
    case YYKlineIncicatorKDJ:
        self.kLineView.indicator2Painter = YYKDJPainter.class;
        break;
    ...
}
  1. 运行查看效果

加群讨论更多:755873102

感谢@牛眼行情的K线数据源。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].