真是乱七八糟 [博易POBO]
咨询内容:
LLH:=LLV(H,60);
HHL:=HHV(L,60);
LLL:=LLV(L,60);
DRAWTEXT(开空仓=0 AND 空开仓次数1=1,(HHH+中轴)/2,'开空'),FONTSIZE(11),ALIGN(1),VALIGN(2),COLORFFFF80;
DRAWTEXT(开多仓=0 AND 多开仓次数1=1,(LLH+中轴)/2,'开多'),FONTSIZE(11),ALIGN(1),VALIGN(0),COLORFF80FF;
//平空条件
DRAWTEXT(平多条件=1 AND 多平仓次数=1,(HHL+中轴)/2,'多平'),FONTSIZE(11),ALIGN(1),VALIGN(2),COLORFFFFFF;
DRAWTEXT(平空条件=1 AND 空平仓次数=1,(LLL+中轴)/2,'空平'),FONTSIZE(11),ALIGN(1),VALIGN(0),COLORFFFFFF;
已开多周期数:=BARSLAST(开多仓=0 AND 多开仓次数1=1),NODRAW;
已开空周期数:=BARSLAST(开空仓=0 AND 空开仓次数1=1),NODRAW;
已开多仓次数:=COUNT2(开多仓=0 AND 多开仓次数1=1,0),NODRAW;
已开空仓次数:=COUNT2(开空仓=0 AND 空开仓次数1=1,0),NODRAW;
//平空条件
已平多仓次数:=COUNT2(平多条件=1 AND 多平仓次数=1,0),NODRAW;
已平空仓次数:=COUNT2(平空条件=1 AND 空平仓次数=1,0),NODRAW;
开多价:=REF(C,已开多周期数),NODRAW;
开空价:=REF(C,已开空周期数),NODRAW;
平多价:=IF(平多条件=1 AND 多平仓次数=1,C,DRAWNULL),NODRAW;
平空价:=IF(平空条件=1 AND 空平仓次数=1,C,DRAWNULL),NODRAW;
多单盈亏:=IF(平多条件=1 AND 多平仓次数=1,C-开多价,DRAWNULL),NODRAW;
空单盈亏:=IF(平空条件=1 AND 空平仓次数=1,开空价-C,DRAWNULL),NODRAW;
吨多单盈亏计:IF(SUM(多单盈亏, 0)<>DRAWNULL,SUM(多单盈亏, 0),0),NODRAW;
吨空单盈亏计:IF(SUM(空单盈亏, 0)<>DRAWNULL,SUM(空单盈亏, 0),0),NODRAW;
吨总盈亏:(吨多单盈亏计+吨空单盈亏计),NODRAW;RETURN;
M12:=EMA((EMA(C,12)-EMA(C,26)),9)+EMA(C,26);
DIFF:=EMA(C,12)-中轴,COLORFFFFFF;
DEA:=M12-中轴,COLOR00FFFF;
金叉周期数:=BARSLAST(CROSS(DIFF,DEA)),NODRAW;
金叉数:=COUNT2(CROSS(DIFF,DEA),0),NODRAW;
前金叉数:=COUNT2(CROSS(DIFF,DEA)AND 金叉数-1,0),NODRAW;
金S:=DATACOUNT-BARPOS+金叉周期数,NODRAW;
前金叉总数:=(前金叉数[DATACOUNT-金S]),NODRAW;
前金叉周期数:=BARSLAST(CROSS(DIFF,DEA) AND 前金叉数<=前金叉总数),NODRAW;
前金叉DIFF:=REF(EMA12,前金叉周期数);金叉DIFF:=REF(EMA12,金叉周期数); //003----
死叉周期数:=BARSLAST(CROSS(DEA,DIFF)),NODRAW;
死叉数:=COUNT2(CROSS(DEA,DIFF),0),NODRAW;
前死叉数:=COUNT2(CROSS(DEA,DIFF)AND死叉数-1,0),NODRAW;
死S:=DATACOUNT-BARPOS+死叉周期数,NODRAW;
前死叉总数:=(前死叉数[DATACOUNT-死S]),NODRAW;
前死叉周期数:=BARSLAST(CROSS(DEA,DIFF)AND前死叉数<=前死叉总数),NODRAW;
前死叉DIFF:=REF(EMA12,前死叉周期数);死叉DIFF:=REF(EMA12,死叉周期数);
开多:=100;开空:=200;平多:=0;平空:=0;
多条件:=IF((DP<6ORDP=13)ANDM4>均价ANDEMA12>REF(EMA12,1)ANDDDEA2>中轴 ANDDEA>0ANDDIFF>DEAANDEMA12>金叉DIFF,100,DRAWNULL),NODRAW;
空条件:=IF((DP<6ORDP=13)ANDM4<均价ANDEMA12<REF(EMA12,1)ANDDDEA2<中轴 ANDDEA<0ANDDEA>DIFFANDEMA12<死叉DIFF,200,DRAWNULL),NODRAW; 来源 程序化久久网
真是乱七八糟
HHH:=HHV(H,60);LLH:=LLV(H,60);
HHL:=HHV(L,60);
LLL:=LLV(L,60);
DRAWTEXT(开空仓=0 AND 空开仓次数1=1,(HHH+中轴)/2,'开空'),FONTSIZE(11),ALIGN(1),VALIGN(2),COLORFFFF80;
DRAWTEXT(开多仓=0 AND 多开仓次数1=1,(LLH+中轴)/2,'开多'),FONTSIZE(11),ALIGN(1),VALIGN(0),COLORFF80FF;
//平空条件
DRAWTEXT(平多条件=1 AND 多平仓次数=1,(HHL+中轴)/2,'多平'),FONTSIZE(11),ALIGN(1),VALIGN(2),COLORFFFFFF;
DRAWTEXT(平空条件=1 AND 空平仓次数=1,(LLL+中轴)/2,'空平'),FONTSIZE(11),ALIGN(1),VALIGN(0),COLORFFFFFF;
已开多周期数:=BARSLAST(开多仓=0 AND 多开仓次数1=1),NODRAW;
已开空周期数:=BARSLAST(开空仓=0 AND 空开仓次数1=1),NODRAW;
已开多仓次数:=COUNT2(开多仓=0 AND 多开仓次数1=1,0),NODRAW;
已开空仓次数:=COUNT2(开空仓=0 AND 空开仓次数1=1,0),NODRAW;
//平空条件
已平多仓次数:=COUNT2(平多条件=1 AND 多平仓次数=1,0),NODRAW;
已平空仓次数:=COUNT2(平空条件=1 AND 空平仓次数=1,0),NODRAW;
开多价:=REF(C,已开多周期数),NODRAW;
开空价:=REF(C,已开空周期数),NODRAW;
平多价:=IF(平多条件=1 AND 多平仓次数=1,C,DRAWNULL),NODRAW;
平空价:=IF(平空条件=1 AND 空平仓次数=1,C,DRAWNULL),NODRAW;
多单盈亏:=IF(平多条件=1 AND 多平仓次数=1,C-开多价,DRAWNULL),NODRAW;
空单盈亏:=IF(平空条件=1 AND 空平仓次数=1,开空价-C,DRAWNULL),NODRAW;
吨多单盈亏计:IF(SUM(多单盈亏, 0)<>DRAWNULL,SUM(多单盈亏, 0),0),NODRAW;
吨空单盈亏计:IF(SUM(空单盈亏, 0)<>DRAWNULL,SUM(空单盈亏, 0),0),NODRAW;
吨总盈亏:(吨多单盈亏计+吨空单盈亏计),NODRAW;RETURN;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: //577M12:=EMA((EMA(C,12)-EMA(C,26)),9)+EMA(C,26);
DIFF:=EMA(C,12)-中轴,COLORFFFFFF;
DEA:=M12-中轴,COLOR00FFFF;
金叉周期数:=BARSLAST(CROSS(DIFF,DEA)),NODRAW;
金叉数:=COUNT2(CROSS(DIFF,DEA),0),NODRAW;
前金叉数:=COUNT2(CROSS(DIFF,DEA)AND 金叉数-1,0),NODRAW;
金S:=DATACOUNT-BARPOS+金叉周期数,NODRAW;
前金叉总数:=(前金叉数[DATACOUNT-金S]),NODRAW;
前金叉周期数:=BARSLAST(CROSS(DIFF,DEA) AND 前金叉数<=前金叉总数),NODRAW;
前金叉DIFF:=REF(EMA12,前金叉周期数);金叉DIFF:=REF(EMA12,金叉周期数); //003----
死叉周期数:=BARSLAST(CROSS(DEA,DIFF)),NODRAW;
死叉数:=COUNT2(CROSS(DEA,DIFF),0),NODRAW;
前死叉数:=COUNT2(CROSS(DEA,DIFF)AND死叉数-1,0),NODRAW;
死S:=DATACOUNT-BARPOS+死叉周期数,NODRAW;
前死叉总数:=(前死叉数[DATACOUNT-死S]),NODRAW;
前死叉周期数:=BARSLAST(CROSS(DEA,DIFF)AND前死叉数<=前死叉总数),NODRAW;
前死叉DIFF:=REF(EMA12,前死叉周期数);死叉DIFF:=REF(EMA12,死叉周期数);
开多:=100;开空:=200;平多:=0;平空:=0;
多条件:=IF((DP<6ORDP=13)ANDM4>均价ANDEMA12>REF(EMA12,1)ANDDDEA2>中轴 ANDDEA>0ANDDIFF>DEAANDEMA12>金叉DIFF,100,DRAWNULL),NODRAW;
空条件:=IF((DP<6ORDP=13)ANDM4<均价ANDEMA12<REF(EMA12,1)ANDDDEA2<中轴 ANDDEA<0ANDDEA>DIFFANDEMA12<死叉DIFF,200,DRAWNULL),NODRAW; 来源 程序化久久网
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,谢谢您!)
相关文章
-
没有相关内容