{一句话:以均价为基准的K线}

FO:=OPEN;

FH:=HIGH;

FL:=LOW;

FC:=CLOSE;

FC[1]:=(2*FC[1]+FH[1]+FL[1])/4;

FOR I=2 TO DATACOUNT DO BEGIN

FO[I]:=(FO[I-1]+FC[I-1])/2;

FH[I]:=IF(FO[I]>FH[I],FO[I],FH[I]);

FL[I]:=IF(FO[I]<FL[I],FO[I],FL[I]);

FC[I]:=(2*FC[I]+FH[I]+FL[I])/4;

END;

KK:=IF(FC>=FO AND (FC>=REF(FC,1) OR REF(FC,1)>=REF(FO,1)),1,IF(FC<FO AND (FC<REF(FO,1) OR REF(FC,1)<REF(FO,1)),-1,0));

明日转折:ROUND((FO + FC) / 2*10)/10,SHIFT1,LINETHICK0,COLORFFFF;

今日转折:=IF(KK=1,MIN(FC,FO),IF(KK=-1,MAX(FC,FO),IF(REF(KK,1)=1,MIN(FC,FO),IF(REF(KK,1)=-1,MAX(FC,FO),(FC+FO)/2))));

DRAWNUMBER(ISLASTBAR,明日转折,ROUND(今日转折*100)/100,2),SHIFT3;

STICKLINE(FC>FO,FH,FL,0.4,0),COLORFF;

STICKLINE(FO>FC,FH,FL,0.4,0),COLORFFFF00;

STICKLINE(KK=1 AND FC>=FO,FO,FC,8,0),COLORFF;

STICKLINE(KK=1 AND FC<FO,FO,FC,8,0),COLORFF;

STICKLINE(KK=-1 AND FC>=FO,FO,FC,8,0),COLORFF0000;

STICKLINE(KK=-1 AND FC<FO,FO,FC,8,0),COLORFF0000;

STICKLINE(KK=0 AND FC>=FO,FO,FC,8,0),COLORFF;

STICKLINE(KK=0 AND FC<FO,FO,FC,8,0),COLORFF;


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。