//---------------------
HH1:=REF(HHV(CLOSE,50),1);
MA1:=EMA(CLOSE,50),coloryellow;
MA2:=EMA(CLOSE,20);
AVP:=(REF(HHV(CLOSE,50),1)+REF(LLV(CLOSE,50),1))/2;
//--------------------
TR:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TR,20);
ATR1:=(HH1 - (2* ATR));
//---------------------
BB:=CROSS(OPEN,HH1) AND (REF(CLOSE,1)>MA1) ;
SSS:=CROSS(AVP,CLOSE);
BBB:=BARSLAST(BB);
SSSB:=BARSLAST(SSS);
BUY1:=((BBB = 0) AND (REF(SSSB,1) < REF(BBB,1)));
B1B:=BARSLAST(BUY1);
SELL1:=(SSS AND (REF(SSSB,1) > REF(B1B,1)));
//----------------------------------------------------------
DRAWICON((BUY1 = 1),(LOW - 0.1),1);
DRAWTEXT((BUY1 = 1),(LOW - 0.25),'建仓');
DRAWICON((SELL1 = 1),(HIGH + 0.1),2);
DRAWTEXT((SELL1 = 1),(HIGH + 0.25),'清仓');
//-----------------------------------------------------------
//----------------------------
//本系统的是时序动量,需要配合截面动量:EMA(CLOSE,50),coloryellow;
//-------------------------
PC:=(REF(C,1));
PH:=(REF(H,1));
PL:=(REF(L,1));
PO:=(REF(O,1));
VR:=0.65;
JC1:=MA((O+ABS(PH-PL)*VR),1);
JC2:=MA((O-ABS(PH-PL)*VR),1);
SL:=AVP;
//-------------------
//DRAWICON((CROSS(CLOSE,JC1)),(LOW - 0.1),1);
//左侧显示----------------------------------------
//DRAWTEXT_FIX(ISLASTBAR,0.01,0,0,'短线买入价格:'),colorred;
//DRAWNUMBER_FIX(ISLASTBAR,0.09,0,0,JC1),colorred;
//DRAWTEXT_FIX(ISLASTBAR,0.15,0,0,'短线卖出价格:'),colorgreen;
//DRAWNUMBER_FIX(ISLASTBAR,0.21,0,0,JC2),colorgreen;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.1,0,'趋势止损价格:'),coloryellow;
DRAWNUMBER_FIX(ISLASTBAR,0.6,0.1,0,SL),coloryellow;
//DRAWNUMBER_FIX(ISLASTBAR,0.15,0.05,0,FLOOR(ABS(C-MIN(MA2,ATR1))/C*100)),coloryellow;
//DRAWTEXT_FIX(ISLASTBAR,0.17,0.05,0,'%个点'),coloryellow;
//DRAWTEXT_FIX(ISLASTBAR,0.01,0.1,0,'趋势建仓价格:'),coloryellow;
//DRAWNUMBER_FIX(ISLASTBAR,0.09,0.1,0,MAX(HH1,MA1)),coloryellow;
//右侧显示-------------------------------
//DRAWTEXT_FIX(ISLASTBAR,1,0,1,'Copyright@liuweifeng'),colorgray;
//加仓与清仓线减仓---------------------------
//STICKLINE(ISLASTBAR,JC1,JC1,88,0),DOTLINE,colorred;
//STICKLINE(ISLASTBAR,JC2,JC2,88,0),DOTLINE,coloryellow;
STICKLINE(ISLASTBAR,SL,SL,188,0),DOTLINE,colorgreen;
//波浪线---------------------------------------
本系统的是时序动量,需要配合截面动量:ZIG(3,5),coloryellow;