151.問: 5日、10日、20日均線在30天內(nèi)始終保持多頭排列,怎么編寫 答(懶漢): m:=ma(c,5); m1:=(c,10); m2:=ma(c,20); count(m>m1 and m1>m2,30)=30;
152.問: 有沒有個(gè)股K線的副圖指標(biāo) 答(懶漢): STICKLINE(c/o>=1,o,c,6,1) colorred; STICKLINE(c/o>=1,c,h,0.3,1) colorred; STICKLINE(c/o>=1,o,l,0.3,1) colorred; STICKLINE(c/o<1,c,o,6,0) colorcyan; STICKLINE(c/o<1,l,h,0.3,0) colorcyan;
153.問: 以歷史最低點(diǎn)為起點(diǎn)寫股價(jià)回升創(chuàng)新高點(diǎn)次數(shù)并在窗新高日收盤價(jià)處標(biāo)出數(shù)字 答(懶漢): LL:=LLv(L,0); w:=barssince(L=LL[datacount]); hh:=hhv(h,w); s:=sum(h>ref(hh,1),0); DRAWNUMBER(s>ref(s,1),h*1.01,s,0);
154.問: 求這個(gè)指標(biāo)的條件不成立時(shí)也畫綠柱怎么寫? DIFF:=STKINDI('','MACD日.DIFF',0,6); k線:=STKINDI('','kdj.k',0,6); d線:=STKINDI('','kdj.d',0,6); STICKLINE(k線>ref(d線,1) and DIFF>=ref(DIFF,1),VOL,0,7,0)colorred; STICKLINE(k線 答(yyzzqq): DIFF:=STKINDI('','MACD日.DIFF',0,6); k線:=STKINDI('','kdj.k',0,6); d線:=STKINDI('','kdj.d',0,6); STICKLINE(k線>ref(d線,1) and DIFF>=ref(DIFF,1),VOL,0,7,0)colorred; STICKLINE(k線 STICKLINE((k線>ref(d線,1) and DIFF<=ref(DIFF,1)) or (k線ref (DIFF,1),VOL,0,7,0)COLORGREEN;
155.問: 需要一個(gè)用業(yè)績(jī)來排序的公式, 答(yyzzqq): 業(yè)績(jī)指標(biāo)有多種。如以每股收益排序可這樣。 FINANCE(33);
156.問: 想選出在一段時(shí)間里股價(jià)的波幅在一個(gè)設(shè)定范圍內(nèi)的股票,比方說,在60天的交易天里, 股價(jià)的波幅在百分之15范圍內(nèi),那么設(shè)參數(shù)N=60,M=15,(參數(shù)可調(diào)整), 答(馨蕓): 這是一般人定義的所謂”平臺(tái)整理幅度”的寫法,試試看可否 (hhv(close,n)-llv(close,n))/llv(close,n)<=(M/100)為平臺(tái)整理幅度M%的設(shè)定。
157.問: 用于盤中預(yù)警:股價(jià)第一天穿越3MA且成交量比昨天放大0.8倍 答(阿福): cross(ma(c,3),c) and ref(v,1)*1.8
158.問: 如何寫分析家的“n日內(nèi),出現(xiàn)過x=1,則今日的y=1條件成立 答(騎兵): y and any(x,n);
159.問: 比如今天收盤在7元, 我想表示昨天在7元這個(gè)價(jià)位的獲利盤, 答(懶漢): 飛狐的 WINNER(refx(c,1))
160.問: 幫忙編制真實(shí)買入和賣出量公式 答(馨蕓): 給你一個(gè)類似的主力向量(總買及總賣) CC:=C; HH:=H; LL:=L; OO:=O; BB:=AMOUNT; VV:VOL,linethick0; VAR1:=VOL/((HH-LL)*2-ABS(CC-OO)); 成交:=VOL; // STICKLINE(VOL,VOL,0,8,0),colorwhite; bull:=V*(c-L)/(H-L); bear:=v-bull;
主動(dòng)買盤:IF(CC>OO,if(cc=hh,vv,bull),IF(CC STICKLINE(主動(dòng)買盤,主動(dòng)買盤,0,7,0),colorred;
主動(dòng)賣盤:IF(CC>OO,if( cc=hh,0, if(cc=LL,(-vv),(-bear)) ), IF( CC STICKLINE(主動(dòng)賣盤,主動(dòng)賣盤,0,7,0),colorffcc33; 給你一個(gè)類似的主力向量(凈買及凈賣) CC:=C; HH:=H; LL:=L; OO:=O; BB:=AMOUNT; VV:VOL,linethick0; VAR1:=VOL/((HH-LL)*2-ABS(CC-OO)); 成交:=VOL; // STICKLINE(VOL,VOL,0,8,0),colorwhite; bull:=V*(c-L)/(H-L); bear:=v-bull;
主動(dòng)買盤:IF(CC>OO,if(cc=hh,vv,bull),IF(CC // STICKLINE(主動(dòng)買盤,主動(dòng)買盤,0,7,0),colorred;
主動(dòng)賣盤:IF(CC>OO,if( cc=hh,0, if(cc=LL,(-vv),(-bear)) ), IF( CC // STICKLINE(主動(dòng)賣盤,主動(dòng)賣盤,0,7,0),colorffcc33; 主動(dòng)淨(jìng)買:=(主動(dòng)買盤+主動(dòng)賣盤); STICKLINE(主動(dòng)淨(jìng)買>0,主動(dòng)淨(jìng)買,0,7,0),colorred; STICKLINE(主動(dòng)淨(jìng)買<0,主動(dòng)淨(jìng)買,0,7,0),colorffcc33;
161.問: 求(FXJ)“N周期中X出現(xiàn)最小值的日期到現(xiàn)在的天數(shù)”的寫法 答(騎兵00): llvbars(x,n);
162.問: 求現(xiàn)價(jià)同時(shí)上穿5日均價(jià)線和10均價(jià)線, 答(騎兵00): CROSS(C,MA(C,5)) AND CROSS(C,MA(C,10));
163.問: 如何實(shí)現(xiàn)曲線圖 我想將我的每日資金總市值(既:資金總市值=手中股票數(shù)量X收盤價(jià)+資金余額)用曲線圖表表示出來(數(shù)據(jù)可采取每天輸入或最好能根據(jù)我的持倉(cāng)情況和現(xiàn)價(jià)自動(dòng)產(chǎn)生),這樣就可以每天看到市值的變化曲線,從這張圖上你會(huì)很清晰地看到自己的操作成果與資金變化的情況。其最大好處就是你將忘掉自己的股票成本價(jià),繼而關(guān)心的只是自己現(xiàn)在的股票總市值----你目前資產(chǎn)的真實(shí)反映。不知如何實(shí)現(xiàn) 答(馨蕓): 試試是否合你要 RN=資金余額,修改RN時(shí)以老鼠右鍵點(diǎn)VA變量,選”調(diào)整指標(biāo)參數(shù)” {n=6張,RN=500} Va:c*n*1000+rn; drawnumber(islastbar,va*1.02,va,0),coloryellow; drawnumber(barpos=sysparam(1),va*1.02,va,0),colorred,shift1; vertline(barpos=sysparam(1));
164.問: 請(qǐng)幫忙寫公式: 1.分時(shí)均線上方每筆成交大于100手的次數(shù). 2.分時(shí)均線下方每筆成交大于100手的次數(shù). 答(懶漢): 分時(shí)相當(dāng)于1分鐘。所以無法做這樣的統(tǒng)計(jì) j:=sum(amount,0)/sum(v,0)/100; v1:sum(if(c>j and v>100,1,0),0); v2:sum(if(c100,1,0),0); 只在分筆中使用
165.問: 10日均線上行 現(xiàn)價(jià)重上或向上突破3日均線 怎么編寫公式 答(hjg): ma(c,10)>ref(ma(c,10),1) AND cross(c,ma(c,3));
166.問: 如果同時(shí)3日均線10均線是多頭排列怎么寫? 答(hjg): ma(c,3)>ref(ma(c,3),1) AND ma(c,10)>ref(ma(c,10),1) AND cross(c,ma(c,3));
167.問: 求現(xiàn)價(jià)同時(shí)上穿5日均價(jià)線和10均價(jià)線,當(dāng)曰漲幅大于3%, 答(xiyuanzb): cross(c,ma(c,5)) and cross(c,ma(c,10)) and (c-ref(c,1))/ref(c,1)>0.03
168.問: 轉(zhuǎn):"變色MACD三死叉見頂解盤"FXJ5.0用源碼 ,求幫忙 《Line 4: C1035 :未定義的變量 ShoRT Line 4: C1035 :未定義的變量 long Line 5: C1035 :未定義的變量 m>> {變色MACD三死叉見頂 SHORT,12,5,400 LONG,26,20,100 m,9,2,60}{FXJ5.0用} DIFF:(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG)),linethick2,colorgreen; DEA :EMA(DIFF,M),colorcyan; MACD:2*(DIFF-DEA), COLORSTICK; tj:=(diff>dea); tj1:=(diff>0); PARTLINE(diff,tj),colormagenta,linethick2; partline(diff,tj1 and tj),colorred,linethick2; tj2:=diff<-1 and diff partline(diff,tj2),colorblue,linethick2; B1:=LLV(MACD,999999); B2:=HHV(MACD,999999); B3:=(B2-B1); C1:=LLV(low,999999); C2:=HHV(high,999999); C3:=(C2-C1); D:=B3/C3; W1:=C<=MA(C,5) AND C<=MA(C,10) ; W2:=O>MA(C,5) AND O>MA(C,10) ; W3:=MA(V,5)<=MA(V,10); W4:=diff<=dea; TIPTEXT(W1 AND W2,0 ,'斷頭鍘刀:向下的趨勢(shì),不是洗盤就是將下跌,賣出'),colorgreen; TIPTEXT(W1 ,0 ,'5日均線死叉10均線,短線空頭勢(shì)力強(qiáng)大,賣出'),coloryellow; TIPTEXT(W3 ,0,'5日均量死叉10日均量,做多能量枯竭,賣出'),colorred; TIPTEXT(W4 ,0,'DIFF下穿DEA,空頭形成,賣出'),colorff00ff; TIPTEXT(W1 AND W2 AND W3 AND W4 ,0 ,'三死叉見頂,賣出'),coloryellow; TIPTEXT(W1 AND W3 AND W4 ,0,'多方潰敗,空方強(qiáng)大,向下徹底形成,賣出'),colorgreen; VERTLINE(W1 AND W2 AND W3 AND W4,0),colorgreen; 答(待雨游晴): 只是未定義變量,試下這樣 {變色MACD三死叉見頂 SHORT,12,5,400 LONG,26,20,100 m,9,2,60}{FXJ5.0用} short:=12;long:=26;m:=9; DIFF:(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG)),linethick2,colorgreen; DEA :EMA(DIFF,M),colorcyan; MACD:2*(DIFF-DEA), COLORSTICK; tj:=(diff>dea); tj1:=(diff>0); PARTLINE(diff,tj),colormagenta,linethick2; partline(diff,tj1 and tj),colorred,linethick2; tj2:=diff<-1 and diff partline(diff,tj2),colorblue,linethick2; B1:=LLV(MACD,999999); B2:=HHV(MACD,999999); B3:=(B2-B1); C1:=LLV(low,999999); C2:=HHV(high,999999); C3:=(C2-C1); D:=B3/C3; W1:=C<=MA(C,5) AND C<=MA(C,10) ; W2:=O>MA(C,5) AND O>MA(C,10) ; W3:=MA(V,5)<=MA(V,10); W4:=diff<=dea; TIPTEXT(W1 AND W2,0 ,'斷頭鍘刀:向下的趨勢(shì),不是洗盤就是將下跌,賣出'),colorgreen; TIPTEXT(W1 ,0 ,'5日均線死叉10均線,短線空頭勢(shì)力強(qiáng)大,賣出'),coloryellow; TIPTEXT(W3 ,0,'5日均量死叉10日均量,做多能量枯竭,賣出'),colorred; TIPTEXT(W4 ,0,'DIFF下穿DEA,空頭形成,賣出'),colorff00ff; TIPTEXT(W1 AND W2 AND W3 AND W4 ,0 ,'三死叉見頂,賣出'),coloryellow; TIPTEXT(W1 AND W3 AND W4 ,0,'多方潰敗,空方強(qiáng)大,向下徹底形成,賣出'),colorgreen; VERTLINE(W1 AND W2 AND W3 AND W4,0),colorgreen;
169.問: 幫忙寫一大盤分時(shí)均線公式 答(懶漢): 可這樣 if capital=0 then sum(c*v,0)/sum(v,0)/100; else sum(amount,0)/sum(v,0)/100;
上面的用于分筆
這個(gè)可用于N分鐘 w:=barslast(hour if capital=0 then sum(c*v,w)/sum(v,w)/100; else sum(amount,w)/sum(v,w)/100;
170.問: EM10或EM20現(xiàn)在上行 怎么寫 答(遠(yuǎn)古菡萏): TYP:=(HIGH + LOW + CLOSE)/3; CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)); 金叉選股:CROSS(EMA(cci,10) ,EMA(cci,20) );
上行:EMA(cci,10)>ref(EMA(cci,10),1);
171.問: 求資金進(jìn)出指標(biāo) 答(楊文亮): tt:=if(c>=ref(c,1),amount,0); AA:=sum(amount,0); AB:=sum(tt,10)*1000/aa; 總體入場(chǎng)金額:100*ab;
tt1:=if(c AA1:=sum(amount,0); AB1:=sum(tt1,10)*1000/aa1; 總體下跌金額:100*ab1;
mm:=if(c>=ref(c,1),v/ref(v,1),0); mm1:=if(c 時(shí)段入場(chǎng)金額:10000*sum(mm,10)/sum(mm,50); 時(shí)段下跌金額:10000*sum(mm1,10)/sum(mm1,50);
172.問: 想在k線上顯示那根k線距今天換手100/100那根k線距今天換手200/100顯示數(shù)字 答(阿福): f:=MOD(SUM(100*VOL/CAPITAL,0),100); n:=(SUM(100*VOL/CAPITAL,0)-f)/100; tj:=f VERTLINE(tj); fd:=REF(BARSLAST(tj),1)+1; DRAWNUMBER(tj,50,n,0),ALIGN1,COLORffffff; DRAWTEXT(tj,40,'次'),ALIGN1,COLORGREEN; DRAWTEXT(tj,30,'換'),ALIGN1,COLORGREEN; DRAWTEXT(tj,20,'手'),ALIGN1,COLORGREEN; DRAWNUMBER(tj,10,fd,0),ALIGN1,COLORred; DRAWTEXT(tj,0,'天'),ALIGN1,COLORGREEN; 還可這樣寫: input:n(1040102,700101,1341231);//設(shè)置日期調(diào)整范圍 n1:=BARSLAST(if(date=n,DATACOUNT-barpos,0)<>0);//計(jì)算起始開始的數(shù)據(jù)周期 hsl:=100*VOL/CAPITAL,LINETHICK0; f:=MOD(SUM(hsl,n1),100),LINETHICK0;//數(shù)據(jù)統(tǒng)計(jì)從輸入日期開始 tj:=f VERTLINE(tj),POINTDOT,colorff...; fd:=REF(BARSLAST(tj),1)+1; DRAWNUMBER(tj,CLOSE,fd,0),ALIGN5; 周期天數(shù):fd,LINETHICK0; 換手累積:f,LINETHICK0; 周期均價(jià):SUM(AMOUNT,fd)/SUM(VOL,fd)/100;
bf1:=0; for i:=SYSPARAM(1) to DATACOUNT do begin IF bf1>=100 then BREAK else bf1:=bf1+hsl; end; btj:=BARPOS=i,LINETHICK0; VERTLINE(btj),LINEDOT,COLORYELLOW; DRAWTEXT(btj,HIGH,'完成100%換手\n共 '+NUMTOSTR((i-SYSPARAM(1)),0)+' 天'),ALIGN4,COLORRED; 再給一個(gè)鉆心蟲編的: 自動(dòng)標(biāo)出換手達(dá)100%(缺省參數(shù))的前面K線位置--源碼 偶也編了個(gè)小東東:當(dāng)十字光標(biāo)移到某一位置時(shí),自動(dòng)標(biāo)出換手達(dá)100%(缺省參數(shù))的前面K線位置。源碼可加在主圖公式中。
INPUT:%(100,1,999);//設(shè)定換手率缺省參數(shù) 周期:SUMBARS(v,capital/100*%),LINETHICK0; KS:=BACKSET(BARSCOUNT(v)=sysparam(1),周期); VERTLINE(cross(KS,1)),LINEDOT,COLORYELLOW; DRAWNUMBER((cross(KS,1)),sysparam(5),DATE,0),COLORGREEN;
173.問: 求金叉死叉價(jià)預(yù)測(cè) 答(道): KDJ金叉死叉價(jià)預(yù)測(cè),您可加在自己的主圖公式中! RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); 交叉:=(D*3-K*2)*(HHV(H,8)-LLV(L,8))/100+LLV(L,8); DRAWNUMBER(dynainfo(7)=c and dynainfo(10)=amount ,h*0.985,交叉,2),SHIFT1,colorgreen; DRAWTEXT(dynainfo(7)=c and dynainfo(10)=amount and k>d,h,'KDJ死叉 價(jià):'),SHIFT1,coloryellow; DRAWTEXT(dynainfo(7)=c and dynainfo(10)=amount and k
174.問: 編寫一個(gè)均線走平和上翹的公式原碼. 答(多多): 走平:ma(c,n)=ref(ma(c,n),1) 上翹:ma(c,n)>ref(ma(c,n),1)
175.問: 大盤條形背景(例如周K線上升為紅色,下跌為藍(lán))原碼怎樣表達(dá) 答(馨蕓): vertline(c>ma(c,5)),linethick8,color0099cc; 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),color88...; STICKLINE(AC<=AO,AH,AC,0,0),colorffff00; STICKLINE(AC<=AO,AO,AL,1,0),color88...; STICKLINE(AC<=AO,AO,AL,0,0),colorffff00;
STICKLINE(AC<=AO,AC,AO,8,0),COLOR88...; 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;
176.問: 怎樣把飛狐指標(biāo)疊加.如macd和kdj 答(懶漢): k:"kdj.k",COLORWHITE; d:"kdj.d",COLORYELLOW; j:"kdj.j",COLORGREEN; {以上為a指標(biāo),顯示數(shù)值和畫線.其數(shù)值和副圖右側(cè)的坐標(biāo)對(duì)應(yīng)}
diff:"macd.diff",LINETHICK0,COLORCYAN; dea:"macd.dea",LINETHICK0,COLORRED; macd:"macd.macd",LINETHICK0,COLORMAGENTA; {以上為b指標(biāo),只顯示數(shù)值,不畫線.其數(shù)值和副圖右側(cè)的坐標(biāo)不對(duì)應(yīng)}
{以下規(guī)定疊加區(qū)域-這里是顯示區(qū)域} p:=SYSPARAM(3)-SYSPARAM(2); q:=SYSPARAM(3); {以下計(jì)算疊加比和平移量} ha:=hhv(max(max(k,ad),j),p);//顯示區(qū)域內(nèi)a指標(biāo)最大值 La:=LLv(min(min(k,d),j),p);//顯示區(qū)域內(nèi)a指標(biāo)最小值 hb:=hhv(max(max(diff,dea),macd),p);//顯示區(qū)域內(nèi)b指標(biāo)最大值 Lb:=LLv(min(min(diff,dea),macd),p);//顯示區(qū)域內(nèi)b指標(biāo)最小值 b:=(ha-La)/(hb-Lb);//疊加比 y:=(ha+La-(hb+Lb)*b)/2;//平移量 {以下畫b指標(biāo)的疊加線} PARTLINE(1,diff*b[q]+y[q]),COLORCYAN;//畫b1線 PARTLINE(1,dea*b[q]+y[q]),COLORRED;//畫b2線 STICKLINE(b3<0,macd*b[q]+y[q],y[q],0.1,0),COLORBLUE;//畫b3的下豎線 STICKLINE(b3>0,macd*b[q]+y[q],y[q],0.1,0),COLORMAGENTA;//畫b3的上豎線
177.問: 以大盤MACD為背景條件的公式怎樣寫 答(kjyhao): 這是以大盤MACD為背景的主圖 aa:=INDEXC; DIFF:=EMA(AA,12) - EMA(AA,26); DEA :=EMA(DIFF,9); MACD:=2*(DIFF-DEA); xma1:=MACD;xma2:=0; xtj1:=CROSS(xma1,xma2) or xma1>xma2; xtj2:=CROSS(xma2,xma1) or xma1 FILLRGN(xtj1,SYSPARAM(5),SYSPARAM(4)),ColorDB3FCA; FILLRGN(xtj2,SYSPARAM(5),SYSPARAM(4)),Color528608; ktj:=(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1)); STICKLINE(ktj,HIGH,LOW,0.1,1),colorred; STICKLINE(ktj,CLOSE,OPEN,7,1),colorred; STICKLINE(NOT(ktj),HIGH,LOW,0.1,0),colorcyan; STICKLINE(NOT(ktj),CLOSE,OPEN,7,0),colorcyan; ma5:MA(CLOSE,5); ma10:MA(CLOSE,10); ma20:MA(CLOSE,20); ma30:MA(CLOSE,30); aa:=sumbars(vol,capital); 平均成本:sum(v*c,aa)/sum(v,aa),linethick1;
178.問: 能顯示MACD,KDJ,RSI周線,月線金叉的指標(biāo)(源碼),最好可選股的 答(yyzzqq): MACD周線金叉 cross( "macd.macd#week",0); 月線金叉 cross( "macd.macd#month",0); KDJ周線金叉 cross( "kd.k#week","kd.d#week"); 月線金叉 cross( "kd.k#month","kd.d#month"); RSI周線金叉 cross( "RSI.RSI1#week","RSI.RSI2#week"); 月線金叉 cross("RSI.RSI1#month","RSI.RSI2#month");
179.問: 怎么指示今天的收盤價(jià)是在幾日收盤價(jià)中的最高? 比如說,我在K線圖中看出今天收盤價(jià)是15日內(nèi)收盤價(jià)的最高,這個(gè)15日用公式怎么求出來? 答(馨蕓): 試試 hac[1]:=0; att1:=hac[1]; att2:=hac[1]; attc:=hac[1]; fc:=c*1; attc:=fc[datacount]; att1:=1; for i=datacount-1 downto datacount-200 do begin if fc[i] if fc[i]>attc then att2:=1;; end; n:att1; 答(懶漢): 也可這樣 cc:=if(barscount(c)=1,999999,c); sumbars(ref(cc,1)-cc,0)-1;
180.問: 請(qǐng)優(yōu)化 飛狐的·實(shí)戰(zhàn)看盤 Var1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; Var2:=2*ABS(Var1); 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)); Var5:=(HIGH+LOW+CLOSE)/3; Var6:=(Var5-MA(Var5,10))/(0.015*AVEDEV(Var5,10)); Var7:=(Var5-MA(Var5,30))/(0.015*AVEDEV(Var5,30)); Var8:=IF(Var6>=150 AND Var6<200 AND Var7>=150 AND Var7<200,10,0); Var9:=IF(Var6<=-150 AND Var6>-200 AND Var7<=-150 AND Var7>-200,-10,Var8); VarA:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100; VarB:=100-ABS(VarA); VarC:=3*SMA((INDEXC-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55))*100,20,1)-2 *SMA(SMA((INDEXC-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55))*100,20,1),15,1); VarD:=3*SMA((INDEXO-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55)) *100,20,1)-2*SMA(SMA((INDEXO-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,5 5)) *100,20,1),15,1); VarE:=REF(LOW,1)*0.9; VarF:=LOW*0.9; Var10:=(VarF*VOL+VarE*(CAPITAL-VOL))/CAPITAL; Var11:=EMA(Var10,30); Var12:=Var11-CLOSE; Var13:=REF(CLOSE,1); Var14:=SMA(MAX(CLOSE-Var13,0),7,1)/SMA(ABS(CLOSE-Var13),7,1)*100; Var15:=SMA(MAX(CLOSE-Var13,0),13,1)/SMA(ABS(CLOSE-Var13),13,1)*100; Var16:=BARSCOUNT(CLOSE); Var17:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100; Var18:=((-100)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+50)*2; Var19:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100; Var1A:=(SMA(Var19,4,1)-50)*2; Var1B:=SMA(Var1A,3,1); Var1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; Var1D:=SMA(Var1C,4,1); Var1E:=SMA(Var1D,3,1); Var1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100; Var20:=IF(Var17<=25 AND Var18<-95 AND Var1F>20 AND Var1B<-30 AND Var1E<30 AND Var12>=-0.25 AND Var14<22 AND Var15<28 AND Var16>50,80,0); 大趨勢(shì): Var3,colorblack; 頂線: IF(VarB<90,VarB,100); 多方: IF(Var1>0,Var1,0), LINESTICK; 空方: -IF(Var1<0,Var2,0), LINESTICK; 抄底: Var20,colorred,linethick2; 預(yù)警系統(tǒng): (IF((Var7>=200 AND Var6>=150) OR CROSS(65,多方),15,IF(Var7<=-200 AND Var6<=-150,-15,Var9))+65),COLORCYAN,; STICKLINE(Var3<=REF(Var4,1),Var3,Var4,8,0),colorwhite; STICKLINE(Var3>REF(Var4,1),Var3,Var4,8,0),colorred; t1:=CLOSE>MA(CLOSE,20) AND MA(CLOSE,20)>=REF(MA(CLOSE,20),1); t2:=CLOSE t3:=多方>60 AND 預(yù)警系統(tǒng)>65 AND 頂線=100; t4:=多方>48 AND 預(yù)警系統(tǒng)>65 AND 頂線<100; t5:=空方<-38 AND 預(yù)警系統(tǒng)<65; t6:=抄底>50 AND 頂線<90; t7:=Var3>REF(Var4,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1); t8:=Var3<=REF(Var4,1) AND CLOSE AND 空方>=REF(空方,1) AND VarC DRAWTEXT(t1 and count(t1,30)=1,10,\'上升通道!\'),COLOR00FFFF;//這行不能引入 B2:=DRAWTEXT(t2 and count(t2,30)=1,55,\'下降通道!\'),COLOR00FFFF;//這行不能引入 B3:=DRAWTEXT(t3 and count(t3,30)=1,55,\'上漲過急!\'),COLOR00FFFF;//這行不能引入 B4:=DRAWTEXT(t4 and count(t4,30)=1,75,\'莊家出貨!\'),COLOR00FFFF;//這行不能引入 B5:=DRAWTEXT(t5 and count(t5,30)=1,50,\'有小反彈!\'),COLOR00FFFF;//這行不能引入 B6:=DRAWTEXT(t6 and count(t6,30)=1,30,\'搶反彈!\'),COLOR00FFFF;//這行不能引入 B7:=DRAWTEXT(t7 and count(t7,30)=1,-10,\'資金進(jìn)場(chǎng)!\'),COLOR00FFFF;//這行不能引入 DRAWTEXT(t8 and count(t8,30)=1,90,\'見頂回落!\'),COLOR00FFFF;//這行不能引入 答(asghk): “實(shí)戰(zhàn)看盤”指標(biāo)! Var1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; Var2:=2*ABS(Var1); 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)); Var5:=(HIGH+LOW+CLOSE)/3; Var6:=(Var5-MA(Var5,10))/(0.015*AVEDEV(Var5,10)); Var7:=(Var5-MA(Var5,30))/(0.015*AVEDEV(Var5,30)); Var8:=IF(Var6>=150 AND Var6<200 AND Var7>=150 AND Var7<200,10,0); Var9:=IF(Var6<=-150 AND Var6>-200 AND Var7<=-150 AND Var7>-200,-10,Var8); VarA:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100; VarB:=100-ABS(VarA); VarC:=3*SMA((INDEXC-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55))*100,20,1)-2 *SMA(SMA((INDEXC-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55))*100,20,1),15,1); VarD:=3*SMA((INDEXO-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55)) *100,20,1)-2*SMA(SMA((INDEXO-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,5 5)) *100,20,1),15,1); VarE:=REF(LOW,1)*0.9; VarF:=LOW*0.9; Var10:=(VarF*VOL+VarE*(CAPITAL-VOL))/CAPITAL; Var11:=EMA(Var10,30); Var12:=Var11-CLOSE; Var13:=REF(CLOSE,1); Var14:=SMA(MAX(CLOSE-Var13,0),7,1)/SMA(ABS(CLOSE-Var13),7,1)*100; Var15:=SMA(MAX(CLOSE-Var13,0),13,1)/SMA(ABS(CLOSE-Var13),13,1)*100; Var16:=BARSCOUNT(CLOSE); Var17:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100; Var18:=((-100)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+50)*2; Var19:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100; Var1A:=(SMA(Var19,4,1)-50)*2; Var1B:=SMA(Var1A,3,1); Var1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; Var1D:=SMA(Var1C,4,1); Var1E:=SMA(Var1D,3,1); Var1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100; Var20:=IF(Var17<=25 AND Var18<-95 AND Var1F>20 AND Var1B<-30 AND Var1E<30 AND Var12>=-0.25 AND Var14<22 AND Var15<28 AND Var16>50,80,0); 大趨勢(shì): Var3,colorblack; 頂線: IF(VarB<90,VarB,100); 多方: IF(Var1>0,Var1,0), LINESTICK; 空方: -IF(Var1<0,Var2,0), LINESTICK; 抄底: Var20,colorred,linethick2; 預(yù)警系統(tǒng): (IF((Var7>=200 AND Var6>=150) OR CROSS(65,多方),15,IF(Var7<=-200 AND Var6<=-150,-15,Var9))+65),COLORCYAN; STICKLINE(Var3<=REF(Var4,1),Var3,Var4,8,0),colorwhite; STICKLINE(Var3>REF(Var4,1),Var3,Var4,8,0),colorred; t1:=CLOSE>MA(CLOSE,20) AND MA(CLOSE,20)>=REF(MA(CLOSE,20),1); t2:=CLOSE t3:=多方>60 AND 預(yù)警系統(tǒng)>65 AND 頂線=100; t4:=多方>48 AND 預(yù)警系統(tǒng)>65 AND 頂線<100; t5:=空方<-38 AND 預(yù)警系統(tǒng)<65; t6:=抄底>50 AND 頂線<90; t7:=Var3>REF(Var4,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1); t8:=Var3<=REF(Var4,1) AND CLOSE AND 空方>=REF(空方,1) AND VarC DRAWTEXT(t1 and count(t1,30)=1,10,'上升'),COLOR00FFFF; B2:DRAWTEXT(t2 and count(t2,30)=1,55,'下降!'),COLOR00FFFF; B3:DRAWTEXT(t3 and count(t3,30)=1,55,'上漲過急!'),COLOR00FFFF; B4:DRAWTEXT(t4 and count(t4,30)=1,75,'出貨!'),COLOR00FFFF; B5:DRAWTEXT(t5 and count(t5,30)=1,50,'反彈!'),COLOR00FFFF; B6:DRAWTEXT(t6 and count(t6,30)=1,30,'搶反彈!'),COLOR00FFFF; B7:DRAWTEXT(t7 and count(t7,30)=1,-10,'資金進(jìn)場(chǎng)!'),COLOR00FFFF; DRAWTEXT(t8 and count(t8,30)=1,90,'見頂回落!'),COLOR00FFFF;
181.問: 飛狐寫個(gè)近似指南針無窮成本均線的公式 答(懶漢): 別人寫的 A:=AMOUNT/V/100; B:=(3*H+L+O+2*C)/7; S1:=SUM(AMOUNT,5)/A/100; S2:=SUM(AMOUNT,13)/A/100; S3:=SUM(AMOUNT,34)/A/100; 無窮成本線:dMA(B,V/CAPITAL); CYC1:dMA(B,V/S1); CYC2: DMA(B,V/S2); CYC3:dMA(B,V/S3) ; 答(lhl311): 無窮成本均線:DMA(CLOSE,VOL/CAPITAL);
182.問: 我用的是通信達(dá)南方證券 想編寫一個(gè)條件選股:股票當(dāng)天的收盤價(jià)是N天內(nèi)最高的收盤價(jià). 答(知無不言): c=hhv(c,N);
183.問: ma10:ma(close,10); ma20:ma(close,20); ma30:ma(close,30); FILLRGN(ma10,ma20,ma10>=ma20),COLORGREEN;
我想用"FILLRGN"函數(shù)填空后就覆蓋了K線和均線, 再重疊k線也不行, 請(qǐng)問老師用什么函數(shù)可填空K線就不會(huì)被覆蓋,FXJ使用. 答(知無不言): 添加K線,設(shè)副畫指標(biāo)。
ma10:ma(close,10); ma20:ma(close,20); ma30:ma(close,30); FILLRGN(ma10,ma20,ma10>=ma20),COLORGREEN; k:=(c>o or c=o and c>ref(c,1)); stickline(k,h,l,0.1,1),colorred; stickline(k,c,o,8,1),colorred; stickline(not(k),h,l,0.1,0),colorcyan; stickline(not(k),c,o,8,0),colorcyan; 答(vkioli2): 有個(gè)變通辦法倒可以參考看看
{沿用上面知無不言兄的公式,副圖} ma10:ma(close,10); ma20:ma(close,20); ma30:ma(close,30); STICKLINE(ma10>=ma20,ma10,ma20,10,0),colorgreen; k:=(c>o or c=o and c>ref(c,1)); stickline(k,h,l,0.1,1),colorred; stickline(k,c,o,8,1),colorred; stickline(not(k),h,l,0.1,0),colorcyan; stickline(not(k),c,o,8,0),colorcyan;
184.問: 飛狐的函數(shù)功能說明里只說了用法,卻沒說是干什么用的,因此也無法理解它應(yīng)用到公式編程中的意義,它是怎么轉(zhuǎn)換的,從什么轉(zhuǎn)換到什么?為什么能用于尋找最適樣本模型, 答(水蕓兒): 傅立葉數(shù)組是一種以三角函數(shù)表現(xiàn)的周期性數(shù)組,目地在觀察周期與desity的分布,而在統(tǒng)計(jì)或經(jīng) 濟(jì)學(xué)上, 傅立葉轉(zhuǎn)換的功用主要在類似smoothing的作用,求出一條平滑線,窺探數(shù)據(jù)樣本的趨勢(shì), 簡(jiǎn)單說直線回歸若在求樣本數(shù)據(jù)的直線趨勢(shì),那FFt就類似在求樣本的曲線回歸,直線回歸所求的直 線趨勢(shì)隨樣本大小而異,同樣的FFt所求的曲線回歸, 也隨樣本大小而異,這也是為何統(tǒng)計(jì)上有所謂 的bootstrap的應(yīng)用方法,因?yàn)閱我粯颖倦y定真趨勢(shì),所以在一個(gè)母體中(population)抽出n個(gè)樣本, 做n次回歸,再取回歸參數(shù)的平均,基本上fft的功用與均線隨便列舉如120日均線相當(dāng),但120日均線 只計(jì)前120日,所以不是未來函數(shù),而FFT每次都用第一天到最后一天的數(shù)據(jù)當(dāng)作樣本計(jì)算,所以每加 入一天新數(shù)據(jù)就是一個(gè)新樣本,由于每天用不同樣本計(jì)算,求出的曲線值每天不同,有時(shí)變化小,有 時(shí)變化很大,所以是一個(gè)未來函數(shù),就如同直線回歸,它的功用只是藉由樣本求出最適模型配線,來 預(yù)測(cè)未來值而已,想要當(dāng)成均線功能使用是危險(xiǎn)的,想要了解FFT的計(jì)算方式就去查數(shù)學(xué)或統(tǒng)計(jì)專書
185.問: 看到有人發(fā)分時(shí)圖指標(biāo),但在分析家的分時(shí)圖上不能選擇指標(biāo),點(diǎn)住指標(biāo)鍵自己換,不知把源碼 輸入到哪里才能換出輸入源碼的分時(shí)圖 答(知無不言): 分析家無此功能
186.問: 求隨光標(biāo)移動(dòng)而顯示當(dāng)日換手率數(shù)值的公式(副圖指標(biāo),可添加在VOL公式里)在光標(biāo)處顯示值 答(奇兵00): 換手率%:V/FINANCE(7),LINETHICK0; 答(lfh871): V,VOLSTICK; HS:100*V/CAPITAL; DRAWNUMBER(SYSPARAM(1)=BARPOS,SYSPARAM(6),HS,2);
187.問: 分析家公式1條件:昨收盤價(jià)或今最低價(jià)為起點(diǎn),今收盤價(jià)同時(shí)穿越MA10,30,60,120日均線。 DRAWTEXT 顯示 進(jìn) 公式2條件:昨收盤價(jià)或今最低價(jià)為起點(diǎn),今收盤價(jià)同時(shí)穿越MA10,30,60日均 線, 但120日均線在MA10,30,60日均線下方。 DRAWTEXT 顯示 進(jìn) 答(vkioli2 ): {公式1條件:昨收盤價(jià)或今最低價(jià)為起點(diǎn),今收盤價(jià)同時(shí)穿越MA10,30,60,120日均線。
DRAWTEXT 顯示 進(jìn)} a:ma(c,10); b:ma(c,30); c1:ma(c,60); d:ma(c,120); k1:=min(ref(c,1),l) k2:=c>max(a,b,c1,d); DRAWTEXT(k1 and k2,l*0.995,'進(jìn)');
{公式2條件:昨收盤價(jià)或今最低價(jià)為起點(diǎn),今收盤價(jià)同時(shí)穿越MA10,30,60日均線, 但120日均線在MA10,30,60日均線下方。 DRAWTEXT 顯示 進(jìn)} a:ma(c,10); b:ma(c,30); c1:ma(c,60); d:ma(c,120); k1:=min(ref(c,1),l) k2:=c>max(a,b,c1) and d DRAWTEXT(k1 and k2,l*0.995,'進(jìn)');
188.問: k1:=min(ref(c,1),l) k2:=c>max(MA1,MA2,MA3,MA4); DRAWTEXT(k1 and k2,l*0.995,'穿4');
{公式2條件:昨收盤價(jià)或今最低價(jià)為起點(diǎn),今收盤價(jià)同時(shí)穿越MA10,30,60日均線, 但120日均線在MA10,30,60日均線下方。 DRAWTEXT 顯示 進(jìn)} k1:=min(ref(c,1),l) k2:=c>max(MA1,MA2,MA3) and MA4 DRAWTEXT(k1 and k2,l*0.995,'穿3.4'); 能改成預(yù)警嗎 答(vkioli2): a:=ma(c,10); b:=ma(c,30); c1:=ma(c,60); d:=ma(c,120); k1:=min(ref(c,1),l) k2:=c>max(a,b,c1,d); 預(yù)警:k1 and k2;
{公式2條件:昨收盤價(jià)或今最低價(jià)為起點(diǎn),今收盤價(jià)同時(shí)穿越MA10,30,60日均線, 但120日均線在MA10,30,60日均線下方。 預(yù)警} a:=ma(c,10); b:=ma(c,30); c1:=ma(c,60); d:=ma(c,120); k1:=min(ref(c,1),l) k2:=c>max(a,b,c1) and d 預(yù)警:k1 and k2;
189.問: a:=ma(c,10); 代表10天平均線,那么10周均線如何表達(dá)呢?不會(huì)是 a:=ma(c,50); 這么簡(jiǎn)單吧 答(股票交易人): "MA.MA1#week"(10);
190.問: 最好還能教我一下,在飛狐里,怎么用公式來表述籌碼密集呢? 答(): 這是我原來在網(wǎng)上收集的。 a:=barscount(c); a1:=sysparam(1); a2:=sysparam(2); a3:=sysparam(3); a4:=sysparam(4); a5:=sysparam(5);
n:=a3-a2+1; m:=a-a2+1; 區(qū)間:m,linethick0; hl:=(a4-a5)/50; vs:=if(a>=a2 and a1>=a,v,0); b1:=if(between(c,a4-0*hl,a4-1*hl),vs,0); b2:=if(between(c,a4-1*hl,a4-2*hl),vs,0); b3:=if(between(c,a4-2*hl,a4-3*hl),vs,0); b4:=if(between(c,a4-3*hl,a4-4*hl),vs,0); b5:=if(between(c,a4-4*hl,a4-5*hl),vs,0); b6:=if(between(c,a4-5*hl,a4-6*hl),vs,0); b7:=if(between(c,a4-6*hl,a4-7*hl),vs,0); b8:=if(between(c,a4-7*hl,a4-8*hl),vs,0); b9:=if(between(c,a4-8*hl,a4-9*hl),vs,0); b10:=if(between(c,a4-9*hl,a4-10*hl),vs,0); b11:=if(between(c,a4-10*hl,a4-11*hl),vs,0); b12:=if(between(c,a4-11*hl,a4-12*hl),vs,0); b13:=if(between(c,a4-12*hl,a4-13*hl),vs,0); b14:=if(between(c,a4-13*hl,a4-14*hl),vs,0); b15:=if(between(c,a4-14*hl,a4-15*hl),vs,0); b16:=if(between(c,a4-15*hl,a4-16*hl),vs,0); b17:=if(between(c,a4-16*hl,a4-17*hl),vs,0); b18:=if(between(c,a4-17*hl,a4-18*hl),vs,0); b19:=if(between(c,a4-18*hl,a4-19*hl),vs,0); b20:=if(between(c,a4-19*hl,a4-20*hl),vs,0); b21:=if(between(c,a4-20*hl,a4-21*hl),vs,0); b22:=if(between(c,a4-21*hl,a4-22*hl),vs,0); b23:=if(between(c,a4-22*hl,a4-23*hl),vs,0); b24:=if(between(c,a4-23*hl,a4-24*hl),vs,0); b25:=if(between(c,a4-24*hl,a4-25*hl),vs,0); b26:=if(between(c,a4-25*hl,a4-26*hl),vs,0); b27:=if(between(c,a4-26*hl,a4-27*hl),vs,0); b28:=if(between(c,a4-27*hl,a4-28*hl),vs,0); b29:=if(between(c,a4-28*hl,a4-29*hl),vs,0); b30:=if(between(c,a4-29*hl,a4-30*hl),vs,0); b31:=if(between(c,a4-30*hl,a4-31*hl),vs,0); b32:=if(between(c,a4-31*hl,a4-32*hl),vs,0); b33:=if(between(c,a4-32*hl,a4-33*hl),vs,0); b34:=if(between(c,a4-33*hl,a4-34*hl),vs,0); b35:=if(between(c,a4-34*hl,a4-35*hl),vs,0); b36:=if(between(c,a4-35*hl,a4-36*hl),vs,0); b37:=if(between(c,a4-36*hl,a4-37*hl),vs,0); b38:=if(between(c,a4-37*hl,a4-38*hl),vs,0); b39:=if(between(c,a4-38*hl,a4-39*hl),vs,0); b40:=if(between(c,a4-39*hl,a4-40*hl),vs,0); b41:=if(between(c,a4-40*hl,a4-41*hl),vs,0); b42:=if(between(c,a4-41*hl,a4-42*hl),vs,0); b43:=if(between(c,a4-42*hl,a4-43*hl),vs,0); b44:=if(between(c,a4-43*hl,a4-44*hl),vs,0); b45:=if(between(c,a4-44*hl,a4-45*hl),vs,0); b46:=if(between(c,a4-45*hl,a4-46*hl),vs,0); b47:=if(between(c,a4-46*hl,a4-47*hl),vs,0); b48:=if(between(c,a4-47*hl,a4-48*hl),vs,0); b49:=if(between(c,a4-48*hl,a4-49*hl),vs,0); b50:=if(between(c,a4-49*hl,a4-50*hl),vs,0); v1:=strtonum(numtostr(if(islastbar,sum(b1,n),0),2)); v2:=strtonum(numtostr(if(islastbar,sum(b2,n),0),2)); v3:=strtonum(numtostr(if(islastbar,sum(b3,n),0),2)); v4:=strtonum(numtostr(if(islastbar,sum(b4,n),0),2)); v5:=strtonum(numtostr(if(islastbar,sum(b5,n),0),2)); v6:=strtonum(numtostr(if(islastbar,sum(b6,n),0),2)); v7:=strtonum(numtostr(if(islastbar,sum(b7,n),0),2)); v8:=strtonum(numtostr(if(islastbar,sum(b8,n),0),2)); v9:=strtonum(numtostr(if(islastbar,sum(b9,n),0),2)); v10:=strtonum(numtostr(if(islastbar,sum(b10,n),0),2)); v11:=strtonum(numtostr(if(islastbar,sum(b11,n),0),2)); v12:=strtonum(numtostr(if(islastbar,sum(b12,n),0),2)); v13:=strtonum(numtostr(if(islastbar,sum(b13,n),0),2)); v14:=strtonum(numtostr(if(islastbar,sum(b14,n),0),2)); v15:=strtonum(numtostr(if(islastbar,sum(b15,n),0),2)); v16:=strtonum(numtostr(if(islastbar,sum(b16,n),0),2)); v17:=strtonum(numtostr(if(islastbar,sum(b17,n),0),2)); v18:=strtonum(numtostr(if(islastbar,sum(b18,n),0),2)); v19:=strtonum(numtostr(if(islastbar,sum(b19,n),0),2)); v20:=strtonum(numtostr(if(islastbar,sum(b20,n),0),2)); v21:=strtonum(numtostr(if(islastbar,sum(b21,n),0),2)); v22:=strtonum(numtostr(if(islastbar,sum(b22,n),0),2)); v23:=strtonum(numtostr(if(islastbar,sum(b23,n),0),2)); v24:=strtonum(numtostr(if(islastbar,sum(b24,n),0),2)); v25:=strtonum(numtostr(if(islastbar,sum(b25,n),0),2)); v26:=strtonum(numtostr(if(islastbar,sum(b26,n),0),2)); v27:=strtonum(numtostr(if(islastbar,sum(b27,n),0),2)); v28:=strtonum(numtostr(if(islastbar,sum(b28,n),0),2)); v29:=strtonum(numtostr(if(islastbar,sum(b29,n),0),2)); v30:=strtonum(numtostr(if(islastbar,sum(b30,n),0),2)); v31:=strtonum(numtostr(if(islastbar,sum(b31,n),0),2)); v32:=strtonum(numtostr(if(islastbar,sum(b32,n),0),2)); v33:=strtonum(numtostr(if(islastbar,sum(b33,n),0),2)); v34:=strtonum(numtostr(if(islastbar,sum(b34,n),0),2)); v35:=strtonum(numtostr(if(islastbar,sum(b35,n),0),2)); v36:=strtonum(numtostr(if(islastbar,sum(b36,n),0),2)); v37:=strtonum(numtostr(if(islastbar,sum(b37,n),0),2)); v38:=strtonum(numtostr(if(islastbar,sum(b38,n),0),2)); v39:=strtonum(numtostr(if(islastbar,sum(b39,n),0),2)); v40:=strtonum(numtostr(if(islastbar,sum(b40,n),0),2)); v41:=strtonum(numtostr(if(islastbar,sum(b41,n),0),2)); v42:=strtonum(numtostr(if(islastbar,sum(b42,n),0),2)); v43:=strtonum(numtostr(if(islastbar,sum(b43,n),0),2)); v44:=strtonum(numtostr(if(islastbar,sum(b44,n),0),2)); v45:=strtonum(numtostr(if(islastbar,sum(b45,n),0),2)); v46:=strtonum(numtostr(if(islastbar,sum(b46,n),0),2)); v47:=strtonum(numtostr(if(islastbar,sum(b47,n),0),2)); v48:=strtonum(numtostr(if(islastbar,sum(b48,n),0),2)); v49:=strtonum(numtostr(if(islastbar,sum(b49,n),0),2)); v50:=strtonum(numtostr(if(islastbar,sum(b50,n),0),2)); zd:=max(v1,max(v2,max(v3,max(v4,max(v5,max(v6,max(v7,max(v8,max(v9,max(v10,max (v11,max(v12,max(v13,max(v14,max(v15,max(v16,max(v17,max(v18,max(v19,max(v20,max (v21,max(v22,max(v23,max(v24,max(v25,max(v26,max(v27,max(v28,max(v29,max(v30,max (v31,max(v32,max(v33,max(v34,max(v35,max(v36,max(v37,max(v38,max(v39,max(v40,max (v41,max(v42,max(v43,max(v44,max(v45,max(v46,max(v47,max(v48,ma (v49,v50))))))))))))))))))))))))))))))))))))))))))))))))); 峰尖量:zd/finance(7),linethick0,colorff00; 峰尖價(jià):if(zd=v1,a4-1*hl,if(zd=v2,a4-2*hl,if(zd=v3,a4-3*hl,if(zd=v4,a4-4*hl,if (zd=v5,a4-5*hl,if(zd=v6,a4-6*hl,if(zd=v7,a4-7*hl,if(zd=v8,a4-8*hl,if(zd=v9,a4- 9*hl,if(zd=v10,a4-10*hl,if(zd=v11,a4-11*hl,if(zd=v12,a4-12*hl,if(zd=v13,a4- 13*hl,if(zd=v14,a4-14*hl,if(zd=v15,a4-15*hl,if(zd=v16,a4-16*hl,if(zd=v17,a4- 17*hl,if(zd=v18,a4-18*hl,if(zd=v19,a4-19*hl,if(zd=v20,a4-20*hl,if(zd=v21,a4- 21*hl,if(zd=v22,a4-22*hl,if(zd=v23,a4-23*hl,if(zd=v24,a4-24*hl,if(zd=v25,a4- 25*hl,if(zd=v26,a4-26*hl,if(zd=v27,a4-27*hl,if(zd=v28,a4-28*hl,if(zd=v29,a4- 29*hl,if(zd=v30,a4-30*hl,if(zd=v31,a4-31*hl,if(zd=v32,a4-32*hl,if(zd=v33,a4- 33*hl,if(zd=v34,a4-34*hl,if(zd=v35,a4-35*hl,if(zd=v36,a4-36*hl,if(zd=v37,a4- 37*hl,if(zd=v38,a4-38*hl,if(zd=v39,a4-39*hl,if(zd=v40,a4-40*hl,if(zd=v41,a4- 41*hl,if(zd=v42,a4-42*hl,if(zd=v43,a4-43*hl,if(zd=v44,a4-44*hl,if(zd=v45,a4- 45*hl,if(zd=v46,a4-46*hl,if(zd=v47,a4-47*hl,if(zd=v48,a4-48*hl,if(zd=v49,a4- 49*hl,if(zd=v50,a4- 50*hl,0)))))))))))))))))))))))))))))))))))))))))))))))))),linethick0,colorffff;
191,問: a,b兩線在0到50范圍內(nèi)金叉怎么寫? 答: a:ma(c,5); b:ma(c,10); cross(a,b) and a<50 and b<50;
192.問: MA1: MA(CLOSE,P1),colorred; K: (MA(CLOSE,15)*7+MA(CLOSE,50)*3)/10,COLORGREEN; 請(qǐng)教買入條件為:MA1:大于K: 而且 MA(CLOSE,1)大于K:。求教高手幫助編寫買入條件。 答: MA1>K and MA(C,1)>K;{參數(shù)P1的默認(rèn)值為3}
193.問: 請(qǐng)幫助編個(gè)選股公式:收盤價(jià)大于90周線。 答: C>MA(C,90),用周線選股
194.問: 請(qǐng)幫助寫個(gè)分析家選股公式! (今日MACD值(柱值)--昨日(或上一交易日)柱值)>n 答: "MACD.MACD"(12.26.9)-REF("MACD.MACD"(12.26.9),1)>N;
195.問: 請(qǐng)高手幫忙編寫一個(gè)10日均線拐頭向上的選股公式 答: ma(c,10)>ref(ma(c,10)>1)
196.問: 請(qǐng)幫忙。 KS:=(C-MA(C,13))/MA(C,13)*(-100); RKS:=REF(KS,1); MLS:=RKS/KS>=1.23 AND RKS>=8 AND C/REF(C,1)>=1.02; 多方:STICKLINE(KS>=8,H,L,0,1),colorwhite,linethick2; 空方:STICKLINE(MLS=1,H,L,0,1),colormagenta,linethick2; STICKLINE(C>=O,C,O,8,0) COLORred; STICKLINE(C<=O,C,O,8,0) COLORgreen; STICKLINE(KS>=8,O,C,8,1),colorwhite,linethick2; sTICKLINE(MLS=1,O,C,8,1),colormagenta,linethick2; EMA(C,10)colorcyan; EMA(KS/10+EMA(C,10),3)colorff8888; 按上述指標(biāo)編一個(gè)選股公式. 答: KS:=(C-MA(C,13))/MA(C,13)*(-100); a:=EMA(C,10); b:=EMA(KS/10+EMA(C,10),3); 金叉:cross(a,b);
197.問: n日內(nèi)收盤漲幅平均值/n日內(nèi)收盤跌幅平均值,怎么編寫? 答: 試一試 {input:n(13,1,999)} zf:=sum(if(c-ref(c,1)>0,(c-ref(c,1))/ref(c,1),0),n)/sum(c-ref(c,1)>0,n); f:=sum(if(c-ref(c,1)<0,(ref(c,1)-c)/ref(c,1),0),n)/sum(c-ref(c,1)<0,n); 漲跌比:zf/df;
198.問: 如何編寫: N日前5日均線下叉10日均線后,至今5日均線仍保持在10日均線下方。謝謝指教! 答: barslast(cross(ma(close,10),ma(close,5)))>N and ma(c,5) N值可自設(shè)。
199.問: 請(qǐng)幫助編這個(gè)選股公式:在1分鐘k線中挑選連續(xù)出現(xiàn)3只陽線的股票。 答: COUNT(c>ref(c,1),3)=3;
200.問: 這是一個(gè)出水芙蓉的公式:A1:=MA(C,13); A2:=MA(C,34); A3:=MA(C,55); B1:=O B2:=C>A1 AND C>A2 AND C>A3; CON:B1 AND B2; 請(qǐng)幫忙編寫一個(gè)今日漲幅大于4%,并且在以前的20天里曾經(jīng)出現(xiàn)過1次出水芙蓉. 答: A1:=MA(C,13); A2:=MA(C,34); A3:=MA(C,55); B1:=O B2:=C>A1 AND C>A2 AND C>A3; CON:=B1 AND B2; BARSLAST(CON)>19 AND C/REF(C,1)>1.04; 或 count(con,20)>=1 and c/ref(c,1)>1.04;
|