: | : | :期货量化学习 | :期货量化 |
返回列表 发帖

[文华源码] 文华财经公式集(源码)开放

[文华源码] 文华财经公式集(源码)开放

判断趋势
  1. MA50:MA(CLOSE,50);
  2. STICKLINE(CLOSE<MA50,OPEN,CLOSE,COLORCYAN,0);
  3. DRAWLINE(CLOSE<MA50,HIGH,CLOSE<MA50,LOW,COLORCYAN);
  4. STICKLINE(CLOSE>MA50,OPEN,CLOSE,COLORRED,0);
  5. DRAWLINE(CLOSE>MA50,HIGH,CLOSE>MA50,LOW,COLORRED);
复制代码

每日均价

  1. A1:=IF(DAY=1,CLOSE,0);
  2. A2:=IF(DAY=2,CLOSE,0);
  3. A3:=IF(DAY=3,CLOSE,0);
  4. A4:=IF(DAY=4,CLOSE,0);
  5. A5:=IF(DAY=5,CLOSE,0);
  6. A6:=IF(DAY=6,CLOSE,0);
  7. A7:=IF(DAY=7,CLOSE,0);
  8. A8:=IF(DAY=8,CLOSE,0);
  9. A9:=IF(DAY=9,CLOSE,0);
  10. A10:=IF(DAY=10,CLOSE,0);
  11. A11:=IF(DAY=11,CLOSE,0);
  12. A12:=IF(DAY=12,CLOSE,0);
  13. A13:=IF(DAY=13,CLOSE,0);
  14. A14:=IF(DAY=14,CLOSE,0);
  15. A15:=IF(DAY=15,CLOSE,0);
  16. A16:=IF(DAY=16,CLOSE,0);
  17. A17:=IF(DAY=17,CLOSE,0);
  18. A18:=IF(DAY=18,CLOSE,0);
  19. A19:=IF(DAY=19,CLOSE,0);
  20. A20:=IF(DAY=20,CLOSE,0);
  21. A21:=IF(DAY=21,CLOSE,0);
  22. A22:=IF(DAY=22,CLOSE,0);
  23. A23:=IF(DAY=23,CLOSE,0);
  24. A24:=IF(DAY=24,CLOSE,0);
  25. A25:=IF(DAY=25,CLOSE,0);
  26. A26:=IF(DAY=26,CLOSE,0);
  27. A27:=IF(DAY=27,CLOSE,0);
  28. A28:=IF(DAY=28,CLOSE,0);
  29. A29:=IF(DAY=29,CLOSE,0);
  30. A30:=IF(DAY=30,CLOSE,0);
  31. A31:=IF(DAY=31,CLOSE,0);
  32. B1:=IF(DAY=1,VOL,0);
  33. B2:=IF(DAY=2,VOL,0);
  34. B3:=IF(DAY=3,VOL,0);
  35. B4:=IF(DAY=4,VOL,0);
  36. B5:=IF(DAY=5,VOL,0);
  37. B6:=IF(DAY=6,VOL,0);
  38. B7:=IF(DAY=7,VOL,0);
  39. B8:=IF(DAY=8,VOL,0);
  40. B9:=IF(DAY=9,VOL,0);
  41. B10:=IF(DAY=10,VOL,0);
  42. B11:=IF(DAY=11,VOL,0);
  43. B12:=IF(DAY=12,VOL,0);
  44. B13:=IF(DAY=13,VOL,0);
  45. B14:=IF(DAY=14,VOL,0);
  46. B15:=IF(DAY=15,VOL,0);
  47. B16:=IF(DAY=16,VOL,0);
  48. B17:=IF(DAY=17,VOL,0);
  49. B18:=IF(DAY=18,VOL,0);
  50. B19:=IF(DAY=19,VOL,0);
  51. B20:=IF(DAY=20,VOL,0);
  52. B21:=IF(DAY=21,VOL,0);
  53. B22:=IF(DAY=22,VOL,0);
  54. B23:=IF(DAY=23,VOL,0);
  55. B24:=IF(DAY=24,VOL,0);
  56. B25:=IF(DAY=25,VOL,0);
  57. B26:=IF(DAY=26,VOL,0);
  58. B27:=IF(DAY=27,VOL,0);
  59. B28:=IF(DAY=28,VOL,0);
  60. B29:=IF(DAY=29,VOL,0);
  61. B30:=IF(DAY=30,VOL,0);
  62. B31:=IF(DAY=31,VOL,0);
  63. AB1:=SUM(A1*B1,N)/SUM(B1,N);
  64. AB2:=SUM(A2*B2,N)/SUM(B2,N);
  65. AB3:=SUM(A3*B3,N)/SUM(B3,N);
  66. AB4:=SUM(A4*B4,N)/SUM(B4,N);
  67. AB5:=SUM(A5*B5,N)/SUM(B5,N);
  68. AB6:=SUM(A6*B6,N)/SUM(B6,N);
  69. AB7:=SUM(A7*B7,N)/SUM(B7,N);
  70. AB8:=SUM(A8*B8,N)/SUM(B8,N);
  71. AB9:=SUM(A9*B9,N)/SUM(B9,N);
  72. AB10:=SUM(A10*B10,N)/SUM(B10,N);
  73. AB11:=SUM(A11*B11,N)/SUM(B11,N);
  74. AB12:=SUM(A12*B12,N)/SUM(B12,N);
  75. AB13:=SUM(A13*B13,N)/SUM(B13,N);
  76. AB14:=SUM(A14*B14,N)/SUM(B14,N);
  77. AB15:=SUM(A15*B15,N)/SUM(B15,N);
  78. AB16:=SUM(A16*B16,N)/SUM(B16,N);
  79. AB17:=SUM(A17*B17,N)/SUM(B17,N);
  80. AB18:=SUM(A18*B18,N)/SUM(B18,N);
  81. AB19:=SUM(A19*B19,N)/SUM(B19,N);
  82. AB20:=SUM(A20*B20,N)/SUM(B20,N);
  83. AB21:=SUM(A21*B21,N)/SUM(B21,N);
  84. AB22:=SUM(A22*B22,N)/SUM(B22,N);
  85. AB23:=SUM(A23*B23,N)/SUM(B23,N);
  86. AB24:=SUM(A24*B24,N)/SUM(B24,N);
  87. AB25:=SUM(A25*B25,N)/SUM(B25,N);
  88. AB26:=SUM(A26*B26,N)/SUM(B26,N);
  89. AB27:=SUM(A27*B27,N)/SUM(B27,N);
  90. AB28:=SUM(A28*B28,N)/SUM(B28,N);
  91. AB29:=SUM(A29*B29,N)/SUM(B29,N);
  92. AB30:=SUM(A30*B30,N)/SUM(B30,N);
  93. AB31:=SUM(A31*B31,N)/SUM(B31,N);
  94. PARTLINE(DAY=1,AB1,COLORYELLOW);
  95. PARTLINE(DAY=2,AB2,COLORYELLOW);
  96. PARTLINE(DAY=3,AB3,COLORYELLOW);
  97. PARTLINE(DAY=4,AB4,COLORYELLOW);
  98. PARTLINE(DAY=5,AB5,COLORYELLOW);
  99. PARTLINE(DAY=6,AB6,COLORYELLOW);
  100. PARTLINE(DAY=7,AB7,COLORYELLOW);
  101. PARTLINE(DAY=8,AB8,COLORYELLOW);
  102. PARTLINE(DAY=9,AB9,COLORYELLOW);
  103. PARTLINE(DAY=10,AB10,COLORYELLOW);
  104. PARTLINE(DAY=11,AB11,COLORYELLOW);
  105. PARTLINE(DAY=12,AB12,COLORYELLOW);
  106. PARTLINE(DAY=13,AB13,COLORYELLOW);
  107. PARTLINE(DAY=14,AB14,COLORYELLOW);
  108. PARTLINE(DAY=15,AB15,COLORYELLOW);
  109. PARTLINE(DAY=16,AB16,COLORYELLOW);
  110. PARTLINE(DAY=17,AB17,COLORYELLOW);
  111. PARTLINE(DAY=18,AB18,COLORYELLOW);
  112. PARTLINE(DAY=19,AB19,COLORYELLOW);
  113. PARTLINE(DAY=20,AB20,COLORYELLOW);
  114. PARTLINE(DAY=21,AB21,COLORYELLOW);
  115. PARTLINE(DAY=22,AB22,COLORYELLOW);
  116. PARTLINE(DAY=23,AB23,COLORYELLOW);
  117. PARTLINE(DAY=24,AB24,COLORYELLOW);
  118. PARTLINE(DAY=25,AB25,COLORYELLOW);
  119. PARTLINE(DAY=26,AB26,COLORYELLOW);
  120. PARTLINE(DAY=27,AB27,COLORYELLOW);
  121. PARTLINE(DAY=28,AB28,COLORYELLOW);
  122. PARTLINE(DAY=29,AB29,COLORYELLOW);
  123. PARTLINE(DAY=30,AB30,COLORYELLOW);
  124. PARTLINE(DAY=31,AB31,COLORYELLOW);
