把参数去掉。。如果单纯的要最后一次划线 [文华财经]
-
咨询内容:
不要参数NN:=5;单纯的要最后一次划线。。如何 编写? RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;//收盘价与N周期最低值做差,N周期最高值与N周期最低值做差,两差之间做比值。K:=SMA(RSV,3,1);//RSV的移动平均值D:=SMA(K,3,1);//K的移动平均值J:=3*K-2*D;N:=BARSLAST(CROSS(K,D))+1;M:=BARSLAST(CROSSDOWN(K,D))+1;ZZ:=VALUEWHEN(REFX(CROSSDOWN(K,D),1),(C+REF(O,N-1))/2); ZZ2:=VALUEWHEN(REFX(CROSSDOWN(K,D),1),REF(ZZ,1)); NN:=5;//参数NN行修改下DRAWSL(REFX(CROSSDOWN(K,D),1),HHV(H,N),0,-N+1,0,COLORRED);DRAWSL(REFX(CROSSDOWN(K,D),1),LLV(L,N),0,-N+1,0,COLORRED);NX:BACKSET(ISLASTBAR,REF(SUMBARS(REFX(CROSSDOWN(K,D),1),NN),1)+1),NODRAW;NY:BACKSET(ISLASTBAR,REF(SUMBARS(REFX(CROSSDOWN(K,D),1),NN+1),1)+1),NODRAW;DRAWLINE1(REFX(CROSSDOWN(K,D),1)&&CROSS(NY=1,0.5),(HHV(H,N)+LLV(L,N))/2,REFX(CROSSDOWN(K,D),1)&&CROSS(NX=1,0.5),(HHV(H,N)+LLV(L,N))/2,1),COLORRED;DRAWICON(REFX(CROSSDOWN(K,D),1)&&CROSS(NY=1,0.5),(HHV(H,N)+LLV(L,N))/2,'C12',VALIGN1;DRAWICON(REFX(CROSSDOWN(K,D),1)&&CROSS(NX=1,0.5),(HHV(H,N)+LLV(L,N))/2,'C12',VALIGN1;
来源:程序化99
-
文华技术人员:
NN是一个参数,您模型后面会用到该参数,不能删除
您是要求只保留最后的上下两个横线?来源: WWW.CXH99.COM
-
文华客服:
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;//收盘价与N周期最低值做差,N周期最高值与N周期最低值做差,两差之间做比值。K:=SMA(RSV,3,1);//RSV的移动平均值D:=SMA(K,3,1);//K的移动平均值J:=3*K-2*D;N:=BARSLAST(CROSS(K,D))+1;M:=BARSLAST(CROSSDOWN(K,D))+1;ZZ:=VALUEWHEN(REFX(CROSSDOWN(K,D),1),(C+REF(O,N-1))/2); ZZ2:=VALUEWHEN(REFX(CROSSDOWN(K,D),1),REF(ZZ,1)); NN:=5;//参数NN行修改下
NX:BACKSET(ISLASTBAR,REF(SUMBARS(REFX(CROSSDOWN(K,D),1),NN),1)+1),NODRAW;NY:BACKSET(ISLASTBAR,REF(SUMBARS(REFX(CROSSDOWN(K,D),1),NN+1),1)+1),NODRAW;DRAWLINE1(REFX(CROSSDOWN(K,D),1)&&CROSS(NY=1,0.5),(HHV(H,N)+LLV(L,N))/2,REFX(CROSSDOWN(K,D),1)&&CROSS(NX=1,0.5),(HHV(H,N)+LLV(L,N))/2,1),COLORRED;
只要:DRAWLINE1(REFX(CROSSDOWN(K,D),1)&&CROSS(NY=1,0.5),(HHV(H,N)+LLV(L,N))/2,REFX(CROSSDOWN(K,D),1)&&CROSS(NX=1,0.5),(HHV(H,N)+LLV(L,N))/2,1),COLORRED;这条线,不要带参数的,普通的,最后一次划线。。。 -
网友回复:
您是想要求模型中所有的NN直接为5?
参考: RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;//收盘价与N周期最低值做差,N周期最高值与N周期最低值做差,两差之间做比值。K:=SMA(RSV,3,1);//RSV的移动平均值D:=SMA(K,3,1);//K的移动平均值J:=3*K-2*D;N:=BARSLAST(CROSS(K,D))+1;M:=BARSLAST(CROSSDOWN(K,D))+1;ZZ:=VALUEWHEN(REFX(CROSSDOWN(K,D),1),(C+REF(O,N-1))/2); ZZ2:=VALUEWHEN(REFX(CROSSDOWN(K,D),1),REF(ZZ,1)); //NN:=5;//参数NN行修改下
NX:BACKSET(ISLASTBAR,REF(SUMBARS(REFX(CROSSDOWN(K,D),1),5),1)+1),NODRAW;NY:BACKSET(ISLASTBAR,REF(SUMBARS(REFX(CROSSDOWN(K,D),1),5+1),1)+1),NODRAW;DRAWLINE1(REFX(CROSSDOWN(K,D),1)&&CROSS(NY=1,0.5),(HHV(H,N)+LLV(L,N))/2,REFX(CROSSDOWN(K,D),1)&&CROSS(NX=1,0.5),(HHV(H,N)+LLV(L,N))/2,1),COLORRED; - 网友回复: 5是倒数第5 次划线,,我要倒数第一次划线,。。。
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容