您现在的位置:程序化交易>> 期货公式>> 博易大师>> 博易大师知识>>正文内容

麻烦老师改成博易大师指标,感谢老师 [博易POBO]

咨询内容:

麻烦老师改成博易大师指标,感谢老师

input:M(14,3,40),N(6,3,30);
TYP := (HIGH + LOW + CLOSE)/3;
cci:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),STICK,colorgreen;
Wcci:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),colorblack,LINETHICK2;
DRAWICON((ABS(CCI) >= 200),CCI,12);
tcci:(TYP-MA(TYP,n))/(0.015*AVEDEV(TYP,n)),colorred;
EMA34:=EMA(CLOSE,34);
PARTLINE((CLOSE >= EMA34),100),colorFF00;
PARTLINE((CLOSE >=EMA34 ),(0 - 100)),colorFF00;
PARTLINE((CLOSE < EMA34),100),colorFF;
PARTLINE((CLOSE < EMA34),(0 - 100)),colorFF;
前差值:abs(ref(cci,1)-ref(cci,2)),LINETHICK0;
差值:ABS(ref(CCI,1)-CCI),LINETHICK0;
200,LINEDOT,colorFFFF00;
-200,LINEDOT,colorFFFF00;
100,LINEDOT,colorFFFF00;
-100,LINEDOT,colorFFFF00;
PI:=ATAN(1)*4;
PERIODS:=30;
HIGHHIGH:=HHV(HIGH,PERIODS);
LOWLOW:=LLV(LOW,PERIODS);
RANGEV:=25/(HIGHHIGH-LOWLOW)*LOWLOW;
EMA34:=EMA(CLOSE,34);
X1_EMA34:=0;
X2_EMA34:=1;
Y1_EMA34:=0;
LSMA25:=FORCAST(CLOSE,25);
X1_LSMA25:=0;
X2_LSMA25:=1;
Y1_LSMA25:=0;
ARRAY:=CCI;
HIGHBARS:=BARSLAST(NOT(ARRAY>0));
LOWBARS:=BARSLAST(NOT(ARRAY<0));
UPCONDITION:=BARSLAST(HIGHBARS>=6 AND SUM(ARRAY>100,5)>0);
DNCONDITION:=BARSLAST(LOWBARS>=6 AND SUM(ARRAY<-100,5)>0);
UPTREND:=ARRAY>0 AND UPCONDITION<DNCONDITION;
DNTREND:=ARRAY<0 AND UPCONDITION>DNCONDITION;
TRTREND:=HIGHBARS>=5 AND NOT(UPTREND) OR LOWBARS>=5 AND NOT(DNTREND);
STICKLINE(UPTREND,0,CCI,3,0),colorFF0000;
STICKLINE(DNTREND,0,CCI,3,0),colorFF;
STICKLINE(TRTREND,0,CCI,3,0),colorFFFF;
STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),0,CCI,3,0),color808080;
PARTLINE(CLOSE>LSMA25,0),LINETHICK3,colorFF00;
PARTLINE(CLOSE<LSMA25,0),LINETHICK3,colorFF;
PARTLINE(CLOSE=LSMA25,0),LINETHICK3,colorFFFF;
DRAWICON(ABS(CCI)>=200,CCI,12);
TM:=IF(DATATYPE=1,1,IF(DATATYPE=2,5,IF(DATATYPE=3,15,IF(DATATYPE=4,30,IF(DATATYPE=5,60,240)))));
ALERT1:=IF(DATATYPE=1,10,IF(DATATYPE=2,34,IF(DATATYPE=3,100,IF(DATATYPE=4,180,IF(DATATYPE=5,300,600)))));
TIMEFRAME:=TM;
ALERT:=ALERT1;
STIME:=TIMETOT0(CURRENTTIME);
SSTIME:=TIMEFRAME*60-MOD(STIME,TIMEFRAME*60);
SSTEP:=300/TIMEFRAME/60;
STICKLINE(ISLASTBAR,0,300,6,1),SHIFT2,color10000;
STICKLINE(ISLASTBAR AND SSTIME>ALERT,300,SSTIME*SSTEP,6,0),SHIFT2,colorFFFF00;
STICKLINE(ISLASTBAR AND SSTIME<ALERT,300,SSTIME*SSTEP,6,0),SHIFT2,colorFF;
DRAWNUMBER(ISLASTBAR,300,TIMEFRAME*60,0),SHIFT3;
DRAWNUMBER(ISLASTBAR,SSTIME*SSTEP,SSTIME,0),SHIFT3;
DRAWNUMBER(ISLASTBAR,ALERT*SSTEP,ALERT,0),SHIFT3;
STICKLINE(ISLASTBAR,0,0,6,1),SHIFT6,color10000;
DRAWNUMBER(ISLASTBAR,-20,-REF(CCI,1)+CCI,3),SHIFT3;

 

 来源:程序化99网( WWW.CXH99.COM )

