Skip to content

Commit

Permalink
K线图MACD_KDJ_RSI_BOLL_MA指标算法
Browse files Browse the repository at this point in the history
IOS OC版的K线图直播啊算法,包含MACD,KDJ,RSI,BOLL,SMA,EMA等算法
  • Loading branch information
dangfm committed Aug 19, 2015
0 parents commit 92d4096
Show file tree
Hide file tree
Showing 2 changed files with 486 additions and 0 deletions.
32 changes: 32 additions & 0 deletions FMStockIndexs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// FMStockIndexs.h
// FMStock
//
// Created by dangfm on 15/5/7.
// Copyright (c) 2015年 dangfm. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMKLineModel.h"
@interface FMStockIndexs : NSObject
#pragma mark 计算EMA
+(double)getEMA:(NSMutableArray*)list Number:(int)number;
#pragma mark 计算MACD值
+(NSMutableDictionary*)getMACD:(NSMutableArray*)list andDays:(int)day DhortPeriod:(int)shortPeriod LongPeriod:(int)longPeriod MidPeriod:(int)midPeriod;

#pragma mark 计算KDJ值
+(NSMutableDictionary*)getKDJMap:(NSArray*)m_kData;

#pragma mark 计算MA均线值
+(void)CalculateMA:(NSArray*)data;

#pragma mark 计算RSI值
+(void)getRSIWithDay:(int)day Key:(NSString*)key Number:(int)number Data:(NSArray*)data;

#pragma mark 获取BOLL值
+(NSMutableDictionary*)getBOLLWithDay:(int)day K:(int)k N:(int)n Data:(NSArray*)data;

#pragma mark 计算MA均线
+(CGFloat)createMAWithPrices:(NSArray*)prices MA:(CGFloat)ma Index:(int)index;

@end
Loading

0 comments on commit 92d4096

Please sign in to comment.