小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

通達信纏論買賣點公式

 耀日131 2016-01-24
通達信買賣點指標:
{N1:1,100,10;N2:1,100,10;DISP:=1,3,2};
N1:=10;N2:=10;DISP:=2;

K:=IF(PERIOD=5,1,{日}
IF(PERIOD=6,1,{周}
IF(PERIOD=7,1,{月}
IF(PERIOD=8,1,{多分鐘}
IF(PERIOD=9,1,{多日}
IF(PERIOD=10,1,{季}
IF(PERIOD=11,2,{年}
IF(PERIOD=4,1,{60F}
IF(PERIOD=3,1,{30F}
IF(PERIOD=2,1,{15F}
IF(PERIOD=1,1{5F},1{1F})))))))))))/10;


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&&TJ2&&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))&&ZD<REF(ZD,REF(BARSLAST(TJ4),1));
TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);
ZSD:=IF(TJ8,ZD,DRAWNULL);
ZSG:=IF(TJ8,ZG,DRAWNULL);
ZSH:=IF(TJ8,HH,DRAWNULL);
ZSL:=IF(TJ8,LL,DRAWNULL);

STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;
STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;
DRAWTEXT(DISP=2,ZSH,'中樞'),COLORRED;

中樞高:PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CROSSDOT,COLORLIRED;
中樞低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CROSSDOT,COLORLIGREEN;
中樞最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;
中樞最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;

趨勢高:PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;
趨勢低:PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;
局部低點預選A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);
局部低點預選B:=BACKSET(局部低點預選A=0 AND REF(局部低點預選A,1)=1,2);
局部低點預選C:=IF(局部低點預選B=1 AND REF(局部低點預選B,1)=0,-1,0);
局部高點預選A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);
局部高點預選B:=BACKSET(局部高點預選A=0 AND REF(局部高點預選A,1)=1,2);
局部高點預選C:=IF(局部高點預選B=1 AND REF(局部高點預選B,1)=0,1,0);
缺口判斷:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));
距前高天:=BARSLAST(局部高點預選C=1);
距前低天:=BARSLAST(局部低點預選C=-1);
小值周期:=LOWRANGE(L);
大值周期:=TOPRANGE(H);
低保留AA:=IF(局部低點預選C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留AB:=IF(局部低點預選C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判斷,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);
低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);
預判:=IF((距前低天<4 AND HHV(缺口判斷,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);
判斷:=IF(局部高點預選C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 預判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);
高保留A:=IF(局部高點預選C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);
高保留B:=IF(局部高點預選C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判斷,距前低天)=1),1,0);
高保留:=IF((高保留A=1 OR 高保留B=1 OR 判斷=1) AND H>REF(L,距前低天+1),1,0);
預判A:=IF((距前高天<4 AND HHV(缺口判斷,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);
判斷A:=IF(局部低點預選C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 預判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);

低保留A:=IF(局部低點預選C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留B:=IF(局部低點預選C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判斷,距前高天)=-1 OR 判斷A=-1),-1,0);
低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);
距前高天A:=BARSLAST(高保留=1);
距前低天A:=BARSLAST(低保留=-1);

預判X:=IF((距前低天A<4 AND HHV(缺口判斷,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);
判斷X:=IF(局部高點預選C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 預判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);
高保留XA:=IF(局部高點預選C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);
高保留XB:=IF(局部高點預選C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判斷,距前低天A)=1),1,0);
高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判斷X=1) AND H>REF(L,距前低天A+1),1,0);
預判XA:=IF((距前高天A<4 AND HHV(缺口判斷,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);
判斷XA:=IF(局部低點預選C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 預判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);

低保留XA:=IF(局部低點預選C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);
低保留XB:=IF(局部低點預選C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判斷,距前高天A)=-1 OR 判斷XA=-1),-1,0);
低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);
距前高天YA:=BARSLAST(高保留X=1);
距前低天YA:=BARSLAST(低保留X=-1);

預判YX:=IF((距前低天YA<4 AND HHV(缺口判斷,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);
判斷YX:=IF(局部高點預選C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 預判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);
高保留YXA:=IF(局部高點預選C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);
高保留YXB:=IF(局部高點預選C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判斷,距前低天YA)=1),1,0);
高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判斷YX=1) AND H>REF(L,距前低天YA+1),1,0);
預判YXA:=IF((距前高天YA<4 AND HHV(缺口判斷,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);
判斷YXA:=IF(局部低點預選C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 預判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);

低保留YXA:=IF(局部低點預選C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);
低保留YXB:=IF(局部低點預選C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判斷,距前高天YA)=-1 OR 判斷YXA=-1),-1,0);
低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);
AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));
極點保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);

