文华财经多空精准买卖点止损止盈数值主图指标公式源码:
DD:=EVERY(H>HV(H,20),1);
KK:=EVERY(L<LV(L,20),1);
D:=DD&&SUM(DD,BARSLAST(KK))=1;
K:=KK&&SUM(KK,BARSLAST(DD))=1;
Y:=1;
DRAWCOLORKLINE(Y&&ISDOWN,COLORYELLOW,0);
DRAWCOLORKLINE(Y&&ISDOWN=0,COLORYELLOW,1);
DRAWCOLORKLINE(DD&&ISDOWN,COLORRED,0);
DRAWCOLORKLINE(DD&&ISDOWN=0,COLORRED,1);
DRAWCOLORKLINE(KK&&ISDOWN,COLORGREEN,0);
DRAWCOLORKLINE(KK&&ISDOWN=0,COLORGREEN,1);
DRAWNUMBER(D,L-2*MINPRICE,C,0,COLORRED),VALIGN0;
DRAWNUMBER(K,H,C,0,COLORGREEN),VALIGN2;
DRAWTEXT(D,H+1*MINPRICE,'多'),FONTSIZE18,RGB(255,0,0);
DRAWTEXT(K,L-2*MINPRICE,'空'),VALIGN0,FONTSIZE18,RGB(255,128,192);
NN:=15;
DRAWNUMBER(K&&C-VALUEWHEN(D,C)>0,L-NN*MINPRICE,C-VALUEWHEN(D,C),0,COLORRED),VALIGN0;
DRAWNUMBER(K&&C-VALUEWHEN(D,C)<0,L-NN*MINPRICE,C-VALUEWHEN(D,C),0,COLORGREEN),VALIGN0;
DRAWNUMBER(D&&VALUEWHEN(K,C)-C>0,H+NN*MINPRICE,VALUEWHEN(K,C)-C,0,COLORRED),VALIGN2;
DRAWNUMBER(D&&VALUEWHEN(K,C)-C<0,H+NN*MINPRICE,VALUEWHEN(K,C)-C,0,COLORGREEN),VALIGN2;
IF(BARSLAST(D&&COUNT(D,BARSLAST(K)))>BARSLAST(K&&COUNT(K,BARSLAST(D))),HV(H,5),NULL),COLORGREEN;
IF(BARSLAST(D&&COUNT(D,BARSLAST(K)))<BARSLAST(K&&COUNT(K,BARSLAST(D))),LV(L,5),NULL),COLORRED;