博易技术人员: M:=14;
N:=6;
TYP := (HIGH + LOW + CLOSE)/3;
CCI:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),STICK,COLORGREEN;
WCCI:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),COLORBLACK,LINETHICK2;
DRAWICON((ABS(CCI) >= 200),CCI,12);
TCCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)),COLORRED;
EMA34:=EMA(CLOSE,34);
PARTLINE((CLOSE >= EMA34),100),COLORRED;
PARTLINE((CLOSE >=EMA34 ),(0 - 100)),COLORRED;
PARTLINE((CLOSE < EMA34),100),COLORGREEN;
PARTLINE((CLOSE < EMA34),(0 - 100)),COLORGREEN;
前差值:ABS(REF(CCI,1)-REF(CCI,2)),LINETHICK0;
差值:ABS(REF(CCI,1)-CCI),LINETHICK0;
200,POINTDOT,COLORFFFF00;
-200,POINTDOT,COLORFFFF00;
100,POINTDOT,COLORFFFF00;
-100,POINTDOT,COLORFFFF00;
PI:=ATAN(1)*4;
PERIODS:=30;
HIGHHIGH:=HHV(HIGH,PERIODS);
LOWLOW:=LLV(LOW,PERIODS);
RANGEV:=25/(HIGHHIGH-LOWLOW)*LOWLOW;
EMA34:=EMA(CLOSE,34);
X1_EMA34:=0;
X2_EMA34:=1;
Y1_EMA34:=0;
LSMA25:=FORCAST(CLOSE,25);
X1_LSMA25:=0;
X2_LSMA25:=1;
Y1_LSMA25:=0;
ARRAY1:=CCI;
HIGHBARS:=BARSLAST(NOT(ARRAY1>0));
LOWBARS:=BARSLAST(NOT(ARRAY1<0));
UPCONDITION:=BARSLAST(HIGHBARS>=6 AND SUM(ARRAY1>100,5)>0);
DNCONDITION:=BARSLAST(LOWBARS>=6 AND SUM(ARRAY1<-100,5)>0);
UPTREND:=ARRAY1>0 AND UPCONDITION<DNCONDITION;
DNTREND:=ARRAY1<0 AND UPCONDITION>DNCONDITION;
TRTREND:=HIGHBARS>=5 AND NOT(UPTREND) OR LOWBARS>=5 AND NOT(DNTREND);
STICKLINE(UPTREND,0,CCI,3,0),COLORFF0000;
STICKLINE(DNTREND,0,CCI,3,0),COLORGREEN;
STICKLINE(TRTREND,0,CCI,3,0),COLORYELLOW;
STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),0,CCI,3,0),COLOR808080;
PARTLINE(CLOSE>LSMA25,0),LINETHICK3,COLORRED;
PARTLINE(CLOSE<LSMA25,0),LINETHICK3,COLORGREEN;
PARTLINE(CLOSE=LSMA25,0),LINETHICK3,COLORYELLOW;
DRAWICON(ABS(CCI)>=200,CCI,12);
TM:=IF(DATAPERIOD=1,1,IF(DATAPERIOD=2,5,IF(DATAPERIOD=3,15,IF(DATAPERIOD=4,30,IF(DATAPERIOD=5,60,240)))));
ALERT1:=IF(DATAPERIOD=1,10,IF(DATAPERIOD=2,34,IF(DATAPERIOD=3,100,IF(DATAPERIOD=4,180,IF(DATAPERIOD=5,300,600)))));
TIMEFRAME:=TM;
ALERT:=ALERT1;
STIME:=TIMETOT0(CURRENTTIME);
SSTIME:=TIMEFRAME*60-MOD(STIME,TIMEFRAME*60);
SSTEP:=300/TIMEFRAME/60;
STICKLINE(ISLASTBAR,0,300,6,1),COLORBLUE;
STICKLINE(ISLASTBAR AND SSTIME>ALERT,300,SSTIME*SSTEP,6,0),COLORFFFF00;
STICKLINE(ISLASTBAR AND SSTIME<ALERT,300,SSTIME*SSTEP,6,0),COLORGREEN;
DRAWNUMBER(ISLASTBAR,300,TIMEFRAME*60,0);
DRAWNUMBER(ISLASTBAR,SSTIME*SSTEP,SSTIME,0);
DRAWNUMBER(ISLASTBAR,ALERT*SSTEP,ALERT,0);
STICKLINE(ISLASTBAR,0,0,6,1),COLORBLUE;
DRAWNUMBER(ISLASTBAR,-20,-REF(CCI,1)+CCI,3); 来源 程序化久久网

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

怎么收费,代编流程等详情请点击阅读!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容