第一个公式:先建立一个引用公式:
{引用WMA}
input:N(30,2,999);
WMA_H:WMA(HIGH,N);
WMA_L:WMA(LOW,N);
WMA_C:WMA(CLOSE,N);
第二个公式:{猎豹·火车轨(期货大赢家三轨)}
上轨:WMA(HIGH,30);
下轨:WMA(LOW,30);
日上轨:"引用WMA.WMA_H#day"(30);
日下轨:"引用WMA.WMA_L#day"(30);
S:=CROSS(CLOSE,日上轨);
X:=CROSS(日下轨,CLOSE);
WS:=BARSLAST(S)+1;
WX:=BARSLAST(X)+1;
SS:=CROSS(SUM(S,WX),0.5);
XX:=CROSS(SUM(X,WS),0.5);
DRAWICON(SS,LOW*0.995,4);
DRAWTEXT(SS,LOW,' \n \n买入'),ALIGN1,colorFFFFFF;
DRAWICON(XX,HIGH*1.01,5);
DRAWTEXT(XX,HIGH*1.02,'卖出'),ALIGN1,colorFFFFFF;
周上轨:"引用WMA.WMA_H#week"(30);
周下轨:"引用WMA.WMA_L#week"(30);
STICKLINE(CLOSE>日上轨,日上轨,日下轨,0.8,1),POINTDOT,LINETHICK1,colorFF;
STICKLINE(CLOSE<日下轨,日下轨,日上轨,0.8,1),POINTDOT,colorFF0000;
STICKLINE(CLOSE>周上轨,周上轨,周下轨,0.8,1),POINTDOT,colorFF;
STICKLINE(CLOSE<周下轨,周下轨,周上轨,0.8,1),POINTDOT,colorFF0000;
PARTLINE(CLOSE>上轨,上轨),LINETHICK2,colorFF;
PARTLINE(CLOSE<上轨,上轨),LINETHICK2,colorFF0000;
PARTLINE(CLOSE>下轨,下轨),LINETHICK2,colorFF;
PARTLINE(CLOSE<下轨,下轨),LINETHICK2,colorFF0000;
PARTLINE(CLOSE>日上轨,日上轨),LINETHICK2,colorFF;
PARTLINE(CLOSE<日上轨,日上轨),LINETHICK2,colorFF0000;
PARTLINE(CLOSE>日下轨,日下轨),LINETHICK2,colorFF;
PARTLINE(CLOSE<日下轨,日下轨),LINETHICK2,colorFF0000;
PARTLINE(CLOSE>周上轨,周上轨),LINETHICK2,colorFF;
PARTLINE(CLOSE<周上轨,周上轨),LINETHICK2,colorFF0000;
PARTLINE(CLOSE>周下轨,周下轨),LINETHICK2,colorFF;
PARTLINE(CLOSE<周下轨,周下轨),LINETHICK2,colorFF0000;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,9,0),colorFF5B00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,8,0),colorFF6C00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,7,0),colorFF7B00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,6,0),colorFF9C00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,5,0),colorFFBE00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3.5,0),colorFFCC00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5,0),colorFFFF00;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,9,0),color70084;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,8,0),colorA3;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,7,0),colorB7;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,6,0),colorCD;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,5,0),colorE9;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3,0),color754E9;
|