局部極點:IF(極點保留=-1,L,IF(極點保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;
DRAWLINE(極點保留=-1,局部極點,極點保留=1,局部極點,0)COLORLIRED;
DRAWLINE(極點保留=1,局部極點,極點保留=-1,局部極點,0)COLORYELLOW;
DD1:=BARSLAST(ABS(極點保留)!=1);
DRAWTEXT(極點保留=1,局部極點,'賣'),COLORGREEN;
DRAWTEXT(極點保留=-1,局部極點,'買'),COLORRED;
MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;判:IF(MA5<REF(MA5,1),MA5,DRAWNULL),COLORWHITE,LINETHICK2;
 
 
 


比如選2買公式:

飛狐選2買:
  1. //選2買  公式
  2. {只適用于5分鐘圖.(要選其它周期修改相關參數)
  3. 使用前提:你需要判斷對大盤的1F走勢買點,比如周2的上證的2買.}

  4. var0:="fbase.var2#min30";
  5. var1:="chzhshch@kxian";
  6. var2:="chzhshch@bi";
  7. var3:=barslast(var0<>0);
  8. tj1:=ref(var0,var3)=-1;
  9. var4:=sum(abs(var2),var3);
  10. tj2:=var4=1;
  11. tj3:=ref(var2,barslast(var2<>0))=1;
  12. tj1 and tj2 and tj3;
復制代碼
發(fā)現很多人連周期都不會修改,下面這個較多的周期

  1. //選2買  公式
  2. {只適用于5 15 30分鐘圖.}
  3. var001:="fbase.var2#min30";
  4. if datatype=3 then var001:="fbase.var2#min60";
  5. if datatype=4 then var001:="fbase.var2#day";
  6. var1:="chzhshch@kxian";
  7. var2:="chzhshch@bi";
  8. var3:=barslast(var001<>0);
  9. tj1:=ref(var001,var3)=-1;  //上級別是底
  10. var4:=sum(abs(var2),var3);
  11. tj2:=var4=1; //第一個回調才算
  12. tj3:=ref(var2,barslast(var2<>0))=1;//本級別頂
  13. tj1 and tj2 and tj3 ;
復制代碼

筆成交量和
  1. var1:="chzhshch@kxian";
  2. var2:="chzhshch@bi";
  3. a1:=barslast(var2<>0);
  4. a2:=ref(var2,a1);
  5. aa1:ref(a1+1,1); //到前頂或底的距離
  6. aa2:-ref(a2,1); //上漲or下跌
  7. vol,volstick;
  8. zdvol:=if (aa2>0,vol,-vol);//上漲或下跌的成交量
  9. sumvol:sum(zdvol,aa1)/10;

  10. drawnumber(var2=1, sumvol,sumvol,0),pxup20,coloryellow;//在筆的頂點顯示數值
  11. drawnumber(var2=-1,sumvol,abs(sumvol),0),pxdn5,coloryellow;
  12. drawnumber(islastbar and aa2>0,sumvol,sumvol,0),pxup20,coloryellow;//顯示最后筆沒完成的數值
  13. drawnumber(islastbar and aa2<0,sumvol,abs(sumvol),0),pxdn5,coloryellow;
復制代碼


我也發(fā)一個權證的,不過飛狐預警不怎么靈,公式的信號倒是有。五分放量筆,信號出來看肉眼看一個1F線段回調是否能介入,相當于二買。
var1:="chzhshch@kxian";
var2:="chzhshch@bi";{處理筆關系}
x1:=REF(var2,BARSLAST(var2<>0))=1;
x2:=REF(x1,1);

DIFF := EMA(VOL,12) - EMA(VOL,26);

x3:= x2=1 and diff>0;
yj:FILTER(x3,10);
//制作者6牛




一買都提供了,順帶連三買也送大家用了?。?!

本帖最后由 新纏咪 于 2009-5-3 19:16 編輯

這么晚還來發(fā)帖,就是把一買的選股公式初步搞出來了,當然還不完善,不能算是一買的公式,充其量算選出即將盤整背馳的,不過兩個中樞下的盤整背馳就是一買了,當然真正是否背馳還要靠人工來判斷,它只能初選,不過也省下很多事了,歡迎使用,多提意見。
  1. begin
  2. if DATAPERIOD=0 then minbi:="fbase.var2#min1";
  3. if DATAPERIOD=1 then minbi:="fbase.var2#min5";
  4. if DATAPERIOD=2 then minbi:="fbase.var2#min30";
  5. if DATAPERIOD=3 then minbi:="fbase.var2#min60";
  6. if DATAPERIOD=4 then minbi:="fbase.var2#day";
  7. if DATAPERIOD=5 then minbi:="fbase.var2#day";
  8. if DATAPERIOD=6 then minbi:="fbase.var2#week";
  9. if DATAPERIOD=7 then minbi:="fbase.var2#month";
  10. if DATAPERIOD=8 then minbi:="fbase.var2#year";
  11. var001:="fbase.var2#min30";
  12. if datatype=3 then var001:="fbase.var2#min60";
  13. if datatype=4 then var001:="fbase.var2#day";
  14. var1:="chzhshch@kxian";
  15. var2:="chzhshch@bi";{處理筆關系}
  16. var3:="chzhshch@tongji"(minbi);{同級別分解}
  17. zg:="chzhshch@zg"(var3);//一定要先調用ZG
  18. zd:="chzhshch@zd"(var3);
  19. zswz:=barslast(zg>zd);
  20. tj3:=count(abs(var3),barslast(var3=1))=0;
  21. tj4:=l<ref(l,barslast(var2=-1));
  22. tj5:=count(var2=1,zswz-1)>0;
  23. tj6:=ref(h,barslast(var2=1))<ref(zd,zswz);
  24. tj7:=count(zg>zd,barslast(var3=1))>0;
  25. not(zg>zd)&&tj3&&tj7&&tj4&&tj5&&tj6;
  26. end;
復制代碼
一買是模糊的,不準確的,三買就比較標準了,同樣背馳需自行判斷,否則不背馳就跌回中樞了:

  1. begin
  2. if DATAPERIOD=0 then minbi:="fbase.var2#min1";
  3. if DATAPERIOD=1 then minbi:="fbase.var2#min5";
  4. if DATAPERIOD=2 then minbi:="fbase.var2#min30";
  5. if DATAPERIOD=3 then minbi:="fbase.var2#min60";
  6. if DATAPERIOD=4 then minbi:="fbase.var2#day";
  7. if DATAPERIOD=5 then minbi:="fbase.var2#day";
  8. if DATAPERIOD=6 then minbi:="fbase.var2#week";
  9. if DATAPERIOD=7 then minbi:="fbase.var2#month";
  10. if DATAPERIOD=8 then minbi:="fbase.var2#year";
  11. var001:="fbase.var2#min30";
  12. if datatype=3 then var001:="fbase.var2#min60";
  13. if datatype=4 then var001:="fbase.var2#day";
  14. var1:="chzhshch@kxian";
  15. var2:="chzhshch@bi";{處理筆關系}
  16. var3:="chzhshch@tongji"(minbi);{同級別分解}
  17. zg:="chzhshch@zg"(var3);//一定要先調用ZG
  18. zd:="chzhshch@zd"(var3);
  19. var1:="chzhshch@kxian";
  20. var2:="chzhshch@bi";
  21. var4:=barslast(var001<>0);
  22. tj1:=ref(var001,var2)=-1;  //上級別是底
  23. var5:=sum(abs(var2),var2);
  24. tj2:=var5=1; //第一個回調才算
  25. tj3:=count(abs(var3),barslast(var3=-1))=0;
  26. zswz:=barslast(zg>zd);
  27. tj4:=count(zg>zd,barslast(var3=-1))>0;
  28. tj5:=count(var2=1,barslast(var2=-1))=1;
  29. tj6:=count(var2=1,zswz-1)=1;
  30. tj7:=ref(l,barslast(var2=1))>ref(zg,barslast(zg>zd));
  31. not(zg>zd)&&tj3&&tj4&&tj5&&tj6&&tj7;
  32. end;

    本站是提供個人知識管理的網絡存儲空間,所有內容均由用戶發(fā)布,不代表本站觀點。請注意甄別內容中的聯系方式、誘導購買等信息,謹防詐騙。如發(fā)現有害或侵權內容,請點擊一鍵舉報。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約