Larry William's Volatility Channels.afl
上传用户:shiqiang
上传日期:2009-06-12
资源大小:1289k
文件大小:2k
源码类别:

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    Larry William's Volatility Channels
  4. //  Author/Uploader: Prakash Shenoi 
  5. //  E-mail:          pkashnoi@yahoo.com
  6. //  Date/Time Added: 2006-08-08 09:47:28
  7. //  Origin:          
  8. //  Keywords:        
  9. //  Level:           basic
  10. //  Flags:           indicator
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=670
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=670
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  Volatility channels (or bands) move with the stock, quickly adjusting to
  17. //  price movements. When a security trends outside the volatility channel, it
  18. //  adds strength to a high probability long trade . Look out for a stock to
  19. //  "trend" outside these bands to catch the momentum. When the swing
  20. //  increases, the bands respond by opening up. The Lower channel normally
  21. //  points to a key fibonacci support zone.
  22. //
  23. //------------------------------------------------------------------------------
  24. /* Larry William's Volatility Channels 
  25. Right Click select Param "parameters" and select variable you need..*/
  26. /* AFL code by Prakash Shenoi*/
  27. // Enable radio button "middle" for grid lines.
  28. MaxGraph = 4;
  29. Vc= Param("Volatility channel -",10,2,14);
  30. Up=HHV(((((H+L+C)/3)*2)- H),Vc);
  31. Lo=LLV(((((H+L+C)/3)*2)- L),Vc);
  32. Graph0=C;
  33. Graph0Style=128+4;
  34. Graph0BarColor = IIf( Close > Ref( Close, -1 ), colorDarkGreen, colorDarkRed );
  35. Graph0Style = styleBar;
  36. Graph0 = Close;
  37. Graph1=Up;
  38. Graph1Style=styleLine;
  39. Graph1Color=colorBlue;
  40. Graph2=Lo;
  41. Graph2Style=styleLine;
  42. Graph2Color=colorBlue;
  43. Title=Name() + "  Volatiltiy Channels - LC" + WriteVal( Graph2 )+ ", UC" + WriteVal( Graph1 )+
  44. ", Close" + WriteVal( Graph0 );