A. 主圖修改為選股公式 在線等。 MA13:=MA(C,13); MA34:=MA(C,34); MA55:=MA(C,55); LC:=REF(CLOSE,1);
{近5日出現★出擊}
VARF:=(2*CLOSE+HIGH+LOW)/4;
VA4:=LLV(LOW,34);
VA5:=HHV(HIGH,34);
VA6:=EMA((VARF-VA4)/(VA5-VA4)*100,6);
VA7:=EMA(0.667*REF(VA6,1)+0.333*VA6,4);
AA:=COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3 AND COUNT(VA6>VA7,3) AND REF(LOW,1)=LLV(LOW,120) AND CLOSE>OPEN;
COUNT(AA,5)>0;
B. 請高手幫忙修改主圖指標公式,另改為選股公式謝謝!!!
該指標使用了DCLOSE(不定期收盤價),它屬於未來函數!
再一個,該指標就是一個普通的均線指標添加了其它的語句,不建議你做選股公式。
C. 請老師幫忙編寫下圖主圖指標公式,用在通達信版
通達信專用機構通道主圖指標公式
M1:=EMA(C,5);M2:=EMA(C,13);M3:=EMA(C,34);
MC1:=EMA(C,55);MC2:=EMA(C,89);MA4:=EMA(C,144);
判勢線:=NEWSAR(1,100),COLORYELLOW,LINETHICK2;
牛熊線:IF(MC1>MAX(MC2,MA4),MC1,IF(MC1<MIN(MC2,MA4),MC2,MA4)),COLORFF00CC,LINETHICK2;
AA:=1;
中軌:EMA(CLOSE,17)*AA,LINETHICK1,COLORFFFFFF;
賣出線:中軌+2*STD(CLOSE,17),LINETHICK1,COLOR0000FF;
買入線:中軌-2*STD(CLOSE,17),LINETHICK1,COLOR00CC00;
清倉線:中軌+3*STD(CLOSE,17),LINETHICK1,COLORFF00FF;
滿倉線:中軌-3*STD(CLOSE,17),LINETHICK1,COLOR00AA00;
LOCK:=IF(TIME<1160101,1,0);
VARA:=MA(CLOSE,20);
趨勢線:IF(VARA>REF(VARA,2),VARA,IF(VARA<REF(VARA,2),VARA,VARA)),COLOR00FF00;
IF(VARA>REF(VARA,2),VARA,DRAWNULL),LINETHICK2,COLORFF00FF;
IF(VARA=REF(VARA,2),VARA,DRAWNULL),LINETHICK2,COLORFF0000;
IF(VARA<REF(VARA,2),VARA,DRAWNULL),LINETHICK2,COLOR00FF00;
買入:IF(VARA>REF(VARA,2) AND REF(VARA<=REF(VARA,2),1),1,0),NODRAW,COLORAAAAAA;
DRAWICON(CROSS(LOW,滿倉線),滿倉線*0.96,11);
DRAWICON(CROSS(HIGH,清倉線),HIGH,12);
TY:=CLOSE;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
A:=REF(CLOSE,BARSLAST(HD)); B:=REF(CLOSE,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
波峰:IF(T1,A,A),COLORFF00FF,POINTDOT;
STICKLINE(T1,A,A,1.5,0),COLORFF00FF;
波谷:IF(T2,B,B),COLOR80FF00,POINTDOT;
STICKLINE(T2,B,B,1.5,0),COLOR80FF00;
MA1:=MA(C,3);
XG1:=MA1>REF(MA1,1) AND REF(MA1,1)<REF(MA1,2) AND C>MA(C,7);
DRAWTEXT(FILTER(XG1,9),LOW*0.97,'B'),COLORRED,LINETHICK2;
DRAWICON(FILTER(XG1,9),LOW*0.98,1);
VAR2:=SUM(IF(CLOSE>OPEN,VOL,0),30)/SUM(VOL,30)*100;
VAR3:=100-SUM(IF(CLOSE>OPEN,VOL,0),30)/SUM(VOL,30)*100;
多頭力量:= VAR2;
空頭力量:= VAR3;
RSV:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
XG2:=多頭力量 > 空頭力量 AND 多頭力量 - 空頭力量>30 AND CROSS(D,K) OR
MA1<REF(MA1,1) AND REF(MA1,1)>REF(MA1,2) AND REF(MA1,2)>REF(MA1,3) AND K>50;
DRAWTEXT(FILTER(XG2,9),H*1.06,'S'),COLORGREEN,LINETHICK2;
DRAWICON(FILTER(XG2,9),H*1.02,2);
{跳空缺口}
LL1:=REF(L,1);
HH1:=REF(H,1);
SQK:=L>HH1;
XQK:=H<LL1;
上跳:IF(SQK=1,L-HH1,DRAWNULL),COLORFF00FF,CROSSDOT,LINETHICK3,NODRAW;
下跳:IF(XQK=1,H-LL1,DRAWNULL),COLORGREEN,CROSSDOT,LINETHICK3,NODRAW;
STICKLINE(SQK,L,HH1,4*1,1),COLORYELLOW;{上跳}
STICKLINE(XQK,H,LL1,4*1,2),COLOR00FF00;{下跳}
DRAWTEXT(SQK,H,'上跳'),COLORYELLOW;
DRAWTEXT(XQK,L,'下跳'),COLOR00FF00;
{補缺口}
K1:=BARSLAST(L>REF(H,1));
K2:=L<REF(H,K1+1) AND COUNT(L<REF(H,K1+1),K1)=1;
STICKLINE(K2,L,O,1,0),COLORFF00FF;{缺口回補};
DRAWTEXT(K2=1,L,'回補'),COLORFF00FF;
D. 通達信超贊的主圖指標公式是怎樣的
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORLIRED;
DRAWTEXT_FIX(ISLASTBAR,0,0.03,0,EXTERNSTR(0,3)),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0,0.06,0,EXTERNSTR(0,6)),COLORLIBLUE;
DRAWTEXT_FIX(ISLASTBAR,0,0.09,0,EXTERNSTR(0,12)),COLORLIGREEN;{老王}
DRAWTEXT_FIX(ISLASTBAR,0,0.15,0,FGBLOCK),COLORLIMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0,0.12,0,EXTERNSTR(0,1)),COLORYELLOW;{融勝}
主力成本線:EMA(COST(9),250),COLORBROWN,DOTLINE;
{牛馬線買點公式升級版}
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛線:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED;
馬線:MA(牛線,8),COLORWHITE;
DRAWICON( FILTER(CROSS(牛線,馬線),20),馬線-0.002 ,1);
DRAWTEXT(CROSS(牛線,馬線),LOW*0.984,'買'),COLORRED,LINETHICK2;
止損價:H*0.95,LINETHICK0.5,COLORRED;
莊家:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED;
IF(莊家>=REF(莊家,1),莊家,DRAWNULL),COLORRED,LINETHICK4;
IF(莊家<=REF(莊家,1),莊家,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWBAND(牛線,RGB(255,87,22),馬線,RGB(0,30,255));
MA60:MA(CLOSE,60),COLORGRAY;
N1:=10;
TK:=CONST(HHVBARS(V,10)),COLOR0000FF,LINETHICK1;
量能平台:IF(CURRBARSCOUNT<=N1+3,CONST(IF(TK=0,C,REF(C,TK))),DRAWNULL),COLORGRAY,LINETHICK1;
NOTEXT_新量能點:IF(CURRBARSCOUNT=TK+1,量能平台,DRAWNULL),CIRCLEDOT,COLORFFFFFF,LINETHICK9;
DRAWTEXT(ISLASTBAR,量能平台,'量能平台'),COLORGRAY;
{穩漲}
紅軌道:=MA(MA(CLOSE,3),1),LINETHICK1,COLORYELLOW;
軌道:MA(MA(CLOSE,3),3),COLOR32CD32,LINETHICK2;
NOTEXT_升:IF(紅軌道>=軌道,軌道,DRAWNULL),COLORMAGENTA,LINETHICK2;
機構:(L2_VOL(0,0) - L2_VOL(0,1))*10000/FINANCE(7),NODRAW,COLORRED;
大戶:(L2_VOL(1,0) - L2_VOL(1,1))*10000/FINANCE(7),NODRAW,COLORMAGENTA;
主力:機構+大戶,NODRAW,COLORYELLOW;
STICKLINE(主力>0,O,C,1.5,1),COLORRED;
STICKLINE(主力<0,O,C,1.5,1),COLORCYAN;
STICKLINE(大戶>0,O,C,1,0),COLORMAGENTA;
STICKLINE(大戶<0,O,C,1,0),COLORGREEN;
STICKLINE(機構>0 AND 大戶>0,O,(O+C)/2,1,0),COLORRED;
STICKLINE(機構<0 AND 大戶>0,C,(O+C)/2,1,0),COLORCYAN;
STICKLINE(機構>0 AND 大戶<0,O,(O+C)/2,1,0)COLORMAGENTA;
STICKLINE(機構<0 AND 大戶<0,C,O,1,0)COLORLICYAN;
累計:=SUM(主力,30),COLORMAGENTA;
均值:=EMA(累計,MIN(10,30)),COLORWHITE;
{紅}
STICKLINE(CROSS(累計,均值),H,L,0,0),COLORRED,LINETHICK1;
STICKLINE(CROSS(累計,均值),CLOSE,OPEN,1.4,0),COLOR000088;
STICKLINE(CROSS(累計,均值),CLOSE,OPEN,1,0),COLOR0000BB;
STICKLINE(CROSS(累計,均值),CLOSE,OPEN,0.6,0),COLOR0000DD;
STICKLINE(CROSS(累計,均值),CLOSE,OPEN,0,0),COLOR0000FF;
{藍}
STICKLINE(CROSS(均值,累計),H,L,0,0),COLORFF8800,LINETHICK1;
STICKLINE(CROSS(均值,累計),CLOSE,OPEN,1.4,0),COLORBB4400;
STICKLINE(CROSS(均值,累計),CLOSE,OPEN,1,0),COLORCC5500;
STICKLINE(CROSS(均值,累計),CLOSE,OPEN,0.6,0),COLORDD6600;
STICKLINE(CROSS(均值,累計),CLOSE,OPEN,0,0),COLOREE7700;
{高低點定位}
G0:=(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))+XMA(XMA(H,30),30);
D0:=XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30));
G01:=(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*0.5+XMA(XMA(H,30),30);
D01:=XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*0.5;
GO0:=(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3+XMA(XMA(H,60),60);
DO0:=XMA(XMA(L,60),60)-(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3;
STICKLINE(CURRBARSCOUNT=1,G0,G0,100,5),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1,D0,D0,100,5),COLORMAGENTA;
STICKLINE(CURRBARSCOUNT=1,GO0,GO0,100,5),COLORLIBLUE;
STICKLINE(CURRBARSCOUNT=1,DO0,DO0,100,5),COLORRED;
DRAWTEXT(ISLASTBAR,G0,'賣'),COLORGREEN;
DRAWTEXT(ISLASTBAR,D0,'買'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,GO0,'頂'),COLORLIBLUE;
DRAWTEXT(ISLASTBAR,DO0,'底'),COLORRED;
由於公式字元過多,這里限制數量無法發出,
E. 誰幫能我把以下通信達的主圖指標它的買點改成選股公式: 把買點做成選股公式
N:=14;
K:=N/2;
MAK:=MA(CLOSE,K),COLORWHITE,LINETHICK1;
MAN:=MA(CLOSE,N),COLORRED,LINETHICK1;
DTPL:=MA(C,N)>MA(C,N*1.5) AND MA(C,N*1.5)>MA(C,N*3) AND MA(C,3)>MA(C,N*6);
選擇均線:=N;
強弱天數:=K;
連續走強:=COUNT(C>MA(C,N),K)=K;
ZQSJ:=BARSLAST(連續走強);
下穿:=CROSS(MA(C,N),C);
GL:=MA(C,N/2)/MA(C,N*2)>=1.05;
下體泄:=(下穿 AND ZQSJ<=3 AND DTPL AND GL)*N;
連續走弱:=COUNT(C<MA(C,N),K)=K;
ZRSJ:=BARSLAST(連續走弱);
上穿:=CROSS(C,MA(C,N));
下體漲:=(上穿 AND ZRSJ<=3)*K;
下體漲>0 AND DYNAINFO(17)>0;
公式已測試通過!
希望能夠幫助你!
F. 通達信將選股公式改為幅圖或主圖指標
如何將主、副圖公式改為選股公式
以下是將主、副圖公式改為選股公式的簡易方法,求人不如求己。
步驟一.將所有的顯示式":",改為不顯示式":="
選股條件的基本要求為只能輸出1個條件式,故要先將公式中所有的顯示式":"改為不顯示式":=",
如果原來顯示式後面接有線型描述(顏色.對齊..等),也一並刪除
例如:
ma1:ma(c,5),colorred;
ma2:ma(c,10),colorgreen,POINTDOT;
.....
先改為
ma1:=ma(c,5);
ma2:=ma(c,10);
.....
步驟二.找出選股條件,並寫成選股式引用:
條件的尋找方法,依不同目的,大致可分以下幾種:
--------------------------------------------------------------------------------------------
1.'字'選股 如:'買'選股
方法:先找出公式中出現有'字'的地方,該式開頭會以DRAW..TEXT開頭,
DRAWTEXT DRAWTEXTEX DRAWYITEXT DRAWFLAGTEXT DRAWMOVETEXT
找到後,該函數(條件, ,'字')後面括弧內的第1個即為條件,將該條件復制出來並加上分號即可
例如:
{求'5日均>10日均'選股}
ma1:=ma(c,5);
ma2:=ma(c,10);
DRAWTEXT(ma1>ma2,ma1,'5日均>10日均');
[解]
ma1:=ma(c,5);
ma2:=ma(c,10);
ma1>ma2;
--------------------------------------------------------------------------
2.圖標選股 如:笑臉選股
方法:
先依不同軟體,找出該圖標的代號,
再找出公式中出現DRAWICON函數(條件, ,圖標代號)的式子,對照圖標的代號(括弧內的第3個),如果該圖標代號為所求代號,
該函數後面括弧內的第1個即為條件,將該條件復制出來並加上分號即可
例如:
{求圖標1選股}
ma1:=ma(c,5);
ma2:=ma(c,10);
DRAWicon(ma1>ma2,ma1,1);
[解]
ma1:=ma(c,5);
ma2:=ma(c,10);
ma1>ma2;
--------------------------------------------------------------------------------
3.A線上穿(下穿)B線選股 {上穿--金叉,下穿--死叉}
方法:A線上穿B線: cross(A,B);
A線下穿B線: cross(B,A);
例如:
{求ma1上穿ma2選股}
ma1:ma(c,5);
ma2:ma(c,10);
[解]
ma1:=ma(c,5);
ma2:=ma(c,10);
cross(ma1,ma2);
{求ma1下穿ma2選股}
ma1:ma(c,5);
ma2:ma(c,10);
[解]
ma1:=ma(c,5);
ma2:=ma(c,10);
cross(ma2,ma1);
-------------------------------------------------------------------------------------------
4.線A上穿(下穿) 選股
方法:線A上穿: cross(A,ma(A,2)); 或 cross(A,ref(A,1));
線A下穿: cross(ma(A,2),A); 或 cross(ref(A,1),A);
例如:
{求改成ma1上穿}
ma1:ma(c,5);
[解]
ma1:=ma(c,5);
cross(ma1,ma(ma1,2));
或
ma1:=ma(c,5);
cross(ma1,ref(ma1,1));
{求改成ma1下穿}
ma1:ma(c,5);
[解]
ma1:=ma(c,5);
cross(ma(ma1,2),ma1);
或
ma1:=ma(c,5);
cross(ref(ma1,1),ma1);
---------------------------------------------------------------------------------------------
5.第1次出現條件A 選股
方法:先找出條件A,
再利用cross(A,0.5);
例如:
{求改成出現圖標1選股}
ma1:=ma(c,5);
ma2:=ma(c,10);
DRAWicon(ma1>ma2,ma1,1);
[解1]
ma1:=ma(c,5);
ma2:=ma(c,10);
A:=ma1>ma2;
cross(A,0.5);
[解2--直接將條件A寫入]
ma1:=ma(c,5);
ma2:=ma(c,10);
cross(ma1>ma2,0.5);
-------------------------------------------------------------------------------------------
6.線變色選股 如:黃線變紅色選股 (指標線為黃線,再利用函數變紅色線)
方法:先依不同軟體,找出條件A,
再用cross(A,0.5);
(1)飛狐
條件在PARTLINE(條件A, ),colorred;括弧內的第1個即為條件,將該條件復制出來並加上分號即可
例如:
{求黃線變紅色選股 飛狐}
ma1:ma(c,5),coloryellow;
PARTLINE(ma1>REF(ma1,1),ma1),colorred;
[解]
ma1:=ma(c,5);
A:=ma1>REF(ma1,1);
cross(A,0.5);
(2)大智慧L2.分析家
條件在PARTLINE( ,條件A,rgb(255,0,0), , ...);
括弧內為rgb(255,0,0)的前1個即為條件,將該條件復制出來並加上分號即可
例如:
{求黃線變紅色選股 大智慧L2.分析家}
ma1:=ma(c,5);
PARTLINE(ma1,ma1>REF(ma1,1),rgb(255,0,0),1,rgb(255,255,0));
[解]
ma1:=ma(c,5);
A:=ma1>REF(ma1,1);
cross(A,0.5);
(3)通達信
條件在IF(條件A, ,DRAWNULL),colorred;括弧內的第1個即為條件,將該條件復制出來並加上分號即可
例如:
{求黃線變紅色選股 通達信}
MA1:MA(C,5),COLORYELLOW;
IF(MA1>REF(MA1,1),MA1,DRAWNULL),COLORRED;
[解]
MA1:=MA(C,5);
A:=MA1>REF(MA1,1);
CROSS(MA1>REF(MA1,1),0.5);
--------------------------------------------------------------------------------
7.顏色柱選股
方法:先找出公式中出現有STICKLINE函數的地方,
找到後,核對該函數後面的顏色,是否為所求顏色,
若顏色相同,則括弧內的第1個即為條件A,將該條件復制出來並加上分號即可
例如:
{求紅色柱選股}
STICKLINE(c>o,h,l,0.8,1),colorred;
[解]
A:c>o;
{求第1次紅色柱選股}
STICKLINE(c>o,h,l,0.8,1),colorred;
[解]
A:=c>o;
cross(A,0.5);
步驟三.最後將所有繪圖函數及單一輸出值(如 0; k; if(,,); )全刪除,使公式只剩1個選股式輸出即成,
(若有2個以上條件,條件同時成立時,可在條件間用"and"連接;
若有2個以上條件,允許條件不同時成立時,可在條件間用"or"連接);
G. 求通達信主圖指標公式
X0:=BACKSET(REF(C,3)<MA(C,3) AND REF(V,3)>MA(V,3) AND REF(C/REF(C,1)>1.03 AND C>O,3),4);
X1:=X0 AND REF(X0,1)=0;
STICKLINE(X1,H,C,0,0),COLORFF0080;
STICKLINE(X1,O,C,3,0),COLORFF0080;
STICKLINE(X1,L,O,0,0),COLORFF0080;
X3:=BACKSET(LLV(L,3)>REF(C,3) AND REF(X1,3),4);
STICKLINE(X3,REF(C,BARSLAST(X1)),REF(C,BARSLAST(X1)),5,0),COLORFF0080;
X5:=BACKSET(LLV(L,3)<REF(O,3) AND REF(X1,3),4);
STICKLINE(X5,REF(L,BARSLAST(X1)),REF(L,BARSLAST(X1)),5,0),COLORFF0080;
H. 麻煩幫看看通達信主圖公式 ma知道是什麼意思嘛
MA,通達信公式的一個函數,稱為:簡單移動平均
用法:MA(X,N),即(X1+X2+X3+...+Xn)/N,
簡單解釋上面公式這種語句,就是五日均線,十日均線,二十日一類,需要你將M1,M2,M3這些數據填寫到公式的常數框。
EMA,平滑移動平均,MA的一種變形,將MA平滑化。
MA一系列的變形是很多公式用的最多的函數,如MA,EMA,SMA等等,另外,很多公式得到一些數據,然後用MA函數將之形成連續的曲線。
I. 把MA25日均線和EXPMA14均線寫到一個公式里,主圖通達信,謝謝!
MA25:MA(C,25);
EMA14:EMA(C,14);
記得復制進去的時候 類型選擇 主圖疊加
————斯托克
J. 我想把兩個附圖公式和 MA2六條均線組合成一個主圖指標!希望您能幫忙!謝謝了!通達信!
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
MA5:MA(CLOSE,M5);
MA6:MA(CLOSE,M6);
VAR11:=EMA(EMA(C,9),9);
控盤:=(VAR11-REF(VAR11,1))/REF(VAR11,1)*1000;
VAR22:=100*WINNER(C*0.95);
STICKLINE(VAR22>50 AND COST(85)<CLOSE AND 控盤>0,O,C,1.5,0),COLORFF00FF;
VAR1:=C-REF(C,1);
VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6);
M5:=EMA(C,5);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,M5))+1),LLV(L,BARSLAST(CROSS
(MA13,M5))+1),H=HHV(H,BARSLAST(CROSS(M5,MA13))+1),HHV(H,BARSLAST(CROSS
(M5,MA13))+1),0);
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(M5,MA13))+1),HHV(H,BARSLAST(CROSS
(M5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,M5))+1),LLV(L,BARSLAST(CROSS
(MA13,M5))+1),0);
BT:=(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2))) AND
REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
DRAWTEXT(BT,L*0.99,'↑短牛'),COLOR0000FF;
TJ1:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82;
DRAWTEXT(TJ1,L*0.99,'↑中牛'),COLORFF00FF;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33;
DRAWTEXT(TJ2,L*0.97,'↑大牛'),COLOR00FFFF;
ST:=REF(UP,1)>REF(UP,2) AND DOWN<REF(UP,1);
DRAWTEXT(ST,H*1.03,'↓賣'),COLOR00FF00;
M1-M6為自定義均線參數,自設。