361.问:
一目均衡圖最大的優點是能將買入、賣出訊號量化。若黃金交叉出現而價格發生在雲
帶上( 下), 則為強勢訊號,以三個箭咀代表;若黃金交叉出現而價格發生在雲帶中,
則為中性訊 號,以兩個箭咀代表;若黃金交叉出現而價格發生在雲帶相反方向,則
為一弱勢訊號,以單 一箭咀代表。
金叉,死叉我会,但我不会区分在雲帶上中下如何写
答(股市浪子):
input:n1(9,2,100),n2(26,2,100),n3(52,2,100);
AA:=(SYSPARAM(4)-SYSPARAM(5))/16;
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;//,SHIFT26;
先行带A:REF((转换线+基准线)/2,n2),colorf0f0f0,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),colorf0f0f0;
pOLYLINE(1,基准线),colorff6dd8;
POLYLINE(1,转换线),coloraaff99,LINETHICK;
DRAWTEXT(CROSS(转换线,基准线) AND Var1<MIN(先行带A,先行带B),MIN(基准线,LOW)
*0.995,'▲'),COLORRED,ALIGN0;
DRAWTEXT(CROSS(转换线,基准线) AND RANGE(Var1,MIN(先行带A,先行带B),MAX(先行带
A, 先行带B)),LOW*0.995,'▲\n▲'),COLORRED,ALIGN0;
DRAWTEXT(CROSS(转换线,基准线) AND Var1>MAX(先行带A,先行带B),LOW*0.995,'▲\n▲
\n ▲'),COLORRED,ALIGN0;
DRAWTEXT(CROSS(基准线,转换线) AND Var1<MIN(先行带A,先行带B),基准线+AA*1.1,'▼\
n ▼\n ▼'),COLORFF9966,ALIGN0;
DRAWTEXT(CROSS(基准线,转换线) AND RANGE(Var1,MIN(先行带A,先行带B),MAX(先行带
A, 先行带B)),MAX(基准线,HIGH)+AA,'▼\n▼'),COLORFF9966,ALIGN0;
DRAWTEXT(CROSS(基准线,转换线) AND Var1>MAX(先行带A,先行带B
,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;