|
4楼
楼主 |
发表于 2011-12-20 16:07:37
|
只看该作者
本帖最后由 火焰之神 于 2015-4-8 16:56 编辑
一目均衡指标 金字塔决策交易系统源码
input:n1(9,2,100),n2(26,2,100),n3(52,2,100);
RUNMODE:1;
AA:=(HHV(HIGH,120)-LLV(LOW,120))/30,LINETHICK;
Var1:=(2*CLOSE+HIGH+LOW)/4;
转换线:(HHV(HIGH,n1)+LLV(LOW,n1))/2,coloraaff99,LINETHICK;
基准线:(HHV(HIGH,n2)+LLV(LOW,n2))/2,colorff6dd8,LINETHICK;
迟行带:REFX(CLOSE,n2),colorff9224;
先行带A:REF((转换线+基准线)/2,n2),COLORYELLOW,LINETHICK;
先行带B:REF((HHV(HIGH,n3)+LLV(LOW,n3))/2,n2),color909090;
STICKLINE(先行带A<先行带B,先行带A,先行带B,2,1.5),COLOR339933;
STICKLINE(先行带A>=先行带B,先行带A,先行带B,2,0.1),COLOR0033CC;
POLYLINE(1,先行带A),COLORYELLOW;
POLYLINE(1,基准线),colorff6dd8;
POLYLINE(1,转换线),coloraaff99,LINETHICK;
DRAWTEXT(CROSS(转换线,基准线) AND Var1MIN(先行带A,先行带B) AND Var1 < MAX(先行带A,先行带B),1,0),LOW*0.995,'▲\n▲'),COLORRED,ALIGN0;
DRAWTEXT(CROSS(转换线,基准线) AND Var1>MAX(先行带A,先行带B),LOW-AA*0.5,'▲\n▲\n▲'),COLORRED,ALIGN0;
DRAWTEXT(CROSS(基准线,转换线) AND Var1MIN(先行带A,先行带B) and Var1 < MAX(先行带A,先行带B),1,0),MAX(基准线,HIGH)+AA,'▼\n▼'),COLORFF9966,ALIGN0;
DRAWTEXT(CROSS(基准线,转换线) AND Var1>MAX(先行带A,先行带B),MAX(基准线,HIGH)+AA,'▼'),COLORFF9966,ALIGN0;
{阴柱}
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLOR009900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00CC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00EE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00;
{红柱}
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLORFFBBFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLORFF00FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLORFF22FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLORFF44FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLORFF66FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLORFF88FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLORFF99FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLORFFAAFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLORFFBBFF;
|
|