九毛八公式指标
var1:=(SMA(HIGH,20,2) * 1.05); STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,9,0),color0090FF; STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,8,0),color009FFF; STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,4,0),color00B5FF; STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,2,0),color00E4FF; STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),OPEN,LOW,0.7,0),color00FFFF; STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,HIGH,0.7,0),color00FFFF; STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),OPEN,LOW,0.7,0),colorFF76FF; STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,HIGH,0.7,0),colorFF76FF; STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,OPEN,9,0),colorFF00FF; STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,OPEN,6,0),colorFF62FF; STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,OPEN,4,0),colorFF76FF; STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,OPEN,2,0),colorFFA8FF; STICKLINE(l>ref(h,1),l,ref(h,1),50,1),COLORRED; STICKLINE(href(var2,1),rgb(255,0,0)),LINETHICK0,LAYER0; n:=10 var3:(8*BBI+7*REF(BBI,1)+6*REF(BBI,2)+5*REF(BBI,3)+4*REF(BBI,4)+3*REF(BBI,5)+2*REF(BBI,6) +1*REF(BBI,7))/36,COLORff00FF,LINETHICK0; PARTLINE(var3,var3牛线,rgb(0,255,0)),linethick2; 帮忙改城金字塔的谢谢
公式模块:
var1:=(SMA(high,20,2) * 1.05);
stickline(((((close / open) > 1.04) and (close < var1)) and ((close - ref(close,1)) > 0)),close,open,9,0),color0090ff; stickline(((((close / open) > 1.04) and (close < var1)) and ((close - ref(close,1)) > 0)),close,open,8,0),color009fff; stickline(((((close / open) > 1.04) and (close < var1)) and ((close - ref(close,1)) > 0)),close,open,4,0),color00b5ff; stickline(((((close / open) > 1.04) and (close < var1)) and ((close - ref(close,1)) > 0)),close,open,2,0),color00e4ff; stickline(((((close / open) > 1.04) and (close < var1)) and ((close - ref(close,1)) > 0)),open,low,0.7,0),color00ffff; stickline(((((close / open) > 1.04) and (close < var1)) and ((close - ref(close,1)) > 0)),close,high,0.7,0),color00ffff; stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > var1)) and (close < var1)),open,low,0.7,0),colorff76ff; stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > var1)) and (close < var1)),close,high,0.7,0),colorff76ff; stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > var1)) and (close < var1)),close,open,9,0),colorff00ff; stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > var1)) and (close < var1)),close,open,6,0),colorff62ff; stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > var1)) and (close < var1)),close,open,4,0),colorff76ff; stickline(((((close < ref(close,1)) and (close < ref(close,1))) and (high > var1)) and (close < var1)),close,open,2,0),colorffa8ff; n:=10; stickline(l>ref(h,1),l,ref(h,1),50,1),colorred; stickline(h<ref(l,1),h,ref(l,1),50,1),colorgreen; hlc:=ref(ma((high+low+close)/3,n),1); hv:=ema(hhv(high,n),3); lv:=ema(llv(low,n),3); stor:ema(2*hv-lv,3),linethick0; midr:ema(hlc+hv-lv,3),linethick1; wekr:ema(hlc*2-lv,3),linethick1; weks:ema(hlc*2-hv,3),linethick1; mids:ema(hlc-hv+lv,3),linethick1; stos:ema(2*lv-hv,3),linethick0; nnl:=barpos=sysparam(3); {drawtext(nnl,stor,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),align1,colorddaa00;} drawtext(nnl,midr,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),align1,colorddaa00; drawtext(nnl,wekr,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),align1,color0000ff; drawtext(nnl,hlc,' ̄ ̄ ̄ ̄ ̄'),align1,color00ffff; drawtext(nnl,weks,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),align1,color00ff00; drawtext(nnl,mids,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),align1,colorddaa00; {drawtext(nnl,stos,' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),align1,colorddaa00;}; drawtext(nnl,midr,numtostr(midr,2)),align2,valign2,color00ffff,linethick1; drawtext(nnl,wekr,numtostr(wekr,2)),align2,valign2,color0047ff,linethick1; drawtext(nnl,hlc,numtostr(hlc,2)),align2,valign2,color00ffff,linethick1; drawtext(nnl,weks,numtostr(weks,2)),align2,valign2,color00ff00,linethick1; drawtext(nnl,mids,numtostr(mids,2)),align2,valign2,color00ffff,linethick1; bbi:=(2*c+h+l+o/2)/4.5; var2:ema(((slope(bbi,18)*27)+bbi),45),color00ffff,linethick0; var3:(8*bbi+7*ref(bbi,1)+6*ref(bbi,2)+5*ref(bbi,3)+4*ref(bbi,4)+3*ref(bbi,5)+2*ref(bbi,6) +1*ref(bbi,7))/36,colorff00ff,linethick0; 重心:=(h+l+o+c*3)/6; nx:=(3*close+low+open+high)/6; 牛线:=(20*nx+19*ref(nx,1)+18*ref(nx,2)+17*ref(nx,3)+16*ref(nx,4) +15*ref(nx,5)+14*ref(nx,6)+13*ref(nx,7)+12*ref(nx,8)+11*ref(nx,9) +10*ref(nx,10)+9*ref(nx,11)+8*ref(nx,12)+7*ref(nx,13)+6*ref(nx,14) +5*ref(nx,15)+4*ref(nx,16)+3*ref(nx,17) +2*ref(nx,18)+ref(nx,20))/210; 牛熊线:=ma(牛线,4); partline(牛熊线<=牛线,牛熊线,colorred),linethick2; partline(牛熊线>牛线,牛熊线,colorgreen),linethick2;