mid2 := ma(close,21),colorwhite; upper2:=mid2 + 1.96*std(close,21),coloryellow; lower2:=mid2 - 1.96*std(close,21),coloryellow; up2:=mid2 + 2.56*std(close,21),colorff00ff; loow2:=mid2 - 2.56*std(close,21),colorff00ff; {上升趨勢(shì)} stickline(c>=mid2,mid2,up2,2,0),color330066; {下降趨勢(shì)} stickline(c<mid2,mid2,loow2,2,0),color545454; mid:mid2,colorwhite; upper:upper2,coloryellow; up:up2,colorff00ff; lower:lower2,coloryellow; loow:loow2,colorff00ff; 開口:=up-loow; 相離:=c-mid; drawtext(c>=mid and ref(開口,1)=hhv(開口,20),upper,'減倉(cāng)'),color00ff00; drawtext(c>=mid and ref(相離,1)=llv(相離,5),mid,'加倉(cāng)'); 股價(jià)多頭:=c>ma(c,5) and ma(c,5)>ma(c,10) and ma(c,10)>ma(c,20); drawtext(filter(股價(jià)多頭,20),loow*0.95,'開始建倉(cāng)'),colorred; drawicon(filter(股價(jià)多頭,20),lower,1),colorred; drawtext(cross(mid,c),up,'空倉(cāng)觀望'),coloryellow; drawicon(cross(mid,c),upper,2),coloryellow; {k線} {stickline((close > open),close,open,5.2,0),color070084;} stickline((close > open),close,open,4,1),color0000a3; stickline((close > open),close,open,3.5,0),color000033; stickline((close > open),close,open,3,0),color000066; stickline((close > open),close,open,2.0,0),color000099; stickline((close > open),close,open,1.5,0),color0000cc; stickline((close > open),close,open,1.0,0),color0000ff; stickline((close > open),close,open,0.5,0),colorcc66ff; stickline((close > open),open,low,0.3,0),colorred; stickline((close > open),close,high,0.3,0),colorred; {stickline((close = open and c>ref(c,1)),close,open,5.2,0),color070084;} stickline((close = open and c>ref(c,1)),close,open,4,1),color0000a3; stickline((close = open and c>ref(c,1)),close,open,3.5,0),color0000b7; stickline((close = open and c>ref(c,1)),close,open,3,0),color0000cd; stickline((close = open and c>ref(c,1)),close,open,2.0,0),color0000e9; stickline((close = open and c>ref(c,1)),close,open,1.5,0),color0754e9; stickline((close = open and c>ref(c,1)),close,open,1.0,0),color076ef3; stickline((close = open and c>ref(c,1)),close,open,0.5,0),color077bf3; stickline((close = open and c>ref(c,1)),open,low,0.3,0),color0000cd; stickline((close = open and c>ref(c,1)),close,high,0.3,0),color0000cd; {stickline((open > close),close,open,5.2,0),colorff5b00;} stickline((open > close),close,open,4,1),colorff6c00; stickline((open > close),close,open,3.5,0),colorff7b00; stickline((open > close),close,open,2,0),colorff9c00; stickline((open > close),close,open,1.5,0),colorffbe00; stickline((open > close),close,open,1,0),colorffcc00; stickline((open > close),close,open,0.5,0),colorffff00; stickline((open > close),close,low,0.3,0),colorff9c00; stickline((open > close),open,high,0.3,0),colorff9c00; {stickline((open = close and c<ref(c,1)),close,open,5.2,0),colorff5b00;} stickline((open = close and c<ref(c,1)),close,open,4,1),colorff6c00; stickline((open = close and c<ref(c,1)),close,open,3.5,0),colorff7b00; stickline((open = close and c<ref(c,1)),close,open,2,0),colorff9c00; stickline((open = close and c<ref(c,1)),close,open,1.5,0),colorffbe00; stickline((open = close and c<ref(c,1)),close,open,1,0),colorffcc00; stickline((open = close and c<ref(c,1)),close,open,0.5,0),colorffff00; stickline((open = close and c<ref(c,1)),close,low,0.3,0),colorff9c00; stickline((open = close and c<ref(c,1)),open,high,0.3,0),colorff9c00;
|