T:=200;
N:=10;
M1:=CONST(HHV(H,T));
M2:=CONST(LLV(L,T));
A1:=LOG(M1/M2)/10;
利润:1000*A1,NODRAW;
L0:=
IF(RANGE(C,M2*POW(10,0*A1),M2*POW(10,1*A1)),0+1*A1,
IF(RANGE(C,M2*POW(10,1*A1),M2*POW(10,2*A1)),0+2*A1,
IF(RANGE(C,M2*POW(10,2*A1),M2*POW(10,3*A1)),0+3*A1,
IF(RANGE(C,M2*POW(10,3*A1),M2*POW(10,4*A1)),0+4*A1,
IF(RANGE(C,M2*POW(10,4*A1),M2*POW(10,5*A1)),0+5*A1,
IF(RANGE(C,M2*POW(10,5*A1),M2*POW(10,6*A1)),0+6*A1,
IF(RANGE(C,M2*POW(10,6*A1),M2*POW(10,7*A1)),0+7*A1,
IF(RANGE(C,M2*POW(10,7*A1),M2*POW(10,8*A1)),0+8*A1,
IF(RANGE(C,M2*POW(10,8*A1),M2*POW(10,9*A1)),0+9*A1,
IF(RANGE(C,M2*POW(10,9*A1),M2*POW(10,10*A1)),0+10*A1,
DRAWNULL))))))))));
STICKLINE(L0>0*A1,0,1*A1,4,0),COLOREE11EE;
STICKLINE(L0>1*A1,0,2*A1,4,0),COLORAA11EE;
STICKLINE(L0>2*A1,0,3*A1,4,0),COLOR5511EE;
STICKLINE(L0>3*A1,0,4*A1,4,0),COLOR1111EE;
STICKLINE(L0>4*A1,0,5*A1,4,0),COLOR1155EE;
STICKLINE(L0>5*A1,0,6*A1,4,0),COLOR11AAEE;
STICKLINE(L0>6*A1,0,7*A1,4,0),COLOR11EEEE;
STICKLINE(L0>7*A1,0,8*A1,4,0),COLOR11EEAA;
STICKLINE(L0>8*A1,0,9*A1,4,0),COLOR11EE55;
STICKLINE(L0>9*A1,0,10*A1,4,0),COLOR11EE11;
L1:=LOG(C/M2)+A1;
DRAWBAND(MA(L1,5),RGB(200,0,0),MA(L1,10),RGB(0,200,0));
DRAWKLINE(LOG(H/M2)+A1,LOG(O/M2)+A1,LOG(L/M2)+A1,LOG(C/M2)+A1);
ENTERLONG:=L0>REF(L0,1) AND MA(L1,5)>MA(L1,10) AND REF(MA(L1,5),1)>REF(MA(L1,10),1);
EXITLONG:=crOSS(MA(L1,10),MA(L1,5));