龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2018-11-30 13:31

同花顺缠论分笔及中枢主图改为文华[文华财经公式]

咨询内容: //同花顺缠论分笔及中枢主图源码
[code]
KU1:=IF(HIGH=HHV(HIGH,3),1,0);
KD1:=IF(LOW=LLV(LOW,3),1,0);
UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0
AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1
AND REF(KU1,1)=0 AND KU1=0)));
DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1
AND REF(KD1,1)=0 AND KD1=0)));
HV:=H>UL AND H>REF(H,1) ;
LV:=L<DL AND L<REF(L,1) ;
GP:=BARSLAST(HV);
DP:=BARSLAST(LV);
IP:=IF(GP=0,DP,GP)>3;
HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));
LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));
DRAWLINE(LV1,LOW,HV1, HIGH,0),coloryellow,LINETHICK2;
DRAWLINE(HV1,HIGH,LV1, LOW,0),colormagenta,LINETHICK2;
///加入中枢判定
//简化版
N1:=10;N2:=10;DISP:=2;K:=1;
P1:=PEAK(1,K*N1,1);
P2:=PEAK(1,K*N1,2);
WP1:=PEAKBARS(1,K*N1,1);
WP2:=PEAKBARS(1,K*N1,2);
T1:=TROUGH(2,K*N2,1);
T2:=TROUGH(2,K*N2,2);
WT1:=TROUGHBARS(2,K*N2,1);
WT2:=TROUGHBARS(2,K*N2,2);
TJ1:=P1>T1 AND P2>T2 ;
ZD:=MAX(T1,T2);
ZG:=MIN(P1,P2);
LL:=MIN(T1,T2);
HH:=MAX(P1,P2);
TJ2:=FILTER(ZG>ZD,2);
TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));
TJ4:=TJ1 AND TJ2 AND NOT(TJ3);
TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));
TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);
ZSD:=IF(TJ8,ZD,REF(ZD,1));//,coloryellow;
ZSG:=IF(TJ8,ZG,REF(ZG,1));//,colormagenta;
ZSH:=IF(TJ8,HH,REF(HH,1));//,colorblue;
ZSL:=IF(TJ8,LL,REF(LL,1));//,colorgreen;
STICKLINE(TJ8,ZSH,ZSL,0,-1),colormagenta;
STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),colormagenta;
DRAWTEXT(DISP=2,ZSH,''),colorwhite;
//中枢高
中枢高:ZSG,colormagenta;
POLYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,colormagenta;
//中枢低:
中枢低:ZSD,coloryellow;
POLYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,coloryellow;
//中枢最高:
中枢最高:ZSH,colorred;
POLYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,colorred;
//中枢最低:
中枢最低:ZSL,colorgreen;
POLYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,colorgreen;
//趋势高:
//QSGD1:POLYLINE(DISP=3,ZIG(1,K*N1)),colorblue;
//趋势低:
//QSDD1:POLYLINE(DISP=3,ZIG(2,K*N2)),colorblue;
MA5:MA(CLOSE,5),COLORFF00FF,Linethick1;
//COLORFF00FF,LINETHICK2;
命真好:=MA5>REF(MA5,1);
命真坏:=MA5<REF(MA5,1);
//判定:
PARTLINE(MA5,命真好,coloryellow,命真坏,colorblue,MA5,COLORFF00FF),linethick3;
//F1:IF(MA5<REF(MA5,1),MA5,NULL),colorwhite,LINETHICK2;
[/code]


文华技术人员://改成的文华财经缠论分笔及中枢主图指标源码

[code]
MA5:MA(CLOSE,5);
KU1:=IFELSE(HIGH=HHV(HIGH,3),1,0);

KD1:=IFELSE(LOW=LLV(LOW,3),1,0);

UL:=IFELSE(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0)));

DL:=IFELSE(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0)));

HHVV:=H>UL AND H>REF(H,1) ;

LLVV:=L<DL AND L<REF(L,1) ;

HV1:=HHVV AND H>=HHV(H,BARSLAST(LLVV));

LV1:=LLVV AND L<=LLV(L,BARSLAST(HHVV));

DRAWLINE(LV1,LOW,HV1, HIGH,COLORYELLOW);

DRAWLINE(HV1,HIGH,LV1, LOW,COLORMAGENTA); ///加入中枢判定//简化版

N1:=10;

N2:=10;

DISP:=2;

K:=1;

P1:=PEAK(O,K*N1,1,1);

P2:=PEAK(O,K*N1,2,1);

WP1:=PEAKBARS(O,K*N1,1,1);

WP2:=PEAKBARS(O,K*N1,2,1);

T1:=TROUGH(H,K*N2,1,1);

T2:=TROUGH(H,K*N2,2,1);

WT1:=TROUGHBARS(H,K*N2,1,1);

WT2:=TROUGHBARS(H,K*N2,2,1);

TJ1:=P1>T1 AND P2>T2 ;

ZD:=MAX(T1,T2);

ZG:=MIN(P1,P2);

LL:=MIN(T1,T2);

HH:=MAX(P1,P2);
TJ2:=FILTER(ZG>ZD,2);
TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));
TJ4:=TJ1 AND TJ2 AND NOT(TJ3);
TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1)) AND ZD<REF(MA5,1);
TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);
ZSD:=IFELSE(TJ8,ZD,REF(ZD,1)),COLORYELLOW;
ZSG:=IFELSE(TJ8,ZG,REF(ZG,1)),COLORMAGENTA;
ZSH:=IFELSE(TJ8,HH,REF(HH,1)),COLORBLUE;
ZSL:=IFELSE(TJ8,LL,REF(LL,1)),COLORGREEN;
STICKLINE(TJ8,ZSH,ZSL,0,COLORMAGENTA);
STICKLINE(TJ8,ZSD,ZSG,COLORMAGENTA,1);
DRAWTEXT(DISP=2,ZSH,'GG');
//中枢高

POLYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8)),COLORMAGENTA);
//中枢低:

POLYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8)),COLORYELLOW);
//中枢最高:

POLYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8)),COLORRED);
//中枢最低:

POLYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8)),COLORGREEN);
//趋势高:
//QSGD1:POLYLINE(DISP=3,ZIGZAG(O,K*N1,1)),COLORBLUE;
//趋势低:
//QSDD1:POLYLINE(DISP=3,ZIGZAG(H,K*N2,1)),COLORBLUE;


MZH1:=MA5>REF(MA5,1);
MZH2:=MA5<REF(MA5,1);
//判定:
PARTLINE(MZH1,MA5,COLORYELLOW);
PARTLINE(MZH2,MA5,COLORRED);
//F1:IF(MA5<REF(MA5,1),MA5,NULL),colorwhite,LINETHICK2;
[/code]

风迷 发表于 2022-7-26 21:36

{:smile:}

页: [1]