引用:
551.問(wèn):
分析家副圖指標(biāo)BOLL中沒(méi)有美國(guó)線,該怎么才能加上呢 答(知無(wú)不言): 分析家美國(guó)線源碼: (需下載附件,看說(shuō)明) STICKLINE(c>0,c,c,9,0),COLORCYAN; STICKLINE(c>0,o,o,9,0),COLORCYAN; DRAWBMP(c>0,c,'c'),ALIGN2; DRAWBMP(c>0,o,'o'),ALIGN0; STICKLINE(c=o,c,o,9,0),COLORCYAN; STICKLINE(c>0,h,l,0.1,0),COLORCYAN; 飛狐美國(guó)線源碼: STICKLINE(c>0,c,c,9,0)COLORCYAN; STICKLINE(c>0,o,o,9,0)COLORCYAN; DRAWSL(c>o or c<o,c,0,1,1)COLORBLACK; DRAWSL(c>o or c<o,o,0,1,0)COLORBLACK; STICKLINE(c>0,h,l,0.1,0)COLORCYAN; 引用:
552.問(wèn):
統(tǒng)計(jì)30股價(jià)兩次穿越30ma如何編寫? 答(zjz001424): 日30兩次穿越:count(cross(c,ma(c,30)),30)=2; 引用:
553.問(wèn):
求助分析家,背景圖配色原碼! 答(ddqsll201): 將下面的背景顏色語(yǔ)句,粘貼到主圖公式中(必須在第1行)即可。 顏色不行,可以調(diào)整數(shù)值。最大為255。 DRAWGBK(C,COLORRGB(0,200,210),COLORRGB(0,55,135),0); 引用:
554.問(wèn):
1995年到1996年兩年間,最高價(jià)為10元的如何寫選股公式 答(懶漢): hhv((年=1995 or 年=1996)*h,0)=10; 引用:
555.問(wèn):
要加上KDJ的J線向上時(shí)成交量VOL柱線為紅,KDJ的J線向下時(shí)成交量VOL柱線為綠. 紅柱的成交均量10天線為第一條, 綠柱的成交均量10天線第二條. 答(阿福): 線:=STKINDI('','kdj.j',0,6); STICKLINE(J線>=ref(J線,1),VOL,0,7,0)colorred; STICKLINE(J線<ref(J線,1),VOL,0,7,0)colorgreen; 紅柱量:if(J線>=ref(J線,1),V,0)colorred,LINETHICK0; 綠柱量:if(J線<ref(J線,1),V,0)colorgreen,LINETHICK0; if(J線>=ref(J線,1),ma(紅柱量,10),0)colorred; if(J線<ref(J線,1),ma(綠柱量,10),0)colorgreen; 引用:
556.問(wèn):
要顯示的項(xiàng)目過(guò)多~~結(jié)果在同一行無(wú)法完全顯示出指標(biāo)的數(shù)值~~(畫面擠不下) 可否將其顯示的內(nèi)容~~分到第二行顯示呢~?(EX:超過(guò)10條以上的均線值) 答(懶漢): MA1:=MA(CLOSE,5); MA2:=MA(CLOSE,10); MA3:=MA(CLOSE,30); MA4:=MA(CLOSE,60); p:=SYSPARAM(2); u:='ma1='+NUMTOSTR(ma1[p],3)+'ma2='+NUMTOSTR(ma2[p],3) +'\n ma3='+NUMTOSTR(ma3[p],3)+'ma4='+NUMTOSTR(ma4[p],3);//注意\n的用法 DRAWTEXT(p=barpos,SYSPARAM(4),u)ALIGN2; 引用:
557.問(wèn):
請(qǐng)教漲停板的語(yǔ)言怎么寫? 答(綠色通道): 漲停板 ls:=c/ref(c,1)>1.095 and c=h and between(forcast(V,4) ,0.2*forcast(v,12),2.1*forcast(v,12)); 漲停板:filter(ls,28)*100,COLORRED,linethick2; 引用:
558.問(wèn):
‘上一次上漲走勢(shì)最后陽(yáng)K線成交量“大于”上一次下跌走勢(shì)第一根陰K線成交量’ 答(一鳴): {先下跌后上漲為一波 上一次‘上漲走勢(shì)’最后陽(yáng)K線成交量大于上一次‘下跌走勢(shì)’第一根陰K線成交量。 不包括正在上漲或正在下跌的走勢(shì)(陰陽(yáng)k線含十字線) } k1:=cross(c,ma(c,2)+0.0001); k2:=cross(ma(c,2)+0.0001,c); bk11:=sumbars(k1,1); bk12:=sumbars(k1,2); bk21:=sumbars(k2,1); bk22:=sumbars(k2,2); bk3:=barslast(not(c<o)); k4:=not(c>o) and sum(c>o,bk21)=bk21-1; bk4:=barslast(k4); v1:=ref(v,bk3); v2:=ref(v,ref(bk4,bk11-1)+bk11-1){}; ref(v1,bk21)>ref(v2,bk21-1); 問(wèn): 只有一點(diǎn)小毛?。?br>原因:上漲時(shí)不應(yīng)該要求一定是收陽(yáng)K線,和下跌時(shí)不應(yīng)該要求一定是收陰K線,因?yàn)榇蟾庞校保保斑x出的個(gè)股都是因此而無(wú)效.(既:只要股價(jià)高于昨天的就算上漲了,和只要股價(jià)低于昨天的就算是下跌了). 另外:請(qǐng)老師把公式改成"只要后天股價(jià)等于前天股價(jià)就算是下跌" 答(一鳴): 另外"只要后天股價(jià)等于前天股價(jià)就算是下跌", 這個(gè)公式變數(shù)太大,難以掌握! {先下跌后上漲為一波 上一次‘上漲走勢(shì)’最后K線成交量大于上一次‘下跌走勢(shì)’第一根K線成交量。 不包括正在上漲或正在下跌的走勢(shì) } k2:=cross(ma(c,2)+0.0001,c); bk21:=sumbars(k2,1); v2:=ref(v,bk21-1); ref(v,bk21)>ref(v2,bk21); 引用:
559.問(wèn):
把下面的語(yǔ)句在分析家主圖中用直線顯示。 PP:=(H + L + C) / 3; S1:=(2* PP) - H; R1:=(2* PP) - L ; S2:=PP - (H - L); R2:=PP + (H - L); 答(阿遠(yuǎn)): PP:=(H + L + C) / 3; S1:=(2* PP) - H; R1:=(2* PP) - L ; S2:=PP - (H - L); R2:=PP + (H - L); STICKLINE(BARSTATUS=2,pp,pp,15,1); STICKLINE(BARSTATUS=2,s1,s1,15,1); STICKLINE(BARSTATUS=2,r1,r1,15,1); STICKLINE(BARSTATUS=2,s2,s2,15,1); STICKLINE(BARSTATUS=2,r2,r2,15,1); 引用:
560.問(wèn):
前5天收十字型的公式如何寫 答(一鳴): {5天前收十字} ref(c,5)=ref(o,5); 引用:
561.問(wèn):
請(qǐng)教,如何在飛狐指標(biāo)欄加上證指數(shù) 答(知無(wú)不言): 別名: 對(duì)應(yīng)大盤收盤價(jià) 所屬類別: 行情函數(shù) 參數(shù)數(shù)量: 0 對(duì)應(yīng)大盤指數(shù)收盤價(jià)。 用法: INDEXC,表示同期大盤的收盤價(jià) 答(隨便看看): Var1:="1A0001$CLOSE"; Var2:="1A0001$OPEN"; Var3:="1A0001$HIGH"; Var4:="1A0001$LOW"; STICKLINE(Var1>Var2,Var1,Var2,7,1),color0000ff; STICKLINE(Var1>Var2 OR Var1=Var2,Var3,MAX(Var1,Var2),0,1),color0000ff; STICKLINE(Var1>Var2 OR Var1=Var2,MIN(Var1,Var2),Var4,0,1),color0000ff; STICKLINE(Var1<Var2,Var1,Var2,7,0), , color00ff00; STICKLINE(Var1<Var2,Var3,MAX(Var1,Var2),0,1),color00ff00; STICKLINE(Var1<Var2,MIN(Var1,Var2),Var4,0,1),color00ff00; STICKLINE(Var1=Var2,Var1,Var2,7,0), colorffffff; 開(kāi)盤: Var2, POINTDOT; 收盤: Var1, POINTDOT; 最高: Var3, POINTDOT; 最低: Var4, POINTDOT; 十三: EMA(Var1,13); 三十四: MA((Var3+Var4)/2,34); 半年線: MA((Var3+Var4)/2,125), POINTDOT; 引用:
562.問(wèn):
傅立葉變換。 用法: FFT(X,N):對(duì)序列X進(jìn)行傅立葉變換或變換處理后反變換. 例如: 當(dāng)N=0時(shí)對(duì)序列X進(jìn)行傅立葉變換 當(dāng)N=1時(shí)對(duì)序列X進(jìn)行傅立葉變換并反變換回來(lái),與原X一致 當(dāng)N>1時(shí)對(duì)序列X進(jìn)行傅立葉變換并略去周期小于N的成分再反變 有辦法把傅立葉變換 未來(lái)數(shù)拒函數(shù)昨天數(shù)值固定住? FFT(CLOSE,30)? 答(水蕓兒): 傅立葉數(shù)組請(qǐng)見(jiàn)184問(wèn)中敘述 。 這問(wèn)題需自行寫一個(gè)把數(shù)組長(zhǎng)度做為參數(shù)的fft函數(shù)才可解決,如fft(c,30,datacount-n); 引用:
563.問(wèn):
MA1: INTPART(MA(C,10)),PRECIS0; 用上面的源碼排序怎么小數(shù)點(diǎn)后面還有三個(gè)0,請(qǐng)老師用分析家機(jī)構(gòu)版寫一下 答(知無(wú)不言): 寫法正確,分析家v2005網(wǎng)絡(luò)版 引用:
564.問(wèn):
分析家周均線如何表達(dá)? a:=ma(c,10); 代表10天平均線 那么10周均線如何表達(dá)呢? 不會(huì)是 a:=ma(c,50); 這么簡(jiǎn)單吧: 答(股票交易人): "MA.MA1#week"(10); 引用:
565.問(wèn):
盤中漲幅大于5%怎么編呀 答(多多): c/ref(c,1)>1.05 引用:
566.問(wèn):
公式描述: 今日收盤價(jià)低于前一次反彈上漲走勢(shì)的最后收盤價(jià)(提示:如果只上漲一天的也算是反彈上 漲走勢(shì))。(分析家軟件使用) 答(一鳴): c<hhv(c,BARSLAST(CROSS(C,MA(C,2)+0.0001))+1); 上面公式只能把今日下跌的選出來(lái),但如果今天是上漲的它就選不出來(lái),今日上漲還是下跌 都包括在內(nèi),則用下面 c<ref(c,BARSLAST(CROSS(MA(C,2),C+0.0001))+1); 引用:
567.問(wèn):
編一個(gè)周MACD指標(biāo)DIF值在-0.20到0之間發(fā)出信號(hào)分析家用的選股公式 答(江南煙雨): BETWEEN("macd.diff#week",-0.2,0); 引用:
568.問(wèn):
因不慎將指標(biāo)刪除,特再次求助!該指標(biāo)也是從咱們這里看到的,具體內(nèi)容不記得了, 好象是說(shuō)10日線和20形成金叉買進(jìn),但這不是全部?jī)?nèi)容,只是一部分,望廣大股友知道的能夠告之 答(抄底高手): 這樣找:如果是分析家就采取引入公式的方法--在superstk的self下找dta文件, 找你刪除前的日期的文件,引入到分析家中就有了! 引用:
569.問(wèn):
如何總是在右邊倒數(shù)第五根K線上畫柱線,就是總在倒數(shù)第五根K線上顯示所畫柱線。fxj 答(一鳴): {分析家,總在最后1天倒數(shù)第五根K線上畫柱線}{視個(gè)人需要變更H及L} stickline(filter(backset(BARSTATUS=2,5),4),H,L,8,0); 引用:
570.問(wèn):
如股價(jià)跌破 60日內(nèi) 30M最高值,劃的線不需要太長(zhǎng)。 fxj 答(一鳴): {分析家} m1:ma(c,30); k0:=ref(m1,1)=ref(hhv(m1,60),1) and cross(ma(m1,2),m1+0.0001); stickline(backset(ref(k0,10),11),ref(m1,barslast(k0)+1),ref(m1,barslast(k0)+1),11,0),linethick2; {飛狐} m1:ma(c,30); k0:=m1=hhv(m1,60) and refx(cross(ma(m1,2),m1+0.0001),1); stickline(backset(ref(k0,9),10),ref(m1,barslast(k0)),ref(m1,barslast(k0)),10,0),linethick2; 引用:
571.問(wèn):
MA1:=MA(C,5); MA2:=MA(C,10); MA3:=MA(C,20); A1:=(OPEN<MA1 AND OPEN<MA2) OR (OPEN<MA2 AND OPEN<MA3) OR (OPEN<MA1 AND OPEN<MA3); A2:=C>MAX(MA1,MAX(MA2,MA3)); A3:=V/MA(V,30)>1.2; A4:=C/REF(C,1)>1.049; aa:=A1 AND A2 AND A3 AND A4; a1 and a2 and a3 and a4 and (ref(barslast(aa),1)>60 or barssince(aa)=0); 第一:上面公式所表達(dá)的意思是....??? 第二:求助,編一個(gè)分析家5.0的公式: "上市交易日小于300天" 答(yyzzqq): 一 A1=開(kāi)盤價(jià)小于5日10日20日均線的其中兩條。 A2=收盤價(jià)大于5日10日20日均線。 A3=成交量是30日均量的1.2倍。 A4=日漲幅大于4.9%。 aa=A1,A2 , A3 ,A4條件都成立。 aa條件在60日內(nèi)第一次成立。 二 barssince(c)<300; 引用:
572.問(wèn):
如何編制某日(或當(dāng)日)跌幅超過(guò)5%個(gè)股的數(shù)量,并標(biāo)出占總股的比例 答(yyzzqq): c<ref(c,1)*0.95; 建橫向統(tǒng)計(jì)數(shù)據(jù)。 引用:
573.問(wèn):
N天內(nèi)股價(jià)從最高點(diǎn)回落百分5(當(dāng)天的動(dòng)態(tài)K線價(jià)位上標(biāo)示一彩色小短橫線)fxj 答(馨蕓): aa:=ref( (HHV(h,N)-C)/HHV(h,N)*100,1) < 5 and (HHV(h,N)-C)/HHV(h,N)*100>5; HHV(h,N); stickline(aa,HHV(h,N)-HHV(h,N)*0.05,HHV(h,N)-HHV (h,N*0.05,40,0),coloryellow,linethick2; 引用:
574.問(wèn):
我用飛狐,想表達(dá)這幾句(★長(zhǎng)下影★長(zhǎng)上影★長(zhǎng)十字★垂死十字)文字在主圖上,寫個(gè)源碼,我要只是加在主圖后面的那那種 ★長(zhǎng)下影:(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.667; ★長(zhǎng)上影:(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.667; ★長(zhǎng)十字:CLOSE=OPEN AND HIGH/LOW >1.03; ★垂死十字:CLOSE=OPEN AND CLOSE=LOW AND CLOSE<>HIGH; 答(騎兵00): 類似這樣試試: DRAWTEXT(★長(zhǎng)下影,h*1.02,'★長(zhǎng)下影'); 答(馨蕓): ★下影:=(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.667; ★上影:=(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.667; ★十字:=CLOSE=OPEN AND HIGH/LOW >1.03; ★垂死十字:=CLOSE=OPEN AND CLOSE=LOW AND CLOSE<>HIGH; drawtext(★下影,if(★下影=ref(★下影,1),L*0.98,L*0.99),'★長(zhǎng)下影'),coloryellow; drawtext(★上影,if(★上影=ref(★上影,1),H*1.005,H*1.01),'★長(zhǎng)上影'),colorgreen; drawtext(★十字,if(★十字=ref(★十字,1),(H+c)/2*1.005,(H+c)/2*1.01),'★長(zhǎng)十字'),colorwhite; drawtext(★垂死十字,if(★垂死十字=ref(★垂死十字,1),(L+c)/2*1.005, (L+c)/2*1.01),'★垂死十字'),colorff9900; , 引用:
575.問(wèn):
CG:ma(C,17); FL:hhv(CG,2); FS:CG-(FL-CG); PARTLINE(CG=FL and fl=fs,fs),colorred,linethick3; 我想把分散的三條線用白色的小圓卷來(lái)代替(CIRCLEDOT) 答(馨蕓): 一, CG:ma(C,17),pointdot,linethick4,colormagenta; partline(1,cg),colormagenta,pointdot; FL:hhv(CG,2),pointdot,linethick3,colorwhite; partline(1,fl),colorwhite,pointdot; FS:CG-(FL-CG),pointdot,linethick3,colorgreen; partline(1,fs),colorgreen,pointdot; PARTLINE(CG=FL and fl=fs,fs),colorred,linethick3; 二, CG:=ma(C,17),circledot,colormagenta; // partline(1,cg),colormagenta,pointdot; FL:=hhv(CG,2),pointdot,linethick3,colorwhite; // partline(1,fl),colorwhite,pointdot; FS:=CG-(FL-CG),pointdot,linethick3,colorgreen; partline(fl<>cg,cg),circledot,colormagenta; // partline(1,fs),colorgreen,pointdot; PARTLINE(CG=FL and fl=fs,fs),colorred,linethick3; 引用:
576.問(wèn):
我想用上面的六根均線做一個(gè)六線開(kāi)金叉的盤中的預(yù)警公式 ma5:MA(CLOSE,5),LINEDOT; ma20:MA(CLOSE,20),LINEDOT; MA34:MA(CLOSE,34),LINEDOT; MA55:MA(CLOSE,55),LINEDOT; ma77:MA(CLOSE,77),LINEDOT; ma99:MA(CLOSE,99),LINEDOT; 答(zxcv-889): 一, ma5:=MA(CLOSE,5),LINEDOT; ma20:=MA(CLOSE,20),LINEDOT; MA34:=MA(CLOSE,34),LINEDOT; MA55:=MA(CLOSE,55),LINEDOT; ma77:=MA(CLOSE,77),LINEDOT; ma99:=MA(CLOSE,99),LINEDOT; ma5>ma34 and ma34>ma55 ma55>ma77 and ma77>ma99; 二, ma5:=MA(CLOSE,5),LINEDOT; ma20:=MA(CLOSE,20),LINEDOT; MA34:=MA(CLOSE,34),LINEDOT; MA55:=MA(CLOSE,55),LINEDOT; ma77:=MA(CLOSE,77),LINEDOT; ma99:=MA(CLOSE,99),LINEDOT; ma5>ma34 and ma34>ma55 ma55>ma77 and ma77>ma99 and ma5/ma34<n; 加了一個(gè)條件:and ma5/ma34<n, N多大自己去調(diào)試. 三,飛狐的 ma5:=MA(CLOSE,5); ma20:=MA(CLOSE,20); MA34:=MA(CLOSE,34); MA55:=MA(CLOSE,55); ma77:=MA(CLOSE,77); ma99:=MA(CLOSE,99); ma5>ma34 and ma34>ma55 and ma55>ma77 and ma77>ma99; 引用:
577.問(wèn):
我想六線開(kāi)金叉是象: KDJ 的那種的才是金叉吧, 不過(guò)好像這六根均線的出現(xiàn)有點(diǎn)難,機(jī) 會(huì)少點(diǎn),不過(guò)一但出現(xiàn),必然是大牛股了, 那么再簡(jiǎn)化一點(diǎn)的用5日 34 日 99日這三根線的開(kāi)金叉就可能機(jī)會(huì)多了很多吧,也是一種三線開(kāi)花吧!我喜歡這種形態(tài)的 答(股市浪子): 均線同時(shí)交叉的幾率很小,試試少幾個(gè)條件的,如: CROSS(MA5,MA34) AND CROSS(MA34,MA99); 別名: 交叉函數(shù) 所屬類別: 邏輯函數(shù) 參數(shù)數(shù)量: 2 兩條線交叉。 用法: CROSS(A,B)表示當(dāng)A從下方向上穿過(guò)B時(shí)返回1,否則返回0 例如: CROSS(MA(CLOSE,10),MA(CLOSE,20))表示10日均線與20日均線交金叉 引用:
578.問(wèn):
CROSS(MA5,MA34) AND CROSS(MA34,MA99); 語(yǔ)句缺少分號(hào) ? 答(股市浪子): 你把最后那個(gè)分號(hào)抹掉,重新點(diǎn)一個(gè),可能是中文標(biāo)點(diǎn)。 引用:
579.問(wèn):
我想搞一個(gè) MACD 和 RSI 同時(shí)在兩天之內(nèi)出現(xiàn)底背離共振的選股公式: A1:=BARSLAST(ref(cross("macd.diff","macd.dea"),1)); B1:=ref(c,A1+1)>c and ref("macd.diff",A1+1)<"macd.diff" and cross ("macd.diff","macd.dea"); DRAWTEXT(FILTER(B1>0,5),0,'MACD'),COLORGREEN,ALIGN0;; Stickline(FILTER(B1>0,5),-1,0,1,0),COLORGREEN; A3:=BARSLAST(ref(cross("RSI.RSI1","RSI.RSI2"),1)); B3:=ref(c,A3+1)>c and ref("RSI.RSI1",A3+1)<"RSI.RSI1" and cross ("RSI.RSI1","RSI.RSI2"); DRAWTEXT(FILTER(B3>0,5),-0.25,'RSI'),COLORCYAN,ALIGN0;; Stickline(FILTER(B3>0,5),-1,-0.25,1,0),COLORCYAN; C1:=BARSLAST(ref(cross("macd.dea","macd.diff"),1)); D1:=ref(c,C1+1)<c and ref("macd.diff",C1+1)>"macd.diff" and cross ("macd.dea","macd.diff"); DRAWTEXT(FILTER(D1>0,5),-0.5,'MACD'),COLORwhite,ALIGN0; Stickline(FILTER(D1>0,5),-0.5,1,1,0),COLORwhite; C3:=BARSLAST(ref(cross("RSI.RSI2","RSI.RSI1"),1)); D3:=ref(c,C3+1)<c and ref("RSI.RSI1",C3+1)>"RSI.RSI1" and cross ("RSI.RSI2","RSI.RSI1"); DRAWTEXT(FILTER(D3>0,5),0.25,'RSI'),COLORMAGENTA,ALIGN0; Stickline(FILTER(D3>0,5),1,0.25,1,0),COLORMAGENTA; 答(馨蕓): xx1:=(count(FILTER(B1>0,5),2)>=1)*2; xx2:=count(FILTER(B3>0,5),2)>=1; xx3:=(xx1=2 and xx2=1)*5; xx4:ref(xx3,1)=0 and xx3=5; 答(achen): {底背共振} A1:=BARSLAST(ref(cross("macd.diff","macd.dea"),1)); B1:=ref(c,A1+1)>c and ref("macd.diff",A1+1)<"macd.diff" and cross ("macd.diff","macd.dea"); A3:=BARSLAST(ref(cross("RSI.RSI1","RSI.RSI2"),1)); B3:=ref(c,A3+1)>c and ref("RSI.RSI1",A3+1)<"RSI.RSI1" and cross ("RSI.RSI1","RSI.RSI2"); xx1:=(count(FILTER(B1>0,5),2)>=1)*2; xx2:=count(FILTER(B3>0,5),2)>=1; xx3:=(xx1=2 and xx2=1)*5; 底背共振:ref(xx3,1)=0 and xx3=5; 引用:
580.問(wèn):
★下影:=(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.667; ★上影:=(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.667; ★十字:=CLOSE=OPEN AND HIGH/LOW >1.03; drawtext(★下影,if(★下影=ref(★下影,1),L*0.98,L*0.99),'★長(zhǎng)下影'),coloryellow; drawtext(★上影,if(★上影=ref(★上影,1),H*1.005,H*1.01),'★長(zhǎng)上影'),colorgreen; drawtext(★十字,if(★十字=ref(★十字,1),(H+c)/2*1.005,(H+c)/2*1.01),'★長(zhǎng)十字'),colorwhite; 我想只要上下影線的線的升跌幅超過(guò)了 2.6% 才發(fā)出信號(hào)來(lái)(如果能夠加上前三天的 K 線組合總加起來(lái)升跌幅達(dá)七個(gè)點(diǎn)才發(fā)出信號(hào)) 長(zhǎng)十字星的上下線是大于三個(gè)點(diǎn)(上面三個(gè)點(diǎn),下面三個(gè)點(diǎn)) 答(馨蕓): 用影線做訊號(hào)是危險(xiǎn)的,這不便幫你 要訊號(hào)可參這個(gè) 黃線,綠線是抄底,紅線是追漲 藍(lán)線是逃頂 黃線,綠線訊號(hào)太多時(shí),可試著調(diào)整 vertline(攻擊>50),colorgreen; 50- - - ->60, 70,80…… vertline(出擊>60),coloryellow;60 - - - ->70, 80,90…… 原碼 n:=40; VAR1:=EMA(HHV(HIGH,120),21); VAR2:=EMA(HHV(HIGH,60),21); VAR3:=EMA(HHV(HIGH,30),21); VAR4:=EMA(LLV(LOW,120),21); VAR5:=EMA(LLV(LOW,60),21); VAR6:=EMA(LLV(LOW,30),21); VAR7:=EMA((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR1*0.558+VAR2*0.558+VAR3*0.558)/6,21); VAR8:=EMA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR1*0.55+VAR2*0.55+VAR3*0.65)/6,21); VAR9:=EMA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR1*0.68+VAR2*0.68+VAR3*0.68)/6,21); VARA:=EMA((VAR7*3+VAR8*2+VAR9)/6*1.738,21); VARB:=REF(LOW,1); VARC:=SMA(ABS(LOW-VARB),3,1)/SMA(MAX(LOW-VARB,0),3,1)*100; VARD:=EMA(IF(CLOSE*1.35<=VARA,VARC*10,VARC/10),3); VARE:=LLV(LOW,30); VARF:=HHV(VARD,30); VAR10:=IF(MA(CLOSE,58),1,0); MID:=REF(HIGH+LOW,1)/2; VAR12:=SUM(MAX(0,HIGH-MID),N)/SUM(MAX(0,MID-LOW),N)*100 ; CR:=IF(VAR12<230,VAR12,230),COLORcyan; VAR11:=EMA(IF(LOW<=VARE,(VARD+VARF*2)/2,0),3)/618*VAR10; VAR13:=IF(VAR11>115,115,VAR11); VAR14:=IF(VAR12<24.5,24.5,VAR12); 攻擊:=IF(VAR12<60 AND VAR11>10,5500/VAR14,0),COLORGREEN; vertline(攻擊>50),colorgreen; 出擊:=IF(VAR13>20,VAR13*2,0),COLORYELLOW; vertline(出擊>60),coloryellow; 趨勢(shì)線:= ((3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA (SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)-50) *1.032+50)*2,COLORRED; 買入:= IF(CROSS(趨勢(shì)線,30),150,0),COLORWHITE; vertline(買入),COLORred; 賣出:= IF(CROSS(190,趨勢(shì)線),150,220),COLORFFAA00; vertline(賣出<>220),COLORFFAA00; 問(wèn): 上影線和下影線的 K 線信號(hào),因?yàn)槲沂且钥?k 線組圖為主的,有一個(gè)明顯一點(diǎn)的短線炒底和短線走人的信號(hào)會(huì)對(duì)我有幫助的,我喜歡在上影線走人,在下影線搶貨的, 答(馨蕓): ★下影:=(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.667; ★上影:=(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.667; ★十字:=CLOSE=OPEN AND HIGH/LOW >1.03; ★垂死十字:=CLOSE=OPEN AND CLOSE=LOW AND CLOSE<>HIGH; drawtext(★下影,if(★下影=ref(★下影,1),L*0.98,L*0.99),'★長(zhǎng)下影'),coloryellow; drawtext(★上影,if(★上影=ref(★上影,1),H*1.005,H*1.01),'★長(zhǎng)上影'),colorgreen; drawtext(★十字,if(★十字=ref(★十字,1),(H+c)/2*1.005,(H+c)/2*1.01),'★長(zhǎng)十字'),colorwhite; drawtext(★垂死十字,if(★垂死十字=ref(★垂死十字,1),(L+c)/2*1.005, (L+c)/2*1.01),'★垂死十字'),colorff9900; vertline((MIN(CLOSE,OPEN)-LOW)/(LOW)>0.026),colormagenta; vertline((HIGH-MAX(CLOSE,OPEN))/(HIGH)>0.026),colorff9900; aa:10*((c-llv(c,3))/llv(c,3)*100>7)coloryellow; bb:20*((HHV(C,3)-C)/HHV(C,3)*100>7)colorwhite; AC:=C; AH:=H; AL:=L; AO:=O; STICKLINE(AC>=AO,AH,AC,1,0),color225588; STICKLINE(AC>=AO,AH,AC,0,0),color66ccff; STICKLINE(AC>=AO,AO,AL,1,0),color225588; STICKLINE(AC>=AO,AO,AL,0,0),color66ccff; STICKLINE(AC>AO,AC,AO,8,0),COLOR225588; STICKLINE(AC>AO,AC,AO,7,0),COLOR226699; STICKLINE(AC>AO,AC,AO,6,0),COLOR3377aa; STICKLINE(AC>AO,AC,AO,5,0),COLOR3388bb; STICKLINE(AC>AO,AC,AO,4,0),COLOR4499cc; STICKLINE(AC>AO,AC,AO,3,0),COLOR44aadd; STICKLINE(AC>AO,AC,AO,2,0),COLOR55bbee; STICKLINE(AC>AO,AC,AO,1,0),COLOR66ccff; STICKLINE(AC<=AO,AH,AC,1,0),color888800; STICKLINE(AC<=AO,AH,AC,0,0),colorffff00; sTICKLINE(AC<=AO,AO,AL,1,0),color888800; STICKLINE(AC<=AO,AO,AL,0,0),colorffff00; STICKLINE(AC<=AO,AC,AO,8,0),COLOR888800; STICKLINE(AC<=AO,AC,AO,7,0),COLOR999900; STICKLINE(AC<=AO,AC,AO,6,0),COLORaaaa00; STICKLINE(AC<=AO,AC,AO,5,0),COLORbbbb00; STICKLINE(AC<=AO,AC,AO,4,0),COLORcccc00; STICKLINE(AC<=AO,AC,AO,3,0),COLORdddd00; STICKLINE(AC<=AO,AC,AO,2,0),COLOReeee00; STICKLINE(AC<=AO,AC,AO,1,0),COLORffff00; 引用:
581.問(wèn):
求高手幫編一個(gè)連續(xù)三天以上收陰的選股公式 答(了無(wú)痕): {連陰>=3天} XG:COUNT(C<O OR C=O AND C<=REF(C,1),3)=3; {陰十字也算陰} 引用:
582.問(wèn):
誰(shuí)有 70萬(wàn) 組合的源碼 答(阿耀): 我收集的 上去:ema(c,n1),colorred; 下來(lái):ema(c,n2),colorgreen; 中間:ema(下來(lái),n2),colorwhite,linethick2; Varf1:=COUNT(CROSS(上去,中間),2)=1; Varf2:=COUNT(CROSS(下來(lái),中間),2)=1; ZAI:=FILTER(Varf1 AND Varf2,2); DRAWTEXT(zai,中間,'¤再上去'),colorwhite; DRAWTEXT(cross(上去,下來(lái)),下來(lái),'★上去↑'),colorred; DRAWTEXT(cross(下來(lái),上去),下來(lái),'☆下來(lái)↓'),colorgreen; Vv2:=REF(close,1); Vv3:=SMA((close-Vv2),6,1)/SMA(ABS(close-Vv2),6,1)*100; DRAWICON(ref(vv3,1)>81 and vv3<80,high,5); DRAWTEXT(ref(vv3,1)>81 and vv3<80,high*1.39,'做頂↓'),coloryellow; VF1:=MA(CLOSE,60)-MA(CLOSE,5)/3.2; DRAWTEXT(IF(CLOSE<VF1 AND VOL/240>MA(VOL,5)/240 AND CLOSE>=REF(CLOSE,1)*1.08 AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW,'☆'),colorred; VarA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100; VarB:=EMA(0.667*REF(VarA,1)+0.333*VarA,5); DRAWTEXT(IF(VOL>=1.3*MA(VOL,5) AND COUNT(VarA>=VarB and VarA<-17,3) AND REF(LOW,1)=LLV(LOW,120),1,0),LOW,'★注意買入'); Varr1:=SMA(MAX(CLOSE-ref(c,1),0),6,1)/SMA(ABS(CLOSE-ref(c,1)),6,1)*100; DRAWICON(CROSS(82,Varr1),HIGH*1.05,5);//2 DRAWTEXT(CROSS(82,Varr1),high*1.08,'做頂↓'),coloryellow; Var1:=(HIGH+LOW+OPEN+2*CLOSE)/5; Var2:=REF(Var1,1); Var3:=SMA(MAX(Var1-Var2,0),10,1)/SMA(ABS(Var1-Var2),10,1)*100; HY3:=IF(COUNT(Var3<20,5)>=1 AND COUNT(Var1=LLV(Var1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0); DRAWTEXT(hy3,low,'▲注意買入'),colorred; n1 3/1/100 n2 5/1/100主圖 我n1選8 n2選60 引用:
583.問(wèn):
Var3:=100-(100-3*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)) *100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)) *100,20,1),15,1)); Var4:=100-(100-3*SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)) *100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)) *100,20,1),15,1)); t7:=Var3>REF(Var4,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1); 想要一個(gè)選出下面信號(hào)的粗選股公式出來(lái): B7:=DRAWTEXT(t7 and COUNT(t7,30)=1,30,'☆注意 '),COLORYELLOW; 答(了無(wú)痕): Var3:=100-(100-3*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)) *100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)) *100,20,1),15,1)); Var4:=100-(100-3*SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)) *100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)) *100,20,1),15,1)); t7:=Var3>REF(Var4,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1); XG:t7 and COUNT(t7,30)=1; 引用:
584.問(wèn):
如下式中:請(qǐng)幫寫: 1.zq1天數(shù)內(nèi),漲幅>ref(漲幅,1)時(shí)陽(yáng)線漲幅和。 2..zq1天數(shù)內(nèi),漲幅<ref(漲幅,1)時(shí)陰線跌幅和. b:=ma(c,30); jc:=refx(cross(b,ma(b,2)+0.0001) or cross(ma(b,2),b+0.0001) ,1); zq1:BARSLAST(jc=1),LINETHICK0; zf:=(c-ref(c,1))/ref(c,1)*100; 漲幅:sum(zf,zq1),Color0000FF,linethick1; z1:=漲幅>ref(漲幅,1); z2:=漲幅<ref(漲幅,1); 答(wzlhm ): b:=ma(c,30); jc:=refx(cross(b,ma(b,2)+0.0001) or cross(ma(b,2),b+0.0001) ,1); zq1:BARSLAST(jc=1)+1,LINETHICK0; zf:=(c-ref(c,1))/ref(c,1)*100; 漲幅:sum(zf,zq1),Color0000FF,linethick1; z1:=漲幅>ref(漲幅,1); z2:=漲幅<ref(漲幅,1); {以上是你原來(lái)的代碼} 陽(yáng)線漲幅和:SUM(z1*zf*ISUP,zq1);{1.zq1天數(shù)內(nèi),漲幅>ref(漲幅,1)時(shí)陽(yáng)線漲幅和。} 陰線跌幅和:SUM(z2*zf*ISDOWN,zq1);{ 2..zq1天數(shù)內(nèi),漲幅<ref(漲幅,1)時(shí)陰線跌幅和.} 引用:
585.問(wèn):
比如說(shuō)我編一個(gè)關(guān)于K線的指標(biāo),可是如果全在圖上標(biāo)出文字,那圖面就太復(fù)雜了。能不能 等光標(biāo)移到那里,他才在光標(biāo)位置顯示"早晨之星"之類的? 答(雪狐): 是這樣! smd:=BACKSET(REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1) < REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2),3); DRAWTEXT( smd and SYSPARAM(1)=BARSCOUNT(c) ,l,'早晨之星'),SHIFT1 ,ALIGN1, COLORyellow; 引用:
586.問(wèn):
這個(gè)公式應(yīng)該怎么寫[分析家] KDJ指標(biāo)的日、周、月同時(shí)出現(xiàn)低位金叉? 答(一鳴): {KDJ指標(biāo)的日、周、月同時(shí)出現(xiàn)低位金叉 } input:n1(20),n2(30); K1:="KDJ.K#DAY"; D1:="KDJ.D#DAY"; K2:="KDJ.K#WEEK"; D2:="KDJ.D#WEEK"; K3:="KDJ.K#MONTH"; D3:="KDJ.D#MONTH"; ck:=ref(k1,1)<=n1 and k2<=n2 and k3<=n2; ck and cross(k1,k2+0.0009) and k2>d2 and k3>d3; {真正同時(shí)金叉應(yīng)該這樣寫:(但選出股票的機(jī)率低) ckw:=ref(cross(k2,d2+0.0009),barslast(k2<>ref(k2,1))); ckm:=ref(cross(k3,d3+0.0009),barslast(k3<>ref(k3,1))); ck and cross(k1,k2+0.0009) and ckw and ckm;} 引用:
587.問(wèn):
均線從粘連開(kāi)始發(fā)散這個(gè)公式怎么寫? 答(一鳴): 總覺(jué)得成功率不高,參考看看 {二十條均線的粘合度以三個(gè)點(diǎn)以內(nèi),然后向上發(fā)散} ema10:=ema(c,10); ema20:=ema(c,20); ema30 :=ema(c,30); ema40 :=ema(c,40); ema50:=ema(c,50); ema60:=ema(c,60); ema70:=ema(c,70); ema80:=ema(c,80); ema90:=ema(c,90); ema100:=ema(c,100); ema110:=ema(c,110); ema120:=ema(c,120); ema130:=ema(c,130); ema140:=ema(c,140); ema150:=ema(c,150); ema160:=ema(c,160); ema170:=ema(c,170); ema180:=ema(c,180); ema190:=ema(c,190); ema200:=ema(c,200); k1:=max(ema10,max(ema20,max( ema30 ,max(ema40 ,max(ema50 ,max(ema60 ,max(ema70 , max(ema80,max(ema90 ,max(ema100,max(ema110,max( ema120 ,max(ema130,max( ema140 , max(ema150 ,max(ema160,max( ema170 ,max(ema180 ,max(ema190, ema200))))))))))))))))))); k2:=min(ema10,min(ema20,min( ema30 ,min(ema40 ,min(ema50 ,min(ema60 ,min(ema70 , min(ema80,min(ema90 ,min(ema100,min(ema110,min( ema120 ,min(ema130,min( ema140 , min(ema150 ,min(ema160,min( ema170 ,min(ema180 ,min(ema190, ema200))))))))))))))))))); k3:=ema10>ema20 and ema20>ema30 and ema30> ema40 and ema40> ema50 and ema50> ema60 and ema60>ema70 and ema70> ema80 and ema80>ema90 and ema90> ema100 and ema100>ema110 and ema110> ema120 and ema120>ema130 and ema130>ema140 and ema140> ema150 and ema150> ema160 and ema160>ema170 and ema170>ema180 and ema180>ema190 and ema190>ema200 ; k4:=ema10>ref(ema10,1) and ema20>ref(ema20,1) and ema30>ref(ema30,1) and ema40>ref(ema40,1) and ema50>ref(ema50,1) and ema60>ref(ema60,1) and ema70>ref(ema70,1) and ema80>ref(ema80,1) and ema90>ref(ema90,1) and ema100>ref(ema100,1) and ema110>ref(ema110,1) and ema120>ref(ema120,1) and ema130>ref(ema130,1) and ema140>ref(ema140,1) and ema150>ref(ema150,1) and ema160>ref(ema160,1) and ema170>ref(ema170,1) and ema180>ref(ema180,1) and ema190>ref(ema190,1) and ema200>ref(ema200,1); k5:=barslast(k1/k2<=1.03)<=10; cross(k3,0.5) and k4 and k5; 答(一鳴): 干脆再做一個(gè)均線數(shù)量可調(diào)整,愛(ài)用幾條線,就用幾條線, 在公式中轉(zhuǎn)來(lái)轉(zhuǎn)去,真的有點(diǎn)暈了 {二十條均線的粘合度在三個(gè)點(diǎn)以內(nèi),然后向上發(fā)散, 均線數(shù)量可調(diào),要用幾條就用幾條} input:n(20,2,20);//n條均線 e1:=ema(c,10); e2:=ema(c,20); e3:=ema(c,30); e4:=ema(c,40); e5:=ema(c,50); e6:=ema(c,60); e7:=ema(c,70); e8:=ema(c,80); e9:=ema(c,90); e10:=ema(c,100); e11:=ema(c,110); e12:=ema(c,120); e13:=ema(c,130); e14:=ema(c,140); e15:=ema(c,150); e16:=ema(c,160); e17:=ema(c,170); e18:=ema(c,180); e19:=ema(c,190); e20:=ema(c,200); k1:=max(e1,max(e2,max( e3*(n>=3) ,max(e4 *(n>=4),max(e5*(n>=5) ,max(e6*(n>=6) , max(e7*(n>=7) ,max(e8*(n>=8),max(e9*(n>=9) ,max(e10*(n>=10),max(e11*(n>=11), max( e12*(n>=12) ,max(e13*(n>=13),max( e14*(n>=14) ,max(e15*(n>=15) ,max(e16*(n>=16), max( e17*(n>=17) ,max(e18*(n>=18) ,max(e19*(n>=19), e20*(n>=20)))))))))))))))))))); k2:=min(e1,min(e2,min( e3+(n<3)*10000 ,min(e4+(n<4)*10000 ,min(e5+(n<5)*10000 , min(e6+(n<6)*10000 ,min(e7+(n<7)*10000 ,min(e8+(n<8)*10000,min(e9+(n<9)*10000 , min(e10+(n<10)*10000,min(e11+(n<11)*10000,min( e12+(n<12)*10000 ,min(e13+(n<13)*10000, min( e14+(n<14)*10000 ,min(e15 +(n<15)*10000,min(e16+(n<16)*10000,min( e17 +(n<17)*10000, min(e18+(n<18)*10000 ,min(e19+(n<19)*10000, e20+(n<20)*10000))))))))))))))))))); k3:=e1>e2 and if(n>=3,e2>e3,c>0) and if(n>=4,e3> e4,c>0) and if(n>=5,e4> e5,c>0) and if(n>=6,e5> e6,c>0) and if(n>=7,e6>e7,c>0) and if(n>=8,e7> e8,c>0) and if(n>=9,e8>e9,c>0) and if(n>=10,e9> e10,c>0) and if(n>=11,e10>e11,c>0) and if(n>=12,e11> e12,c>0) and if(n>=13,e12>e13,c>0) and if(n>=14,e13>e14,c>0) and if(n>=15,e14> e15,c>0) and if(n>=16,e15> e16,c>0) and if(n>=17,e16>e17,c>0) and if(n>=18,e17>e18,c>0) and if(n>=19,e18>e19,c>0) and if(n>=20,e19>e20,c>0) ; k4:=e1>ref(e1,1) and e2>ref(e2,1) and if(n>=3,e3>ref(e3,1),c>0) and if(n>=4,e4>ref(e4,1),c>0) and if(n>=5,e5>ref(e5,1),c>0) and if(n>=6,e6>ref(e6,1),c>0) and if(n>=7,e7>ref(e7,1),c>0) and if(n>=8,e8>ref(e8,1),c>0) and if(n>=9, e9>ref(e9,1),c>0) and if(n>=10,e10>ref(e10,1),c>0) and if(n>=11,e11>ref(e11,1),c>0) and if(n>=12,e12>ref(e12,1),c>0) and if(n>=13,e13>ref(e13,1),c>0) and if(n>=14,e14>ref(e14,1),c>0) and if(n>=15, e15>ref(e15,1),c>0) and if(n>=16,e16>ref(e16,1),c>0) and if(n>=17,e17>ref(e17,1),c>0) and if(n>=18,e18>ref(e18,1),c>0) and if(n>=19,e19>ref(e19,1),c>0) and if(n>=20,e20>ref(e20,1),c>0) ; k5:=barslast(k1/k2<=1.03)<=10; cross(k3,0.5) and k4 and k5; 引用:
588.問(wèn):
請(qǐng)問(wèn)分析家的“PARTLINE(x2,x2>x3,rgb(255,0,0),x2<x3,rgb(0,0,255));”如何轉(zhuǎn)換成飛 狐的語(yǔ)句 答(知無(wú)不言): PARTLINE(x2>x3,x2); PARTLINE(x2<x3,x2); 答( zjxu58 ): PARTLINE(x2>x3,x2),COLORRED; PARTLINE(x2<x3,x2),COLORBLUE; 加上了顏色代碼; 引用:
589.問(wèn):
幫忙把下面的"長(zhǎng)線牛股(分析家)"公式改編成飛狐公式? MA1:EMA(CLOSE,21),color00ff00; MA2:EMA(CLOSE,120),colorred ; 頂:MA(CLOSE,30) + 2*STD(CLOSE,60), COLORYELLOW,pointdot, linethick2 ; 底:MA(CLOSE,30) - 2*STD(CLOSE,60) ,COLORYELLOW ,pointdot, linethick2; STICKLINE(MA1>MA2,MA1,MA2,1,0),colorFF66FF ; STICKLINE(MA2>MA1,MA1,MA2,1,0),color00FF00 ; 轉(zhuǎn)向:ZIG(3,10), colorFF3300 ; MA3:MA(CLOSE,2),colorred,LINETHICK2; 答(041013); 飛狐可以引用 引用:
590.問(wèn):
做一個(gè)上漲了一段,上穿過(guò)250天均線后,又回探250天均線的指標(biāo)! 答(一鳴): {上漲了一段,上穿過(guò)250天均線后,又回探250天均線} m1:=ma(c,250); k1:=barslast(cross(c,ma(c,250))); c/m1<1.005 and ref(all(c>m1,k1),1) and hhv(h/m1,k1+1)>=1.01; 引用:
591.問(wèn):
求助如何把技術(shù)指標(biāo)改為選股指標(biāo) VarF:=TROUGHBARS(3,15,1)<4; 升跌:EMA((C/MA((2*C+H+L)/4,30)-1)*100,3)colorstick; PARTLINE(C,升跌)colorgreen; PARTLINE(C,0)colorred,linethick2; STICKLINE(FILTER(VarF=1,5),50,0,10,0)colorblue; DRAWICON(FILTER(VarF=1,5),50,1); DRAWTEXT(FILTER(VarF=1,5),25,'閃電出擊')coloryellow; 條件是“閃電出擊' 答( 簡(jiǎn)單·趨勢(shì) ): {閃電出擊} VarF:=TROUGHBARS(3,15,1)<4; FILTER(VarF=1,5); 看看是不是這個(gè)信號(hào) 答(知無(wú)不言): VarF:TROUGHBARS(3,15,1)<4; 用了ZIG類函數(shù),未正確理解ZIG類函數(shù)的特點(diǎn)前,不要輕易根據(jù)信號(hào)進(jìn)行交易。 引用:
592.問(wèn):
編一個(gè)MACD選股公式,MACD的快線高于慢線,快線下跌,不跌破慢線上調(diào),同時(shí)MACD的快線 和慢線都高于0軸,股價(jià)高于60日平均線。 答(知無(wú)不言): diff:="macd.diff"; dea:="macd.dea"; c>ma(c,60)and diff>ref(diff,1)and ref(diff,1)<ref(diff,2)and dea>0 and diff>dea ; 引用:
593.問(wèn):
怎么樣用分析家顯示120分鐘K線 答(yyzzqq): 用多日線。 引用:
594.問(wèn):
下面是背離的主圖,能不能幫我改一下錯(cuò)誤,改成分析家的呀 MA3:MA(CLOSE,3); MA5:MA(CLOSE,5); MA10:MA(CLOSE,10); MA20:MA(CLOSE,20); MA30:MA(CLOSE,30); MA60:MA(CLOSE,60); MA120:MA(CLOSE,120); MA250:MA(CLOSE,250); DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26); DEA:=EMA(DIFF,8); A1:=BARSLAST(REF(CROSS(diff,dea),1)); B1:=REF(C,A1+1)>C AND REF(diff,A1+1)DRAWTEXT(IF(B1>0,1,0),L-0.1,'MACD底背'),colorgreen; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; k:=SMA(RSV,3,1); d:=SMA(k,3,1); A2:=BARSLAST(REF(CROSS(k,d),1)); B2:=REF(C,A2+1)>C AND REF(k,A2+1)DRAWTEXT(IF(B2>0,1,0),L-0.25,'KDJ底背'),coloryellow; LC:=REF(CLOSE,1); RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100; RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100; A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1)); B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)DRAWTEXT(IF(B3>0,1,0),L-0.4,'RSI底背'),colorcyan; C1:=BARSLAST(REF(CROSS(dea,diff),1)); D1:=REF(C,C1+1)diff AND CROSS(dea,diff); DRAWTEXT(IF(D1>0,1,0),H+0.1,'MACD頂背'),colorwhite; C2:=BARSLAST(REF(CROSS(d,K),1)); D2:=REF(C,C2+1)k AND CROSS(d,K); DRAWTEXT(IF(D2>0,1,0),H+0.25,'KDJ頂背'),colorwhite; C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1)); D3:=REF(C,C3+1)RSI1 AND CROSS(RSI2,RSI1); DRAWTEXT(IF(D3>0,1,0),H+0.4,'RSI頂背'),colormagenta; 答(yyzzqq): MA3:MA(CLOSE,3); MA5:MA(CLOSE,5); MA10:MA(CLOSE,10); MA20:MA(CLOSE,20); MA30:MA(CLOSE,30); MA60:MA(CLOSE,60); MA120:MA(CLOSE,120); MA250:MA(CLOSE,250); DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26); DEA:=EMA(DIFF,8); A1:=BARSLAST(REF(CROSS(diff,dea),1)); B1:=REF(C,A1+1)>C AND REF(diff,A1+1); DRAWTEXT(IF(B1>0,1,0),L-0.1,'MACD底背'),colorgreen; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; k:=SMA(RSV,3,1); d:=SMA(k,3,1); A2:=BARSLAST(REF(CROSS(k,d),1)); B2:=REF(C,A2+1)>C AND REF(k,A2+1);DRAWTEXT(IF(B2>0,1,0),L-0.25,'KDJ底背'),coloryellow; LC:=REF(CLOSE,1); RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100; RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100; A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1)); B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1);DRAWTEXT(IF(B3>0,1,0),L-0.4,'RSI底背'),colorcyan; C1:=BARSLAST(REF(CROSS(dea,diff),1)); D1:=REF(C,C1+1)>C AND CROSS(dea,diff); DRAWTEXT(IF(D1>0,1,0),H+0.1,'MACD頂背'),colorwhite; C2:=BARSLAST(REF(CROSS(d,K),1)); D2:=REF(C,C2+1)>C AND CROSS(d,K); DRAWTEXT(IF(D2>0,1,0),H+0.25,'KDJ頂背'),colorwhite; C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1)); D3:=REF(C,C3+1)>C AND CROSS(RSI2,RSI1); DRAWTEXT(IF(D3>0,1,0),H+0.4,'RSI頂背'),colormagenta; 引用:
595.問(wèn):
誰(shuí)能提供結(jié)構(gòu)波浪公式原碼 答(無(wú)名山人): 想要一樣的在這. (分析家公式) A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高點(diǎn)} A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低點(diǎn)} E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; E2:=(HIGH+LOW)/2;{高低點(diǎn)出現(xiàn)在同一K線上時(shí)可作取舍} H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2); X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1)); G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{過(guò)濾后低點(diǎn)} L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2)); G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{過(guò)濾后高點(diǎn)} DRAWLINE(LD,L,HD,H,0),coloryellow,LINETHICK1,POINTDOT; DRAWLINE(HD,H,LD,L,0),COLORWHITE,LINETHICK1,POINTDOT; J1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HD),BARSLAST(LD))+1); J2:=J1>REF(J1,1); DRAWLINE(J2,IF(HD,H,L),BARSTATUS=2,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),COLORWHITE,LINETHICK1,POINTDOT; A3:=H<REF(H,REF(BARSLAST(HD),1)+1); B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2)); D3:=A3 AND B3 AND HD; E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2); HH:=E3>REF(E3,1);{找出全部長(zhǎng)期高點(diǎn)} A4:=L>REF(L,REF(BARSLAST(LD),1)+1); B4:=REF(L,REF(BARSLAST(LD),1)+1)<REF(L,REF(BARSLAST(LD),1)+2+REF(BARSLAST(LD),REF(BARSLAST(LD),1)+2)); D4:=A4 AND B4 AND LD;E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2);LL:=E4>REF(E4,1);{找出全部長(zhǎng)期低點(diǎn)} DRAWICON(HH,H,10),ALIGN1; DRAWICON(LL,L,12),ALIGN1; H3:=HH OR BARSTATUS=2 OR BARSCOUNT(C)=1;{后面進(jìn)行過(guò)濾,方法同前.只是不用考慮高低點(diǎn)出現(xiàn)在同一K線} X3:=REF(BARSLAST(H3),1)+1;F3:=BACKSET(H3 AND COUNT(LL,X3)>0,LLVBARS(IF(LL,L,POW(10,20)),X3)); G3:=F3>REF(F3,1);I3:=BACKSET(G3,2);LZ:=I3>REF(I3,1);{長(zhǎng)期低點(diǎn),也可供引用} L4:=LZ OR BARSTATUS=2 OR BARSCOUNT(C)=1; X4:=REF(BARSLAST(L4),1)+1;F4:=BACKSET(L4 AND COUNT(HH,X4)>0,HHVBARS(IF(HH,H,-POW(10,20)),X4)); G4:=F4>REF(F4,1); I4:=BACKSET(G4,2); HZ:=I4>REF(I4,1);{長(zhǎng)期高點(diǎn),也可供引用} DRAWLINE(HZ,H,LZ,L,0),COLORGREEN,LINETHICK1; DRAWLINE(LZ,L,HZ,H,0),COLORRED,LINETHICK1;{長(zhǎng)期連線} K1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HZ),BARSLAST(LZ))+1);K2:=K1>REF(K1,1); DRAWLINE(K2,IF(HZ,H,L),BARSTATUS=2,C,0),COLORGREEN,LINETHICK1; 低一:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1); 一低:=低一>REF(低一,1); 低二:=BACKSET(一低,REF(BARSLAST(LD),1)+2); 二低:=低二>REF(低二,1); DRAWLINE(二低,L,一低,L,1),COLORMAGENTA,LINETHICK1; 高一:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1); 一高:=高一>REF(高一,1); 高二:=BACKSET(一高,REF(BARSLAST(HD),1)+2); 二高:=高二>REF(高二,1); DRAWLINE(二高,H,一高,H,1),COLORMAGENTA,LINETHICK1; 前一低:REF(L,BARSLAST (一低)),COLORYELLOW,POINTDOT,LINETHICK2; 前二低:REF(L,BARSLAST (二低)),COLORFF66FF,POINTDOT,LINETHICK2; 前一高:REF(H,BARSLAST(一高)),COLORFFEEBB,POINTDOT,LINETHICK2; 前二高:REF(H,BARSLAST(二高)),COLORFF0000,POINTDOT,LINETHICK2; 短高:= REF(H,BARSLAST(一高)); 短低:= REF(L,BARSLAST(一低)); 短比:(C-短低)/(短高-短低),LINETHICK0; 常數(shù):=REF(INDEXC,BARSLAST(一低))/REF(C,BARSLAST(一低)); 疊1:INDEXC/常數(shù),color008eFF,LINETHICK0; PARTLINE(疊1,1),color008eFF; 常數(shù)2:=REF(INDEXC,BARSLAST(二低))/REF(C,BARSLAST(二低)); 疊2:INDEXC/常數(shù)2,color008eFF,LINETHICK0; PARTLINE(疊2,1),color008eFF; s:=NUMTOSTRN(DAYS1970-DATETOD1970(REF(DATE,BARSLAST(LD))),0); s1:=NUMTOSTRN(DAYS1970-DATETOD1970(REF(DATE,BARSLAST(HD))),0); s2:=NUMTOSTRN(H,2); s3:=NUMTOSTRN(L,2); {DRAWTEXT(HD,1.02*H,s),COLORGREEN; DRAWTEXT(LD,0.98*L,s1),COLORRED; DRAWTEXT(HD,H*(1+0.002),s2),COLORff9933,ALIGN0; DRAWTEXT(LD,L*(1.001-0.002),s3),COLORYELLOW,ALIGN0;} DRAWTEXT(D1,H,NUMTOSTRN(BARSLAST(LD),0)+'天'+NUMTOSTRN(h,2)),ALIGN1,VALIGN2,COLORff9933; DRAWTEXT(二高,H,NUMTOSTRN(BARSLAST(LD),0)+'天'+NUMTOSTRN(h,2)),ALIGN1,VALIGN2,COLORYELLOW; DRAWTEXT(D2,L,NUMTOSTRN(BARSLAST(HD),0)+'天'+NUMTOSTRN(L,2)),ALIGN1,COLORYELLOW; DRAWTEXT(二低,L,NUMTOSTRN(BARSLAST(HD),0)+'天'+NUMTOSTRN(L,2)),ALIGN1,COLORYELLOW; var3:=(CLOSE+HIGH+LOW)/3; A:=EMA(var3,10); B:=REF(A,1); PARTLINE( B,A>B,RGB(255,0,0),A<B,RGB(0,255,0),1,RGB(0,0,255)),linethick2; VAR1:=EMA(CLOSE,3); VAR2:=EMA(CLOSE,8); 趨勢(shì):MA(CLOSE,5),COLORWHITE,LINETHICK2; 答(冰綠茶12): 新結(jié)構(gòu)波浪 FXJ50用 附原碼 {以下語(yǔ)句為FXJ50新結(jié)構(gòu)波浪 n=2} A1:=REF(HIGH,3)=HHV(HIGH,N*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高點(diǎn)} A2:=REF(LOW,3)=LLV(LOW,N*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低點(diǎn)} E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; E2:=(HIGH+LOW)/2;{高低點(diǎn)出現(xiàn)在同一K線上時(shí)可作取舍} H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2); X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1)); G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{過(guò)濾后低點(diǎn)} L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2)); G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{過(guò)濾后高點(diǎn)} {以上語(yǔ)句為新結(jié)構(gòu)波浪} A3:=H<REF(H,REF(BARSLAST(HD),1)+1); B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2)); D3:=A3 AND B3 AND HD; E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2); HH:=E3>REF(E3,1) ;{找出全部長(zhǎng)期高點(diǎn)} A4:=L>REF(L,REF(BARSLAST(LD),1)+1); B4:=REF(L,REF(BARSLAST(LD),1)+1)<REF(L,REF(BARSLAST(LD),1)+2+REF(BARSLAST(LD),REF(BARSLAST(LD),1)+2)); D4:=A4 AND B4 AND LD; E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{找出全部長(zhǎng)期低點(diǎn)} H3:=HH OR BARSTATUS=2 OR BARSCOUNT(C)=1; {后面進(jìn)行過(guò)濾,方法同前。只是不用考慮高低點(diǎn)出現(xiàn)在同一K線} X3:=REF(BARSLAST(H3),1)+1; F3:=BACKSET(H3 AND COUNT(LL,X3)>0,LLVBARS(IF(LL,L,POW(10,20)),X3)); G3:=F3>REF(F3,1); I3:=BACKSET(G3,2); LZ:=I3>REF(I3,1); {長(zhǎng)期低點(diǎn),也可供引用} L4:=LZ OR BARSTATUS=2 OR BARSCOUNT(C)=1; X4:=REF(BARSLAST(L4),1)+1; F4:=BACKSET(L4 AND COUNT(HH,X4)>0,HHVBARS(IF(HH,H,-POW(10,20)),X4)); G4:=F4>REF(F4,1); I4:=BACKSET(G4,2); HZ:=I4>REF(I4,1);{長(zhǎng)期高點(diǎn),也可供引用} {以下是十條趨勢(shì)線原碼} 低一:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1); 一低:=低一>REF(低一,1); 低二:=BACKSET(一低,REF(BARSLAST(LD),1)+2); 二低:=低二>REF(低二,1); 低三:=BACKSET(二低,REF(BARSLAST(LD),1)+2); 三低:=低三>REF(低三,1); 低四:=BACKSET(三低,REF(BARSLAST(LD),1)+2); 四低:=低四>REF(低四,1); 低五:=BACKSET(四低,REF(BARSLAST(LD),1)+2); 五低:=低五>REF(低五,1); 低六:=BACKSET(五低,REF(BARSLAST(LD),1)+2); 六低:=低六>REF(低六,1); 高一:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1); 一高:=高一>REF(高一,1); 高二:=BACKSET(一高,REF(BARSLAST(HD),1)+2); 二高:=高二>REF(高二,1); 高三:=BACKSET(二高,REF(BARSLAST(HD),1)+2); 三高:=高三>REF(高三,1); 高四:=BACKSET(三高,REF(BARSLAST(HD),1)+2); 四高:=高四>REF(高四,1); 高五:=BACKSET(四高,REF(BARSLAST(HD),1)+2); 五高:=高五>REF(高五,1); 高六:=BACKSET(五高,REF(BARSLAST(HD),1)+2); 六高:=高六>REF(高六,1); 前一低:REF(L,BARSLAST(一低)),COLORGREEN,POINTDOT,LINETHICK2; 前二低:REF(L,BARSLAST(二低)),COLORGREEN,POINTDOT,LINETHICK2; 前三低:REF(L,BARSLAST(三低)),COLORGREEN,POINTDOT,LINETHICK2; 前四低:REF(L,BARSLAST(四低)),COLORGREEN,POINTDOT,LINETHICK2; 前五低:REF(L,BARSLAST(五低)),COLORGREEN,POINTDOT,LINETHICK2; 前六低:REF(L,BARSLAST(六低)),COLORGREEN,POINTDOT,LINETHICK2; 前一高:REF(H,BARSLAST(一高)),COLORRED,POINTDOT,LINETHICK2; 前二高:REF(H,BARSLAST(二高)),COLORRED,POINTDOT,LINETHICK2; 前三高:REF(H,BARSLAST(三高)),COLORRED,POINTDOT,LINETHICK2; 前四高:REF(H,BARSLAST(四高)),COLORRED,POINTDOT,LINETHICK2; 前五高:REF(H,BARSLAST(五高)),COLORRED,POINTDOT,LINETHICK2; 前六高:REF(H,BARSLAST(六高)),COLORRED,POINTDOT,LINETHICK2; DRAWLINE(二低,L,一低,L,1),COLORYELLOW,LINETHICK1; DRAWLINE(三低,L,二低,L,1),COLORYELLOW,LINETHICK1; DRAWLINE(四低,L,三低,L,1),COLORYELLOW,LINETHICK1; DRAWLINE(五低,L,四低,L,1),COLORYELLOW,LINETHICK1; DRAWLINE(六低,L,五低,L,1),COLORYELLOW,LINETHICK1; DRAWLINE(二高,H,一高,H,1),COLORFF00FF,LINETHICK1; DRAWLINE(三高,H,二高,H,1),COLORFF00FF,LINETHICK1; DRAWLINE(四高,H,三高,H,1),COLORFF00FF,LINETHICK1; DRAWLINE(五高,H,四高,H,1),COLORFF00FF,LINETHICK1; DRAWLINE(六高,H,五高,H,1),COLORFF00FF,LINETHICK1; DRAWTEXT(一低 or 二低 or 三低 or 四低 or 五低 or 六低 ,L*0.98,'.'),COLOR000000; DRAWTEXT(一高 or 二高 or 三高 or 四高 or 五高 or 六高 ,H*1.02,'.'),COLOR000000; DRAWTEXT(一高,H,NUMTOSTRN(BARSLAST(LD),0)+'天'+NUMTOSTRN(h,2)),ALIGN1,VALIGN2,COLORYELLOW; DRAWTEXT(二高,H,NUMTOSTRN(BARSLAST(LD),0)+'天'+NUMTOSTRN(h,2)),ALIGN1,VALIGN2,COLORYELLOW; DRAWTEXT(三高,H,NUMTOSTRN(BARSLAST(LD),0)+'天'+NUMTOSTRN(h,2)),ALIGN1,VALIGN2,COLORYELLOW; DRAWTEXT(四高,H,NUMTOSTRN(BARSLAST(LD),0)+'天'+NUMTOSTRN(h,2)),ALIGN1,VALIGN2,COLORYELLOW; DRAWTEXT(五高,H,NUMTOSTRN(BARSLAST(LD),0)+'天'+NUMTOSTRN(h,2)),ALIGN1,VALIGN2,COLORYELLOW; DRAWTEXT(六高,H,NUMTOSTRN(BARSLAST(LD),0)+'天'+NUMTOSTRN(h,2)),ALIGN1,VALIGN2,COLORYELLOW; DRAWTEXT(一低,L,NUMTOSTRN(BARSLAST(HD),0)+'天'+NUMTOSTRN(L,2)),ALIGN1,COLORYELLOW; DRAWTEXT(二低,L,NUMTOSTRN(BARSLAST(HD),0)+'天'+NUMTOSTRN(L,2)),ALIGN1,COLORYELLOW; DRAWTEXT(三低,L,NUMTOSTRN(BARSLAST(HD),0)+'天'+NUMTOSTRN(L,2)),ALIGN1,COLORYELLOW; DRAWTEXT(四低,L,NUMTOSTRN(BARSLAST(HD),0)+'天'+NUMTOSTRN(L,2)),ALIGN1,COLORYELLOW; DRAWTEXT(五低,L,NUMTOSTRN(BARSLAST(HD),0)+'天'+NUMTOSTRN(L,2)),ALIGN1,COLORYELLOW; DRAWTEXT(六低,L,NUMTOSTRN(BARSLAST(HD),0)+'天'+NUMTOSTRN(L,2)),ALIGN1,COLORYELLOW; 引用:
596.問(wèn):
能否將買點(diǎn)改成條件選股公式 Var1:=BARSCOUNT(CLOSE)*3.142/180; A2: SIN(Var1*8)*100; A3: COS(Var1*8)*100; X1: 0; Var1:=MA(CLOSE,5); Var2:=MA(CLOSE,10); Var3:=MA(CLOSE,20); Var4:=MA(CLOSE,30); Var5:=(Var1+Var2+Var3+Var4)/4; Var6:=(Var5-REF(Var5,5))/REF(Var5,5)*1500; Var7:=(Var5-REF(Var5,5))/REF(Var5,5)*1500; Var8:=EMA(Var6,8); 底部注意: STICKLINE(Var6>REF(Var6,1) AND Var6<0 AND Var6<Var8,Var6,0,5,0); 低位轉(zhuǎn)強(qiáng): STICKLINE(Var8>REF(Var8,1) AND Var6<0 AND Var6>Var8,Var8,0,5,0), COLORYELLOW; 買點(diǎn): STICKLINE(Var6>REF(Var6,1) AND Var6>0 AND Var8<0,Var6,Var8,10,0); DRAWICON(FILTER(Var6>REF(Var6,1) AND Var6>0 AND Var8<0,30),-140,4); DRAWTEXT(FILTER(Var6>REF(Var6,1) AND Var6>0 AND Var8<0,30),-140,'->買 點(diǎn)'),COLORred; 堅(jiān)定持股: STICKLINE(Var8>REF(Var8,1) AND Var8>0,Var6,0,5,0),COLORred; 謹(jǐn)慎觀望: STICKLINE(Var6<REF(Var6,1) AND Var8>REF(Var8,1) AnD Var6>0,Var6,Var8,10,0); 果斷持幣: STICKLINE(Var6<REF(Var6,1) AND Var6<Var8,Var6,Var8,5,1),COLORCYAN; 答(achen): 江恩選股原碼 Var1:=MA(CLOSE,5); Var2:=MA(CLOSE,10); Var3:=MA(CLOSE,20); Var4:=MA(CLOSE,30); Var5:=(Var1+Var2+Var3+Var4)/4; Var6:=(Var5-REF(Var5,5))/REF(Var5,5)*1500; Var7:=(Var5-REF(Var5,5))/REF(Var5,5)*1500; Var8:=EMA(Var6,8); 買點(diǎn): Var6>REF(Var6,1) AND Var6>0 AND Var8<0; 引用:
597.問(wèn):
是否可以請(qǐng)幫我寫個(gè)公式:MACD里的MACD在DIFF和DEA在沒(méi)有死亡交叉的前提下, MACD柱狀線回落后又重新放大的公式。在放大的時(shí)候,信號(hào)要用大于0的箭頭表示出 來(lái), MACD的曲線,就不要寫在上面了 答(流光之星): {12\26\9\5\5} DIFF:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG); DEA:=EMA(DIFF,M); MACD:2*(DIFF-DEA), COLORSTICK; aa:=cross(diff,dea); aaa:=barslast(aa)=N1; bb:=ma(macd,N); cc:=( ref(bb,0)>ref(bb,1) and ref(bb,1)>ref(bb,2) and ref(bb,2)>ref(bb,3) and ref(bb,3)> ref(bb,4) and ref(bb,4)>ref(bb,5) ); dd:=( ref(bb,5)<ref(bb,6) and ref(bb,6)<ref(bb,7) and ref(bb,7)<ref(bb,8) and ref(bb,8)<ref (bb,9) ); eee:if(aaa and cc and dd,1,0),linethick0,precis0; drawicon(aaa and cc and dd,0.5,4); {選股與評(píng)價(jià)用EEE>0,N1、N自調(diào);cc、DD是放大與縮小的區(qū)間,自改}; 引用:
598.問(wèn):
寫一個(gè)換手率指標(biāo)能夠看到一個(gè)月,三個(gè)月,半年,一年的換手率 答(流光之星): AA:=DATE>=D; BB:=DATE<=D1; 累計(jì)換手率%:sum(if(AA and BB,vol,0),0)*100/capital; 累計(jì)換手率2%:sum(vol,X)*100/capital; {D=1050101,D1=1050519;05.01.01日--05.05.19日; X=30,30日累計(jì)換手} 引用:
599.問(wèn):
問(wèn)題: 相信很多FXJ用戶和我一樣,不會(huì)太注意計(jì)算結(jié)果準(zhǔn)確性的問(wèn)題, 因?yàn)檎f(shuō)實(shí)話,我想那么幾位小數(shù)點(diǎn)不會(huì)有太大的影響,可實(shí)際卻是這樣的: a:amout; b:amout/10; c:amout*100/100; 這三組數(shù)據(jù)理應(yīng)是相等的——a=b*10=c;可實(shí)際在分析家中結(jié)果會(huì)如何,試一下。我暈死過(guò)去, 也沒(méi)差這么多的,原本以為C差一點(diǎn)是正常的,因?yàn)榉糯罅?00倍在先,可能超出計(jì)算大數(shù)(放在 B股里是a=c可以證明),沒(méi)想到實(shí)際情況比較糟糕,在做除運(yùn)算時(shí),6位數(shù)就過(guò)不了要出錯(cuò); 鉆心蟲(chóng)說(shuō)超過(guò)2的24次方就會(huì)出錯(cuò),d:16777217+1,軟件會(huì)顯示16777216,這個(gè)我已經(jīng)證實(shí)了, 奇怪的是在測(cè)試B股時(shí),隨便舉例:e:3435782/10,軟件會(huì)顯示343578.188、還有183117/10, 會(huì)顯示18311.699,怪的是,這種變化沒(méi)有規(guī)律,不是數(shù)值大于某個(gè)值時(shí)一定出錯(cuò),好像是隨機(jī)的。 這是不是代表我們用AMOUNT/常數(shù)、或是做統(tǒng)計(jì)、求和,得到的最后值都要打個(gè)問(wèn)號(hào)了? 看似小的誤差對(duì)測(cè)試平臺(tái)最后造成的累計(jì)影響大不大?如何解決 答(竹林): “e:3435782/10,軟件會(huì)顯示343578.188、還有183117/10,會(huì)顯示18311.699” 好像是四舍五入的緣故。你看343578.188后面的0.188進(jìn)到個(gè)位不就是2,343578.188* 10 等于3435782。 答(jsyjsybt): 分析家和飛狐都存在這個(gè)問(wèn)題,原因是分析家和飛狐都采用單精度實(shí)數(shù)(Float) 進(jìn)行運(yùn)算,目的是為了提高軟件的執(zhí)行速度,而單精度實(shí)數(shù)只有最多七位有效數(shù)字, 第七位之后的數(shù)就是隨機(jī)的,所以就會(huì)出現(xiàn)這種情況。但對(duì)測(cè)試不會(huì)產(chǎn)生影響。如 果用雙精度實(shí) 數(shù)運(yùn)算就不會(huì)有這種現(xiàn)象!打開(kāi)十字光標(biāo)移動(dòng),每只股票都會(huì)有這種 現(xiàn)象 引用:
600.問(wèn):
一根水平線的兩個(gè)點(diǎn)怎樣編寫?我用的《分析家》。 答(知無(wú)不言): 在圖形上繪制直線段。 用法: DRAWLINE(COND1,PRICE1,COND2,PRICE2,EXPAND),當(dāng)COND1條件滿足時(shí),在PRICE1位置畫直線起點(diǎn), 當(dāng)COND2條件滿足時(shí),在PRICE2位置畫直線終點(diǎn),EXPAND為延長(zhǎng)類型。 例如:DRAWILINE(HIGH>=HHV(HIGH,20),HIGH,LOW<=LLV(LOW,20),LOW,1)表示 在創(chuàng)20天新高與創(chuàng)20天新低之間畫直線并且向右延長(zhǎng)。 |
|