%> 飞狐五线定位法主图指标公式_
飞狐五线定位法主图指标公式 2090

N:=if(sysparam(1)=datacount,20,datacount-sysparam(1)+1);

HH:=HHV(HIGH,N);

LL:=LLV(LOW,N);

VN:=N;

IF VN>DATACOUNT THEN

VN=DATACOUNT+1;

FOR I=DATACOUNT DOWNTO DATACOUNT-VN+1 DO BEGIN

HH[I]:=HH[DATACOUNT];

LL[I]:=LL[DATACOUNT];

END;

TMP:=SETLBOUND(hh,DATACOUNT-VN+1);

TMP:=SETLBOUND(ll,DATACOUNT-VN+1);

KKH:=BARSLAST(H=HH);

KKL:=BARSLAST(L=LL);

N低日:=STRTONUM(NUMTOSTR(REF(DATE,KKL),0));

N高日:=STRTONUM(NUMTOSTR(REF(DATE,KKH),0));

多空:=IF(N低日>N高日,2,1),LINETHICK0;

DATE1:=IF(多空=1,N低日,N高日);

LLOW:=ref(LOW,BARSLAST(DATE1=DATE));

H1:=STRTONUM(NUMTOSTR(hh,2));

L1:=STRTONUM(NUMTOSTR(LLOW,2));

VERTLINE(DATE=DATE1),COLORFFAAAA,LINETHICK1,LINEDOT;

DRAWTEXT(DATE=DATE1,SYSPARAM(4)*0.95,'起\n \n\n测\n \n点'),COLORFFFFFF;

IF 多空=1 THEN BEGIN

PARTLINE(DATE>N低日,L1),COLORFFFF99,LINEDOT;

PARTLINE(DATE>N低日,L1*1.06),COLORFFFF99,LINEDOT;

PARTLINE(DATE>N低日,L1*1.12),COLORFFFF99;

PARTLINE(DATE>N低日,L1*1.18),COLORFFFF99,LINEDOT;

PARTLINE(DATE>N低日,L1*1.24),COLORFFFF99; DRAWTEXT(SYSPARAM(3)=BARPOS,L1+0.002,NUMTOSTR(L1,2)+' '),COLORWHITE,ALIGN2; DRAWTEXT(SYSPARAM(3)=BARPOS,L1*1.06+0.002,NUMTOSTR(L1*1.06,2)+' '),COLORWHITE,ALIGN2; DRAWTEXT(SYSPARAM(3)=BARPOS,L1*1.12+0.002,NUMTOSTR(L1*1.12,2)+' '),COLORWHITE,ALIGN2; DRAWTEXT(SYSPARAM(3)=BARPOS,L1*1.18+0.002,NUMTOSTR(L1*1.18,2)+' '),COLORWHITE,ALIGN2; DRAWTEXT(SYSPARAM(3)=BARPOS,L1*1.24+0.002,NUMTOSTR(L1*1.24,2)+' '),COLORWHITE,ALIGN2;

END;

ELSE BEGIN

PARTLINE(DATE>N高日,H1),COLORFFFF99,LINEDOT;

PARTLINE(DATE>N高日,H1-H1*0.06),COLORFFFF99,LINEDOT;

PARTLINE(DATE>N高日,H1-H1*0.12),COLORFFFF99;

PARTLINE(DATE>N高日,H1-H1*0.18),COLORFFFF99,LINEDOT;

PARTLINE(DATE>N高日,H1-H1*0.24),COLORFFFF99;

DRAWTEXT(SYSPARAM(3)=BARPOS,H1+0.002,NUMTOSTR(H1-H1,2)+' '),COLORWHITE,ALIGN2;

DRAWTEXT(SYSPARAM(3)=BARPOS,H1-H1*0.06+0.002,NUMTOSTR(H1-H1*0.06,2)+' '),COLORWHITE,ALIGN2;

DRAWTEXT(SYSPARAM(3)=BARPOS,H1-H1*0.12+0.002,NUMTOSTR(H1-H1*0.12,2)+' '),COLORWHITE,ALIGN2;

DRAWTEXT(SYSPARAM(3)=BARPOS,H1-H1*0.18+0.002,NUMTOSTR(H1-H1*0.18,2)+' '),COLORWHITE,ALIGN2;

DRAWTEXT(SYSPARAM(3)=BARPOS,H1-H1*0.24+0.002,NUMTOSTR(H1-H1*0.24,2)+' '),COLORWHITE,ALIGN2;

END;

当前月:=FRACPART(ROUND(当前日期/100)/100)*100;

月:=MONTH;日:=DAY;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='1',c,NUMTOSTR(当前月,0)+'月时间之窗:5(小寒)、6、15、20(大寒)、21、*25\n \n \n \n '),COLOR00FFFF,ALIGN5;

{股票教程网-股票公式网站 www.gwgz.net}

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='2',c,NUMTOSTR(当前月,0)+'月时间之窗:4(立春)、6、15、18(雨水)21\n \n \n \n \n \n '),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='3',c,NUMTOSTR(当前月,0)+'月时间之窗:5(惊蛰)、6、15、*20(春分)、21\n \n \n \n \n '),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='4',c,NUMTOSTR(当前月,0)+'月时间之窗:4(清明)、6、15、20(谷雨)21\n \n \n \n \n \n '),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='5',c,NUMTOSTR(当前月,0)+'月时间之窗:5(立夏)、6、*12、15、21(小满)\n \n \n \n \n'),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='6',c,NUMTOSTR(当前月,0)+'月时间之窗:5(芒种)、6、*14、21(夏至)\n \n \n \n \n '),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='7',c,NUMTOSTR(当前月,0)+'月时间之窗:7(小暑)、8、15、*19、23(大暑)\n \n \n \n \n '),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='8',c,NUMTOSTR(当前月,0)+'月时间之窗:*6、7(立秋)、8、18、23(处暑)\n \n \n \n \n \n '),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='9',c,NUMTOSTR(当前月,0)+'月时间之窗:7(白露)、8、15、*18、23(秋分)\n \n \n \n \n '),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='10',c,NUMTOSTR(当前月,0)+'月时间之窗:8(寒露)、15、23(霜降)、*31\n \n \n \n \n '),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='11',c,NUMTOSTR(当前月,0)+'月时间之窗:7(立冬)、8、15、22(小雪)23、*28\n \n \n \n \n \n '),COLOR00FFFF,ALIGN5;

DRAWTEXT(SYSPARAM(2)=BARPOS and NUMTOSTR(当前月,0)='12',c,NUMTOSTR(当前月,0)+'月时间之窗:7(大雪)、8、15、22(冬至)23、*31\n \n \n \n \n \n '),COLOR00FFFF,ALIGN5;

s:=BARSSINCE(SYSPARAM(1)=BARPOS)+1;

s前:=BARSSINCE(SYSPARAM(1)=BARPOS+41)+1;

s后:=BARSSINCE(SYSPARAM(1)=BARPOS-104)+1;

jj:=AMOUNT/v/100;

{sum(jj,s)/s;}

sum(h,s)/s,LINETHICK2,COLORGREEN;

sum(l,s前)/s前,LINETHICK2,COLORRED;

sum(h,s后)/s后,LINETHICK2;


 

{股票教程网-承接通达信软件和公式破解,普通加密破解,完全加密破解,导入密码破解,时间限制破解,公式编写,可按您的要求写公式指标,价格按难度不同报价,有需要可以找我们}