
等级: 新手上路
- 注册:
- 2024-4-19
- 曾用名:
|

楼主 |
发表于 2025-3-6 13:34
|
显示全部楼层
sj:=if(date+19000000<22300414,1,0);
{+4天上方时间为准}var2:=ema(close,120)*sj;
var3:=(close*sj-var2*sj)*2/(120+1)+var2;
生命线:=var3*sj,linethick2,color0000ff;
xclose2:=ema((open+high+low+close)/4,3);
if((生命线>=xclose2),生命线,drawnull),linethick2,color00ff00;
if((生命线<xclose2),生命线,drawnull),linethick2,color0000ff;
ma3:=ma(c,170);
hh1:=if(h<ref(h,1)&&ref(h,1)<ref(h,2),ref(h,2),0);
ll1:=if(l>ref(l,1)&&ref(l,1)>ref(l,2),ref(l,2),0);
hh2:=valuewhen(hh1>0,hh1);ll2:=valuewhen(ll1>0,ll1);
hh:=hhv(high,1)/10*sj+hhv(high,2)/10+hhv(high,2)/10+hhv(high,4)/10+hhv(high,4)/10+hhv(high,8)/10+hhv(high,8)/10+hhv(high,13)/10+hhv(high,40)/10+hhv(high,20)/10;
ll:=llv(low,1)/10*sj+llv(low,2)/10+llv(low,2)/10+llv(low,4)/10+llv(low,4)/10+llv(low,8)/10+llv(low,8)/10+llv(low,13)/10+llv(low,40)/10+llv(low,20)/10;
h1:=if(hh<ref(hh,1)&&ll<ref(ll,1)&&ref(open,1)>close&&open>close&&(hhv(open,0)-close)>0,ref(hh,2),0);
l1:=if(ll>ref(ll,1)&&hh>ref(hh,1)&&ref(open,1)<close&&open<close&&(close-llv(open,0))>0,ref(ll,2),0);x:=date;
x0:=h1,linethick2;
x00:=l1;
xxx0:=o,linethick2;
xxx00:=c;
xxx000:=h;
xxx0000:=l;
h2:=valuewhen(x0>0,x0),linethick2;
l2:=valuewhen(x00>0,x00),linethick2;
k1:=if(close>h2,-3,if(close<l2,1,0));
k2:=valuewhen(k1<>0,k1);
g:=if(k2=1,h2,l2);
g1:=valuewhen(islastbar,g);
drawnumber(l>0,g1,g1,7),colorcyan;
drawnumber(ll>0,g1,g1,7),colorwhite;
x000:=k2,linethick2;
tmp:=k2,linethick2;
w1:=x000,linethick2;
x0000:=open-close,linethick2;
w2:=x0000,linethick2;
ht:=if(open>close,open,close),linethick2;
lt:=if(open<close,open,close),linethick2;
stickline(w1=1,xxx000,ht,0,0),colorcyan;
stickline(w1=1,xxx0000,lt,0,0),colorcyan;
stickline(w1=-3,xxx000,ht,0,0),colorred;
stickline(w1=-3,xxx0000,lt,0,0),colorred;
stickline(w1>0,xxx0,xxx00,3,1),colorcyan;
stickline(w1<=0,xxx0,xxx00,3,1),colorred;
stickline(w2>0&&w1<=0,xxx0,xxx00,3,0),colorred;
stickline(w2>0&&w1>0,xxx0,xxx00,3,0),colorcyan;
if(k2=1,g,drawnull),colorcyan;
if(k2=-3,g,drawnull),colorred;
drawtext(cross(tmp,0),hh,'空'),colorgreen;
drawtext(cross(0,tmp),ll,'多');n3:=barslast(cross(w1>0,0.5)),linethick2;
n4:=barslast(cross(w1<=0,0.5)),linethick2;
hh3:=if(w1<=0,ref(hhv(h,n4),n3),drawnull),coloryellow;
ll3:=if(w1>0,ref(llv(l,n3),n4),drawnull),colorgreen;
b:=cross(c,hh3) or ref(if(hh3=drawnull,1,drawnull),1)&&c>hh3;
s:=cross(ll3,c) or ref(if(ll3=drawnull,1,drawnull),1)&&c<ll3;{drawicon(b=1,l, 25);drawicon(s=1,h, 27);}
lc:= ref(close,1),linethick2;
rsi:=sma(max(close-lc, 0), 6, 1)/sma(abs(close-lc), 6, 1)*100,linethick2;{drawtext(filter(cross(rsi,30) and (close>ref(high,1.5)),5),low-low*0.001,'空止赢'),coloryellow;
drawtext(filter(cross(70,rsi) and (close<ref(low,1.5)),5),high+high*0.001,'多止赢'),colormagenta;};
yjd:=if(date+19000000>20210410,1,0);
drawtextex(islastbar=1 and yjd,1,0.1,0.2,' '),coloryellow;
kd:cross(0,tmp);
ss:=100;//默认下单手数
buy(kd,ss,market); |
|