复制代码


N=31
买卖频谱
  1. X:=BARSLAST(HIGH=HHV(HIGH,N));
  2. LL:=MIN(REF(LOW,X+3),MIN(REF(LOW,X+2),MIN(REF(LOW,X),REF(LOW,X+1))));
  3. Y:=BARSLAST(LOW=LLV(LOW,N));
  4. HH:=MAX(REF(HIGH,Y+3),MAX(REF(HIGH,Y+2),MAX(REF(HIGH,Y),REF(HIGH,Y+1))));
  5. A:=BARSLAST(CLOSE>=HH);
  6. B:=BARSLAST(CLOSE<=LL);
  7. AB:IF(A>B,HH,LL);
  8. TM:=CLOSE>=AB;
  9. TP:=CLOSE<AB;
  10. DRAWLINE(TP,HIGH,TP,OPEN,COLORCYAN);
  11. DRAWLINE(TP,LOW,TP,CLOSE,COLORCYAN);
  12. DRAWLINE(TM,HIGH,TM,CLOSE,COLORRED);
  13. DRAWLINE(TM,LOW,TM,OPEN,COLORRED);
  14. STICKLINE(TP,OPEN,CLOSE,COLORCYAN,0);
  15. STICKLINE(TM,OPEN,CLOSE,COLORRED,1);
  16. HH1:=BARSLAST((HH > REF(HH,1)));
  17. LL1:=BARSLAST((LL < REF(LL,1)));
