通达信KDJ多周期同显副图指标公式
前几日看到有坛友这样问:“刚开始学,还没开窍,请高手指教一下,帮忙拓宽思路,大概就是J值变化来变色,有金死叉提示,金叉范围内为暖色渐变,死叉为冷色,左上方显示多周期J值,没找到类似的。”的问题,就随手做了一个,今天为"牌牌"而来,同时也预祝各位双节快乐 ,奉上源码及副图。
{通达信KDJ多周期同显副图}
日K:="KDJ.K#DAY"(9,3,3);
日J:="KDJ.J#DAY"(9,3,3);
STICKLINE(日J>=REF(日J,1),1.6,1.5,2,0),COLORRED;
STICKLINE(日J<REF(日K,1),1.6,1.5,2,0),COLORGRAY;
STICKLINE(CROSS(日J>日K,0.5),1.6,1.5,2,0),COLORCC77CC;
STICKLINE(CROSS(日K>日J,0.5),1.6,1.5,2,0),COLOR00FF00;
DRAWICON(CROSS(日J>日K,0.5),1.6,1);
DRAWICON(CROSS(日K>日J,0.5),1.6,2);
DRAWTEXT(ISLASTBAR=1,1.6,'日J'),COLORFFFFFF;
周K:="KDJ.K#WEEK"(9,3,3);
周J:="KDJ.J#WEEK"(9,3,3);
STICKLINE(周J>=REF(周J,1),1.3,1.2,2,0),COLORRED;
STICKLINE(周J<REF(周K,1),1.3,1.2,2,0),COLORGRAY;
STICKLINE(CROSS(周J>周K,0.5),1.3,1.2,2,0),COLORCC77CC;
STICKLINE(CROSS(周K>周J,0.5),1.3,1.2,2,0),COLOR00FF00;
DRAWICON(CROSS(周J>周K,0.5),1.3,1);
DRAWICON(CROSS(周K>周J,0.5),1.3,2);
DRAWTEXT(ISLASTBAR=1,1.3,'周J'),COLORFFFFFF;
月K:="KDJ.K#MONTH"(9,3,3);
月J:="KDJ.J#MONTH"(9,3,3);
STICKLINE(月J>=REF(月J,1),1,0.9,2,0),COLORRED;
STICKLINE(月J<REF(月K,1),1,0.9,2,0),COLORGRAY;
STICKLINE(CROSS(月J>月K,0.5),1,0.9,2,0),COLORCC77CC;
STICKLINE(CROSS(月K>月J,0.5),1,0.9,2,0),COLOR00FF00;
DRAWICON(CROSS(月J>月K,0.5),1,1);
DRAWICON(CROSS(月J<月K,0.5),1,2);
DRAWTEXT(ISLASTBAR=1,1,'月J'),COLORFFFFFF;