Price-Volume Rank.afl
上传用户:shiqiang
上传日期:2009-06-12
资源大小:1289k
文件大小:2k
源码类别:

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    Price-Volume Rank
  4. //  Author/Uploader: Tomasz Janeczko 
  5. //  E-mail:          tj@amibroker.com
  6. //  Date/Time Added: 2001-06-16 08:29:55
  7. //  Origin:          Presented in TASC magazine
  8. //  Keywords:        oscillator
  9. //  Level:           basic
  10. //  Flags:           indicator
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=14
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=14
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  A Price Volume Rank. Buy/Sell at 5/10-day crossovers. Buy when fast line
  17. //  crosses below 2.5. Sell when fast line crosses above 2.5. Use turn-around
  18. //  points cautiously. Remember that a climbing PVR line indicates a weakening
  19. //  market. Make another indicator using a double-smoothing to use a less
  20. //  volatile graph. Thanks to Donald Dalley for the description
  21. //
  22. //------------------------------------------------------------------------------
  23. /* Price-Volume Rank Indicator
  24.    Use a 1 if price and volume are up
  25.    Use a 2 if price is up and volume is down
  26.    Use a 3 if price and volume are down
  27.    Use a 4 if price is down and volume is up
  28.   Plot a 5-day and a 10-day MA of these values.
  29.   Buy/Sell at 5/10-day crossovers.
  30.   Buy when fast line crosses below 2.5.
  31.   Sell when fast line crosses above 2.5.
  32.   Use turn-around points cautiously.
  33.   Remember that a climbing PVR line indicates a
  34.   weakening market.
  35.   Make another indicator using a double-smoothing
  36.   to use a less volatile graph.
  37. */
  38. P1 = REF( CLOSE, -1 );
  39. V1 = REF( VOLUME, -1);
  40. PVR = IIF( CLOSE >  P1 AND VOLUME >  V1, 1,
  41.       IIF( CLOSE >  P1 AND VOLUME <= V1, 2,
  42.       IIF( CLOSE <= P1 AND VOLUME <= V1, 3, 4 )));
  43. GRAPH0 = MA( PVR, 5 );
  44. GRAPH1 = MA( PVR, 10 ) ;