复制代码

N=10
龙出沧海公式!!!

  1. VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;
  2. DTX:(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210,COLORWHITE;
  3. KTX: MA(DTX,10), COLORYELLOW;
  4. STICKLINE(DTX>KTX,DTX,KTX, COLORRED,10);
  5. STICKLINE(DTX<KTX,DTX,KTX, COLORGREEN,10) ;
  6. STICKLINE(CLOSE>=OPEN,OPEN,CLOSE, COLORRED,1);
  7. DRAWLINE(CLOSE>=OPEN,HIGH, CLOSE>=OPEN,CLOSE,  COLORRED);
  8. DRAWLINE(CLOSE>=OPEN,LOW, CLOSE>=OPEN,OPEN,  COLORRED);
  9. STICKLINE(CLOSE<OPEN,OPEN,CLOSE, COLORGREEN,0);
  10. DRAWLINE(CLOSE<OPEN,HIGH, CLOSE<OPEN,LOW, COLORGREEN);
  11. MU:MA(CLOSE,60),COLORBLUE;
  12. MH:MA(CLOSE,360),COLORMAGENTA;
复制代码


龙出沧海

  1. VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;
  2. DTX:(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210,COLORWHITE;
  3. KTX: MA(DTX,10), COLORYELLOW;
  4. STICKLINE(DTX>KTX,DTX,KTX, COLORLIGHTRED,10);
  5. STICKLINE(DTX<KTX,DTX,KTX, COLORBLUE,10) ;
  6. STICKLINE(CLOSE>=OPEN,OPEN,CLOSE, COLORRED,1);
  7. DRAWLINE(CLOSE>=OPEN,HIGH, CLOSE>=OPEN,CLOSE,  COLORRED);
  8. DRAWLINE(CLOSE>=OPEN,LOW, CLOSE>=OPEN,OPEN,  COLORRED);
  9. STICKLINE(CLOSE<OPEN,OPEN,CLOSE, COLORGREEN,0);
  10. DRAWLINE(CLOSE<OPEN,HIGH, CLOSE<OPEN,LOW, COLORGREEN);
复制代码

两个指标

  1. Y:=(HIGH+LOW)/2;
  2. AO:MA(Y ,5 )-MA(Y ,34 ),COLORWHITE;
  3. AO1:=REF(AO,1);
  4. AC:AO-MA( AO,5),COLORYELLOW;
  5. A:0.99*(AO+AC)/2,COLORRED;
  6. AC1:=REF(AC,1);
  7. STICKLINE(AO>0&&AC>0,0,AO+AC,COLORRED,0);
  8. STICKLINE(AO<0&&AC>0,0,AO,COLORWHITE,1);
  9. STICKLINE(AO<0&&AC>0,0,AO+AC,COLORWHITE,0);
  10. STICKLINE(AO>0&&AC<0,0,AO,COLORRED,1);
  11. STICKLINE(AO>0&&AC<0,0,AC+AO,COLORRED,0);
  12. STICKLINE(AO<0&&AC<0,0,AC+AO,COLORWHITE,0);
复制代码


俩条飘带
  1. C:=CLOSE;
  2. HZ:=EMA(CLOSE,13);
  3. DB:EMA(HZ,1),COLORWHITE;
  4. ZB:EMA(HZ,26),COLORMAGENTA;
  5. JX148:=EMA(C,148);
  6. HZ2:EMA(HZ,8),COLORGREEN;
  7. HZ4:EMA(HZ,39),COLORMAGENTA;
  8. FILLRGN(DB>HZ2,DB,HZ2,COLORGREEN);
  9. FILLRGN(DB<HZ2,DB,HZ2,COLORWHITE);
  10. FILLRGN(ZB>HZ4,ZB,HZ4,COLORMAGENTA);
  11. FILLRGN(ZB<HZ4,ZB,HZ4,COLORBLUE);
复制代码


可以变色K线

  1. MID:=MA(CLOSE,20);
  2. UPPER:=MID+2*STD(CLOSE,20);
  3. LOWER:=MID-2*STD(CLOSE,20);
  4. V1:=(CLOSE-LOWER)/(UPPER-LOWER)*100;
  5. V2:=V1-EMA(V1,5);
  6. K1:=SUM(LLV(V2,4),4)/4;
  7. V3:=EMA(V2,64)*10;
  8. V4:=EMA(0.4*V2*(-1),3);
  9. V5:=-1*EMA(V2,39)*10;
  10. A:=V3>10;
  11. B:=V2>V4;
  12. D:=V5>10;
  13. E:=V3<=10||V2<=V4||V5<=10;
  14. KS:=(CLOSE-SMA(CLOSE,13,1))/SMA(CLOSE,13,1)*(-100);
  15. RKS:=REF(KS,1);
  16. MLS:=RKS/KS>1.23 && RKS>13 && CLOSE/REF(CLOSE,1)>1.03;
  17. DRAWLINE(CLOSE>=OPEN && E,HIGH,CLOSE>=OPEN && E,LOW,COLORRED);
  18. STICKLINE(CLOSE>=OPEN && E,CLOSE,OPEN,COLORRED,0);
  19. DRAWLINE(CLOSE< OPEN && E,HIGH,CLOSE< OPEN && E,LOW,COLORGREEN);
  20. STICKLINE(CLOSE< OPEN && E,CLOSE,OPEN,COLORGREEN,0);
  21. DRAWLINE(OPEN> CLOSE && A,LOW,OPEN> CLOSE && A,HIGH,COLORYELLOW);
  22. STICKLINE(OPEN> CLOSE && A,CLOSE,OPEN,COLORYELLOW,0);
  23. DRAWLINE(OPEN<=CLOSE && A,LOW,OPEN<=CLOSE && A,HIGH,COLORYELLOW);
  24. STICKLINE(OPEN<=CLOSE && A,CLOSE,OPEN,COLORYELLOW,1);
  25. DRAWLINE(OPEN> CLOSE && B,LOW,OPEN> CLOSE && B,HIGH,COLORRED);
  26. STICKLINE(OPEN> CLOSE && B,CLOSE,OPEN,COLORRED,0);
  27. DRAWLINE(OPEN<=CLOSE && B,LOW,OPEN<=CLOSE && B,HIGH,COLORRED);
  28. STICKLINE(OPEN<=CLOSE && B,CLOSE,OPEN,COLORRED,1);
  29. DRAWLINE(OPEN> CLOSE && D,LOW,OPEN> CLOSE && D,HIGH,COLORGREEN);
  30. STICKLINE(OPEN> CLOSE && D,CLOSE,OPEN,COLORGREEN,0);
  31. DRAWLINE(OPEN<=CLOSE && D,LOW,OPEN<=CLOSE && D,HIGH,COLORGREEN);
  32. STICKLINE(OPEN<=CLOSE && D,CLOSE,OPEN,COLORGREEN,1);
  33. DRAWLINE(KS>13,HIGH,KS>13,LOW,COLORWHITE);
  34. DRAWLINE(MLS=1,HIGH,MLS=1,LOW,COLORMAGENTA);
  35. STICKLINE(KS>13,OPEN,CLOSE,COLORWHITE,1);
  36. STICKLINE(MLS=1,OPEN,CLOSE,COLORMAGENTA,1);
  37. HH:=HHV(HIGH,N);
  38. LL:=LLV(LOW,N);
  39. HH1:=BARSLAST((HH > REF(HH,1)));
  40. LL1:=BARSLAST((LL < REF(LL,1)));
  41. DRAWTEXT(CROSS(HH1,LL1),HH,'开空');
  42. DRAWTEXT(CROSS(LL1,HH1),LL,'开多');
  43. T:=IF(HH1>LL1,1,-1);
  44. G:=IF(HH1>LL1,HH,LL);
  45. DRAWLINE(T=1&&REF(T,1)=1,G,T=1&&REF(T,1)=1,REF(G,1),COLORCYAN);
  46. DRAWLINE(T=-1&&REF(T,1)=-1,G,T=-1&&REF(T,1)=-1,REF(G,1),COLORRED);
  47. DRAWSL(T=1,G,0,1,0,COLORCYAN);
  48. DRAWSL(T=-1,G,0,1,0,COLORRED);
复制代码


N=10
考夫曼的ama-自适应移动平均线
交易指标:

  1. DIRECTION:=CLOSE-REF(CLOSE,N);
  2. VOLATILITY:=SUM(ABS((CLOSE-REF(CLOSE,1))),N);
  3. ER:=ABS(DIRECTION/VOLATILITY);
  4. FASTSC:=2/(2 + 1);
  5. SLOWSC:=2/(30 + 1);
  6. SSC:=ER*(FASTSC-SLOWSC)+SLOWSC;
  7. CONSTANT:=SSC*SSC;
  8. AMAHIGH:REF(EMA(HIGH,N),1)+CONSTANT*(HIGH- REF(EMA(HIGH,N),1));
  9. AMALOW:REF(EMA(LOW,N),1)+CONSTANT*(LOW- REF(EMA(LOW,N),1));
复制代码


参数N的数值自己定义
考夫曼的ama-自适应移动平均线
交易模型:

  1. DIRECTION:=CLOSE-REF(CLOSE,N);
  2. VOLATILITY:=SUM(ABS((CLOSE-REF(CLOSE,1))),N);
  3. ER:=ABS(DIRECTION/VOLATILITY);
  4. FASTSC:=2/(2 + 1);
  5. SLOWSC:=2/(30 + 1);
  6. SSC:=ER*(FASTSC-SLOWSC)+SLOWSC;
  7. CONSTANT:=SSC*SSC;
  8. AMAHIGH:=REF(EMA(HIGH,N),1)+CONSTANT*(HIGH- REF(EMA(HIGH,N),1));
  9. AMACLOSE:=REF(EMA(CLOSE,N),1)+CONSTANT*(CLOSE- REF(EMA(CLOSE,N),1));
  10. AMALOW:=REF(EMA(LOW,N),1)+CONSTANT*(LOW- REF(EMA(LOW,N),1));
  11. LOW>AMAHIGH,BK;
  12. CLOSE<AMACLOSE,SP;
  13. HIGH<AMALOW,SK;
  14. CLOSE>AMACLOSE,BP;
复制代码


开空开多

  1. HH:=HHV(HIGH,N);
  2. LL:=LLV(LOW,N);
  3. HH1:=BARSLAST((HH>REF(HH,1)));
  4. LL1:=BARSLAST((LL<REF(LL,1)));
  5. A:=IF((HH1 < LL1),1,IF((HH1 > LL1),-1,0));
  6. IF(A>=0,LL,HH),COLORYELLOW;
  7. STICKLINE((HH1 < LL1),CLOSE,OPEN,COLORRED,0);
  8. DRAWLINE((HH1 < LL1),HIGH,(HH1<LL1),LOW,COLORRED);
  9. STICKLINE((HH1 > LL1),CLOSE,OPEN,COLORBLUE,0);
  10. DRAWLINE((HH1 > LL1),HIGH,(HH1 > LL1),LOW,COLORBLUE);
  11. DRAWTEXT(CROSS(HH1,LL1),HH,'开空');
  12. DRAWTEXT(CROSS(LL1,HH1),LL,'开多');
复制代码


N=15,N=10

决战MACD

  1. VAR1:=((EMA(CLOSE,12) - EMA(CLOSE,26)) * 100);
  2. VAR2:=EMA(VAR1,9);
  3. VAR3:=(2 * (VAR1 - VAR2));
  4. FILLRGN((VAR1 >= 0),0,(VAR1 * 0.8),COLORRED);
  5. FILLRGN((VAR1 >= 0),0,(VAR1 * 0.7),COLORMAGENTA);
  6. FILLRGN((VAR1 >= 0),0,(VAR1 * 0.6),COLORYELLOW);
  7. FILLRGN((VAR1 >= 0),0,(VAR1 * 0.5),COLORGREEN);
  8. FILLRGN((VAR1 >= 0),0,(VAR1 * 0.4),COLORBLUE);
  9. FILLRGN((VAR1 >= 0),0,(VAR1 * 0.3),COLORLIGHTGREEN);
  10. FILLRGN((VAR1 >= 0),0,(VAR1 * 0.2),COLORLIGHTBLUE);
  11. FILLRGN((VAR1 >= 0),0,(VAR1 * 0.1),COLORCYAN);
  12. FILLRGN((VAR1 < 0),0,(VAR1 * 0.8),COLORRED);
  13. FILLRGN((VAR1 < 0),0,(VAR1 * 0.7),COLORMAGENTA);
  14. FILLRGN((VAR1 < 0),0,(VAR1 * 0.6),COLORYELLOW);
  15. FILLRGN((VAR1 < 0),0,(VAR1 * 0.5),COLORGREEN);
  16. FILLRGN((VAR1 < 0),0,(VAR1 * 0.4),COLORBLUE);
  17. FILLRGN((VAR1 < 0),0,(VAR1 * 0.3),COLORLIGHTGREEN);
  18. FILLRGN((VAR1 < 0),0,(VAR1 * 0.2),COLORLIGHTBLUE);
  19. FILLRGN((VAR1 < 0),0,(VAR1 * 0.1),COLORCYAN);
  20. FILLRGN((VAR2 >= 0),0,(VAR2 * 0.8),COLORRED);
  21. FILLRGN((VAR2 >= 0),0,(VAR2 * 0.7),COLORMAGENTA);
  22. FILLRGN((VAR2 >= 0),0,(VAR2 * 0.6),COLORYELLOW);
  23. FILLRGN((VAR2 >= 0),0,(VAR2 * 0.5),COLORGREEN);
  24. FILLRGN((VAR2 >= 0),0,(VAR2 * 0.4),COLORBLUE);
  25. FILLRGN((VAR2 >= 0),0,(VAR2 * 0.3),COLORLIGHTGREEN);
  26. FILLRGN((VAR2 >= 0),0,(VAR2 * 0.2),COLORLIGHTBLUE);
  27. FILLRGN((VAR2 >= 0),0,(VAR2 * 0.1),COLORCYAN);
  28. FILLRGN((VAR2 < 0),0,(VAR2 * 0.8),COLORRED);
  29. FILLRGN((VAR2 < 0),0,(VAR2 * 0.7),COLORMAGENTA);
  30. FILLRGN((VAR2 < 0),0,(VAR2 * 0.6),COLORYELLOW);
  31. FILLRGN((VAR2 < 0),0,(VAR2 * 0.5),COLORGREEN);
  32. FILLRGN((VAR2 < 0),0,(VAR2 * 0.4),COLORBLUE);
  33. FILLRGN((VAR2 < 0),0,(VAR2 * 0.3),COLORLIGHTGREEN);
  34. FILLRGN((VAR2 < 0),0,(VAR2 * 0.2),COLORLIGHTBLUE);
  35. FILLRGN((VAR2 < 0),0,(VAR2 * 0.1),COLORCYAN);
复制代码



金融天娇赢利公式
参数:n1  21;n2   7;

  1. X1:=HHV(HIGH,N1);
  2. X2:=LLV(LOW,N2);
  3. D1:(X1+X2*2)/3,COLORGREEN;
  4. TMP:=D1-CLOSE;
  5. DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,COLORCYAN);
  6. DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,COLORCYAN);
  7. DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,COLORRED);
  8. DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,COLORRED);
  9. DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,COLORWHITE);
  10. DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,COLORWHITE);
  11. STICKLINE(TMP>0.00001,OPEN,CLOSE,COLORCYAN,1);
  12. STICKLINE(TMP<-0.00001,OPEN,CLOSE,COLORRED,1);
