Board logo

标题: 【Stochastic Fast】 [打印本页]

作者: 龙听    时间: 2022-11-3 13:14     标题: 【Stochastic Fast】

  1. inputs:
  2.         PriceH( High ),  
  3.         PriceL( Low ),
  4.         PriceC( Close ),
  5.         StochLength( 14 ),
  6.         SmoothingLength1( 3 ),                                       
  7.         SmoothingLength2( 3 ),                                
  8.         SmoothingType( 1 ),                                         
  9.         OverSold( 20 ),
  10.         OverBought( 80 ) ;

  11. variables:
  12.         var0( 0 ),
  13.         var1( 0 ),
  14.         var2( 0 ),
  15.         var3( 0 ) ;

  16. Value1 = Stochastic( PriceH, PriceL, PriceC, StochLength, SmoothingLength1,
  17. SmoothingLength2, SmoothingType, var0, var1, var2, var3 ) ;

  18. Plot1( var0, "FastK" ) ;
  19. Plot2( var1, "FastD") ;
  20. Plot3( OverBought, "OverBot" ) ;
  21. Plot4( OverSold, "OverSld" ) ;

  22. condition1 = var1 crosses over OverSold ;     
  23. if condition1 then
  24.         Alert( "FastD exiting oversold zone" )
  25. else
  26. begin
  27. condition1 = var1 crosses under OverBought ;
  28. if condition1 then
  29.         Alert( "FastD exiting overbought zone" ) ;
  30. end;
复制代码





欢迎光临 龙听期货论坛 (http://www.qhlt.cn/) Powered by Discuz! 7.2