forked from szmichaelyb/KLineMACD_KDJ_RSI_BOLL_MA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IOS OC版的K线图直播啊算法,包含MACD,KDJ,RSI,BOLL,SMA,EMA等算法
- Loading branch information
0 parents
commit 92d4096
Showing
2 changed files
with
486 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.