复制代码



金龙行天下

  1. C:=CLOSE;
  2. L:=LOW;
  3. H:=HIGH;
  4. O:=OPEN;
  5. RSV:=(C-LLV(L,7))/(HHV(H,7)-LLV(L,7))*100;
  6. RSV1:=(C-LLV(L,38))/(HHV(H,38)-LLV(L,38))*100;
  7. LJ:SMA(RSV1,5,1),COLORWHITE;
  8. SY:SMA(LJ,10,1),COLORYELLOW;
  9. FILLRGN(LJ<=SY,LJ,SY,COLORGREEN);
  10. FILLRGN(LJ>=SY,SY,LJ,COLORRED);
  11. A:=(3*C+L+O+H)/6;
  12. VAR2Q:=MA(C,80)-MA(C,13)/3;
  13. SQX:=MA((C-VAR2Q)/VAR2Q,1);
  14. XA:=EMA(SQX,12)*0.7;
  15. XB:=EMA(SQX,3);
  16. DBQY:IF(LLV(XB-XA,12)>0,0,-15),COLORBLUE;
  17. DIFF:=(EMA(C,17)-EMA(C,73))*100;
  18. DEA:=EMA(DIFF,73);
  19. MACD:=2*(DIFF-DEA);
  20. STICKLINE(DIFF<=0 && DEA<=DIFF && REF(DIFF,1)<REF(DEA,1),3,26,COLORCYAN,0);
  21. IF(DIFF<=0 && DEA<=DIFF && REF(DIFF,1)<REF(DEA,1),10,0),COLORMAGENTA;
