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

[文华源码] 文华财经各种顶底背离主图源码

[文华源码] 文华财经各种顶底背离主图源码

  1. DIFELSEF := EMA(CLOSE,12) - EMA(CLOSE,26);
  2. DEA:= EMA(DIFELSEF,9);
  3. LC := REF(CLOSE,1);
  4. RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
  5. RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
  6. RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
  7. K:=SMA(RSV,3,1);
  8. D:=SMA(K,3,1);
  9. J:=3*K-2*D;
  10. TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
  11. HD := HIGH-REF(HIGH,1);
  12. LD := REF(LOW,1)-LOW;
  13. PDM:= SUM(IFELSE(HD>0 && HD>LD,HD,0),14);
  14. MDM:= SUM(IFELSE(LD>0 && LD>HD,LD,0),14);
  15. PDI:= PDM*100/TR;
  16. MDI:= MDM*100/TR;
  17. A1:=BARSLAST(REF(CROSS(DIFELSEF,DEA),1));
  18. B1:=REF(CLOSE,A1+1)>CLOSE && REF(DIFELSEF,A1+1)
  19. <DIFELSEF && CROSS(DIFELSEF,DEA);
  20. A2:=BARSLAST(REF(CROSS(K,D),1));
  21. B2:=REF(CLOSE,A2+1)>CLOSE && REF(K,A2+1)<K && CROSS(K,D);
  22. A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
  23. B3:=REF(CLOSE,A3+1)>CLOSE && REF(RSI1,A3+1)
  24. <RSI1 && CROSS(RSI1,RSI2);
  25. C1:=BARSLAST(REF(CROSS(DEA,DIFELSEF),1));
  26. D1:=REF(CLOSE,C1+1)<CLOSE && REF(DIFELSEF,C1+1)
  27. >DIFELSEF && CROSS(DEA,DIFELSEF);
  28. C2:=BARSLAST(REF(CROSS(D,K),1));
  29. D2:=REF(CLOSE,C2+1)<CLOSE && REF(K,C2+1)>K && CROSS(D,K);
  30. C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
  31. D3:=REF(CLOSE,C3+1)<CLOSE && REF(RSI1,C3+1)
  32. >RSI1 && CROSS(RSI2,RSI1);
  33. C4:=BARSLAST(REF(CROSS(MDI,PDI),1));
  34. D4:=REF(CLOSE,C4+1)<CLOSE && REF(MDI,C4+1)>MDI && CROSS(MDI,PDI);
  35. A4:=BARSLAST(REF(CROSS(PDI,MDI),1));
  36. B4:=REF(CLOSE,A4+1)>CLOSE && REF(PDI,A4+1)<PDI && CROSS(PDI,MDI);
  37. STICKLINE(B4,LOW,LOW-0.06,COLORBLUE,0);
  38. DRAWTEXT(B4,LOW-20,'D底');
  39. PLAYSOUND(CROSSUP(B4,LOW),'F');
  40. STICKLINE(D4,HIGH,HIGH+0.06,COLORWHITE,0);
  41. DRAWTEXT(D4,HIGH+20,'D顶');
  42. PLAYSOUND(CROSSDOWN(D4,HIGH),'E');
  43. STICKLINE(B1,LOW,LOW-0.06,COLORGREEN,0);
  44. DRAWTEXT(B1,LOW-10,'M底');
  45. PLAYSOUND(CROSSUP(B1,LOW),'F');
  46. STICKLINE(B2,LOW,LOW-0.06,COLORYELLOW,0);
  47. DRAWTEXT(B2,LOW-6,'K底');
  48. PLAYSOUND(CROSSUP(B2,LOW),'F');
  49. STICKLINE(B3,LOW,LOW-0.04,COLORRED,0);
  50. DRAWTEXT(B3,LOW-16,'R底');
  51. PLAYSOUND(CROSSUP(B3,LOW),'F');
  52. STICKLINE(D1,HIGH,HIGH+0.06,COLORMAGENTA,0);
  53. DRAWTEXT(D1,HIGH+10,'M顶');
  54. PLAYSOUND(CROSSDOWN(D1,HIGH),'E');
  55. STICKLINE(D2,HIGH,HIGH+0.06,COLORLIGHTRED,0);
  56. DRAWTEXT(D2,HIGH+6,'K顶');
  57. PLAYSOUND(CROSSDOWN(D2,HIGH),'E');
  58. STICKLINE(D3,HIGH,HIGH+0.06,COLORLIGHTGREEN,0);
  59. DRAWTEXT(D3,HIGH+16,'R顶');
  60. PLAYSOUND(CROSSDOWN(D3,HIGH),'E');
  61. MA13:=MA(CLOSE,13),COLORWHITE;
  62. VLL:=CROSS(MA(CLOSE,13),MA(CLOSE,21));
  63. DRAWTEXT(VLL,MA13-10,'圆底');
  64. PLAYSOUND(CROSSUP(VLL,MA13),'F');
复制代码

论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
 
期货论坛 - 版权/免责声明   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

返回列表