Board logo

标题: 【平均真实波幅(Average True Range)】 [打印本页]

作者: 龙听    时间: 2022-11-3 13:46     标题: 【平均真实波幅(Average True Range)】

  1. inputs:
  2.         ATRLength( 14 ),
  3.         AlertLength( 14 ) ;

  4. variables:
  5.         var0( 0 ) ;

  6. var0 = AvgTrueRange( ATRLength ) ;

  7. Plot1( var0, "ATR" ) ;

  8.                   
  9. condition1 = HighestBar( var0, AlertLength ) = 0 ;
  10. if condition1 then
  11.         Alert( "Indicator at high" )
  12. else
  13. begin
  14. condition1 = LowestBar( var0, AlertLength ) = 0 ;
  15. if condition1 then
  16.         Alert( "Indicator at low" ) ;
  17. end;
复制代码





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