复制代码


胶实测年收益达176%的模型(胶30分线)

  1. MA5:=MA(CLOSE,5);
  2. MA10:=MA(CLOSE,10);
  3. MA40:=MA(CLOSE,40);
  4. MA80:=MA(CLOSE,80);
  5. CROSS(MA5,MA10) {5均线上穿10均线且均线成多头排列,买平买开}
  6. &&MA10>REF(MA10,1)
  7. &&REF(MA10,1)>REF(MA10,2)
  8. &&MA5>REF(MA5,1)
  9. &&REF(MA5,1)>REF(MA5,2),BPK;
  10. CROSS(MA10,MA5) {5均线下穿10均线且均线成空头排列,卖平卖开}
  11. &&MA10<REF(MA10,1)
  12. &&REF(MA10,1)<REF(MA10,2)
  13. &&MA5<REF(MA5,1)
  14. &&REF(MA5,1)<REF(MA5,2),SPK;
复制代码


自已做的模型,目的在于和大家交流,希望志同道合者回贴。发表自已的观点和看法。
江太短线升级系

  1. M1:=MA(CLOSE,5);
  2. M2:MA(CLOSE,20),COLORYELLOW;
  3. ZYZS:IF((M1 > M2),M2,M1),COLORGREEN;
  4. PARTLINE(ZYZS > REF(ZYZS,1) && ZYZS = M2,ZYZS,COLORGREEN);
  5. D:=(SMA(CLOSE,SHORT,X) > SMA(CLOSE,LONG,X));
  6. K:=(SMA(CLOSE,SHORT,X) < SMA(CLOSE,LONG,X));
  7. Z:=CLOSE >=OPEN;
  8. Y:=CLOSE < OPEN;
  9. STICKLINE(K && Z,OPEN,CLOSE,COLORGREEN,1);
  10. DRAWLINE(K && Z,HIGH, K && Z,CLOSE,COLORGREEN);
  11. DRAWLINE(K && Z,LOW, K && Z,OPEN,COLORGREEN);
  12. STICKLINE(K && Y,OPEN,CLOSE,COLORGREEN,0);
  13. DRAWLINE(K && Y,HIGH, K && Y,LOW,COLORGREEN);
  14. STICKLINE(D && Z,OPEN,CLOSE,COLORRED,1);
  15. DRAWLINE(D && Z,HIGH, D && Z,CLOSE,COLORRED);
  16. DRAWLINE(D && Z,LOW, D && Z,OPEN,COLORRED);
  17. STICKLINE(D && Y,OPEN,CLOSE,COLORRED,0);
  18. DRAWLINE(D && Y,HIGH, D && Y,LOW,COLORRED);
