九毛八公式指标
求助老师将.波段指标.公式中的(CJ下轨.绿线)上穿(JB下轨.黄线)时改选股公式.谢谢 LY:=10; BL:=40; CJQS:=XMA(CLOSE,LY); JBQS:=XMA(CLOSE,BL); N:=REF(JBQS,BL/2+1-CURRBARSCOUNT)/REF(JBQS,BL/2+2-CURRBARSCOUNT); M:=REF(CJQS,LY/2+1-CURRBARSCOUNT)/REF(CJQS,LY/2+2-CURRBARSCOUNT); JB上轨:IF(CURRBARSCOUNT>BL/2,JBQS*1.1,REF(JBQS,BL/2+1-CURRBARSCOUNT)*POW(N,BL/2+1-CURRBARSCOUNT)*1.1); JB下轨:IF(CURRBARSCOUNT>BL/2,JBQS*0.9,REF(JBQS,BL/2+1-CURRBARSCOUNT)*POW(N,BL/2+1-CURRBARSCOUNT)*0.9); CJ上轨:IF(CURRBARSCOUNT>LY/2,CJQS*1.05,REF(CJQS,LY/2+1-CURRBARSCOUNT)*POW(M,LY/2+1-CURRBARSCOUNT)*1.05); CJ下轨:IF(CURRBARSCOUNT>LY/2,CJQS*0.95,REF(CJQS,LY/2+1-CURRBARSCOUNT)*POW(M,LY/2+1-CURRBARSCOUNT)*0.95);
公式模块:
LY:=10;
BL:=40; CJQS:=XMA(CLOSE,LY); JBQS:=XMA(CLOSE,BL); N:=REF(JBQS,BL/2+1-CURRBARSCOUNT)/REF(JBQS,BL/2+2-CURRBARSCOUNT); M:=REF(CJQS,LY/2+1-CURRBARSCOUNT)/REF(CJQS,LY/2+2-CURRBARSCOUNT); JB上轨:=IF(CURRBARSCOUNT>BL/2,JBQS*1.1,REF(JBQS,BL/2+1-CURRBARSCOUNT)*POW(N,BL/2+1-CURRBARSCOUNT)*1.1); JB下轨:=IF(CURRBARSCOUNT>BL/2,JBQS*0.9,REF(JBQS,BL/2+1-CURRBARSCOUNT)*POW(N,BL/2+1-CURRBARSCOUNT)*0.9); CJ上轨:=IF(CURRBARSCOUNT>LY/2,CJQS*1.05,REF(CJQS,LY/2+1-CURRBARSCOUNT)*POW(M,LY/2+1-CURRBARSCOUNT)*1.05); CJ下轨:=IF(CURRBARSCOUNT>LY/2,CJQS*0.95,REF(CJQS,LY/2+1-CURRBARSCOUNT)*POW(M,LY/2+1-CURRBARSCOUNT)*0.95); crOSS(CJ下轨,JB下轨);