[通达信] 通达信斋主K线指标公式 红色持股,绿色持币,黄色变盘(源码)
一、基本思路:
红K线:大盘均线斜率与个股均线斜率共振向下(都为正),涨的概率大;
黄K线:大盘均线斜率与个股均线斜率背离时(一正一负),变盘的概率大;
绿K线:大盘均线斜率与个股均线斜率共振向下(都为负),跌的概率大!
结合K线与工作线(均线)的位置关系进而判断个股与大盘的强弱对比;
二、基本用法:
红色K线持股待涨,绿色K线持币观望,黄色K线变盘着手减仓或试建仓,具体应结合均线应用!
黄K线在GG均线下,大盘趋向于好转,个股目前弱于大盘;
黄K线在GG均线上,大盘趋向于转坏,个股目前强于大盘;
三、源码如下:
GG:REF(EMA(C,14),1)COLORLIBLUE;
GGX:(EMA(C,14)-GG)/GG*100,NODRAW;
DP:=REF(EMA(INDEXC,14),1);
DPX:(EMA(INDEXC,14)-DP)/DP*100,NODRAW;
STICKLINE(DPX>=0 AND GGX>=0,H,L,0,0 ),COLOR9933FF;
STICKLINE(DPX>=0 AND GGX>=0,C,O,3,0 ),COLOR0000CC;
STICKLINE(DPX>=0 AND GGX>=0,C,O,1,0 ),COLOR0033FF;
STICKLINE(DPX<0 AND GGX<0,L,H,0,0 ),COLOR66CC33;
STICKLINE(DPX<0 AND GGX<0,C,O,3,0),COLOR00CC00;
STICKLINE(DPX<0 AND GGX<0,C,O,1,0),COLOR66FF00;
STICKLINE(NOT(DPX>=0 AND GGX>=0) AND NOT(DPX<0 AND GGX<0),C,O,3,0),COLOR00CCFF;
STICKLINE(NOT(DPX>=0 AND GGX>=0) AND NOT(DPX<0 AND GGX<0),C,O,1,0),COLOR00DFFF;
STICKLINE(NOT(DPX>=0 AND GGX>=0) AND NOT(DPX<0 AND GGX<0),C,O,0.5,0),COLOR00FFFF;
STICKLINE(NOT(DPX>=0 AND GGX>=0) AND NOT(DPX<0 AND GGX<0),H,L,0,0),COLOR00FFFF;
|