复制代码


见好跑

  1. VAR3:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100;
  2. VAR4:=SMA(SMA(VAR3,3,1),3,1);
  3. VAR5:=EMA(VAR4,5);
  4. VAR6:=VAR5;
  5. VAR7:=3*VAR4-2*VAR5;
  6. VAR8:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
  7. K: SMA(VAR8,3,1);
  8. D: SMA(K,3,1);
  9. VAR9:=3*K-2*D;
  10. VARA:=LLV(LOW,36);
  11. VARB:=HHV(HIGH,30);
  12. VARC:=EMA((CLOSE-VARA)/(VARB-VARA)*4,4)*25;
  13. QUSHI: VARC, COLORGREEN;
  14. STICKLINE(VARC<10,0,8,COLORYELLOW,0);
  15. STICKLINE(VARC>90,100,92,COLORBLUE,0);
  16. VARD:=87.5;
  17. VARE:=(VARC-LLV(VARC,4))/(HHV(VARC,4)-LLV(VARC,4))*4*25;
  18. DRAWTEXT(IF(CROSS(VAR9,8),87,0),48,'反弹');
  19. DRAWTEXT(IF(CROSS(VARE,87.5) && QUSHI<40,87,0),10,'买');
  20. DRAWTEXT(IF(CROSS(QUSHI,VARD) && VARE=100,50,0),56,'目标位');
  21. DRAWTEXT(IF(CROSS(VARD,QUSHI),87,0),85,'见好跑');
  22. DRAWTEXT(IF(CROSS(QUSHI,VARE) && QUSHI>87,87,0),70,'卖');
  23. VARF:=SMA(VAR3,20,1);
  24. VAR10:=SMA(VARF,15,1);
  25. VAR11:=(3*VARF+2*VAR10)/4;
  26. VAR12:=REF(VAR11,1);
  27. VAR13:=SMA(MAX(VAR11-VAR12,0),2,1)/SMA(ABS(VAR11-VAR12),2,1)*100;
  28. VAR14:=MA(VAR13,10);
  29. VAR15:=IF(CROSS(VAR14,90),25,0);
  30. DRAWTEXT(CROSS(VAR14,90),27,'强势整理');
  31. STICKLINE((CROSS(QUSHI,10) && QUSHI>10),0,30, COLORRED,0);
  32. VAR16:=(CLOSE+LOW+HIGH)/3;
  33. VAR17:=SUM((VAR16-REF(LOW,1)-(HIGH-VAR16))*VOL/100000/(HIGH-LOW),0);
  34. VAR18:=EMA(VAR17,1);
  35. VAR19:=MA(VAR18,12);
  36. VAR1A:=MA(VAR18,26);
  37. VAR1B:=(VAR18-VAR19)*10;
  38. VAR1C:=OPI/EMA(VOL,5)/30*1.1;
  39. VAR1D:=IF(CROSS(VAR1B,VAR1C),1,0);
