De Mark's Range Projection.afl
上传用户:shiqiang
上传日期:2009-06-12
资源大小:1289k
文件大小:1k
源码类别:

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    De Mark's Range Projection
  4. //  Author/Uploader: Prakash Shenoi 
  5. //  E-mail:          
  6. //  Date/Time Added: 2006-08-09 06:59:19
  7. //  Origin:          Based on De Mark's formula
  8. //  Keywords:        
  9. //  Level:           basic
  10. //  Flags:           indicator,commentary
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=671
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=671
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  De Mark's Range Projection based on market structure High, Low and close,
  17. //  takes into calculation the position of close in relation to Open and
  18. //  projects likely range of the High and Low for the next session.
  19. //
  20. //------------------------------------------------------------------------------
  21. /*De Mark's Range Projection */
  22. /* AFL code by Prakash Shenoi */
  23. MaxGraph=3;
  24. rph1=(H+C+2*L)/2-L;
  25. rph2=(2*H+L+C)/2-L;
  26. rph3=(H+L+2*C)/2-L;
  27. rpl1=(H+C+2*L)/2-H;
  28. rpl2=(2*H+L+C)/2-H;
  29. rpl3=(H+L+2*C)/2-H;
  30. rph=IIf((C<O),rph1,IIf((C>O),rph2,IIf((C=O),rph3,0)));
  31. rpl=IIf((C<O),rpl1,IIf((C>O),rpl2,IIf((C=O),rpl3,0)));
  32. Graph0=rph;
  33. Graph1=rpl;
  34. Graph2=C;
  35. Graph0Style=Graph1Style=16+8;
  36. Graph2Style=128;
  37. Graph2Color=3;
  38. Title=Name() + ", Close " + WriteVal(( Graph2 ),1.2)+ "  DeMark's Range Projection - Proj-H " + WriteVal(( Graph0),1.2) + ", Proj-L " + WriteVal(( Graph1 ),1.2);