复制代码


极品均线

  1. VAR1:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;
  2. VAR2:=EMA(VAR1,13);
  3. VAR3:=REF(VAR2,1);
  4. STICKLINE(VAR2>=VAR3,VAR3,VAR2,COLORRED,1);
  5. STICKLINE(VAR3>VAR2,VAR2,VAR3,COLORCYAN,0);
  6. MA1:MA(VAR2,3),COLORWHITE;
  7. MA2:MA(VAR2,7),COLORYELLOW;
  8. MA3:MA(VAR2,9),COLORGREEN;
  9. MA4:MA(VAR2,18),COLORRED;
复制代码


火焰之王-空


  1. VAR1:=EMA(HHV(HIGH,500),21);
  2. VAR2:=EMA(HHV(HIGH,250),21);
  3. VAR3:=EMA(HHV(HIGH,90),21);
  4. VAR4:=EMA(LLV(LOW,500),21);
  5. VAR5:=EMA(LLV(LOW,250),21);
  6. VAR6:=EMA(LLV(LOW,90),21);
  7. VAR7:=EMA((((((((VAR4 * 0.96) + (VAR5 * 0.96)) + (VAR6 * 0.96)) + (VAR1 * 0.558)) + (VAR2 * 0.558)) + (VAR3 * 0.558)) / 6),21);
  8. VAR8:=EMA((((((((VAR4 * 1.25) + (VAR5 * 1.23)) + (VAR6 * 1.2)) + (VAR1 * 0.55)) + (VAR2 * 0.55)) + (VAR3 * 0.65)) / 6),21);
  9. VAR9:=EMA((((((((VAR4 * 1.3) + (VAR5 * 1.3)) + (VAR6 * 1.3)) + (VAR1 * 0.68)) + (VAR2 * 0.68)) + (VAR3 * 0.68)) / 6),21);
  10. VARA:=EMA((((((VAR7 * 3) + (VAR8 * 2)) + VAR9) / 6) * 1.738),21);
  11. VARB1:=REF(HIGH,1);
  12. VARC1:=((SMA(ABS((HIGH - VARB1)),3,1) / SMA(MIN((HIGH - VARB1),0),3,1)) * 100);
  13. VARD1:=EMA(IF(((CLOSE * 1.35) > VARA),(VARC1 * 10),(VARC1 / 10)),3);
  14. VARE1:=LLV(LOW,30);
  15. VARF1:=HHV(VARD1,30);
  16. VAR10:=IF(MA(CLOSE,58),1,0);
  17. HILL:((EMA(IF((LOW >= VARE1),((VARD1 + (VARF1 * 2)) / 2),0),3) / 618) * VAR10);
  18. STICKLINE((HILL < 0),0,HILL,COLORRED,1);
  19. JL:HILL;
  20. STICKLINE((HILL < 0),0,(JL * 1.2),COLORRED,0);
  21. STICKLINE((HILL < 0),0,(JL * 0.8),COLORMAGENTA,0);
  22. STICKLINE((HILL < 0),0,(JL * 0.6),COLORYELLOW,0);
  23. STICKLINE((HILL < 0),0,(JL * 0.4),COLORGREEN,0);
  24. STICKLINE((HILL < 0),0,(JL * 0.2),COLORBLUE,0);
  25. DRAWTEXT(HILL<= -45,(JL * 1.2),'机会来了!上吧,好好把握这一切');
复制代码

论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
 
期货论坛 - 版权/免责声明   1.本站发布源码(包括函数、指标、策略等)均属开放源码,用意在于让使用者学习程序化语法撰写,使用者可以任意修改语法內容并调整参数。仅限用于个人学习使用,请勿转载、滥用,严禁私自连接实盘账户交易
  2.本站发布资讯(包括文章、视频、历史记录、教材、评论、资讯、交易方案等)均系转载自网络主流媒体,内容仅为作者当日个人观点,本网转载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。本网不对该类信息或数据做任何保证。不对您构成任何投资建议,不能依靠信息而取代自身独立判断,不对因使用本篇文章所诉信息或观点等导致的损失承担任何责任。
  3.本站发布资源(包括书籍、杂志、文档、软件等)均从互联网搜索而来,仅供个人免费交流学习,不可用作商业用途,本站不对显示的内容承担任何责任。请在下载后24小时内删除。如果喜欢,请购买正版,谢谢合作!
  4.龙听期货论坛原创文章属本网版权作品,转载须注明来源“龙听期货论坛”,违者本网将保留追究其相关法律责任的权力。本论坛除发布原创文章外,亦致力于优秀财经文章的交流分享,部分文章推送时若未能及时与原作者取得联系并涉及版权问题时,请及时联系删除。联系方式:http://www.qhlt.cn/thread-262-1-1.html
如何访问权限为100/255贴子:/thread-37840-1-1.html;注册后仍无法回复:/thread-23-1-1.html;微信/QQ群:/thread-262-1-1.html;网盘链接失效解决办法:/thread-93307-1-1.html

返回列表