龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2022-11-3 13:46

【平均真实波幅(Average True Range)】

[code]
inputs:
        ATRLength( 14 ),
        AlertLength( 14 ) ;

variables:
        var0( 0 ) ;

var0 = AvgTrueRange( ATRLength ) ;

Plot1( var0, "ATR" ) ;

                  
condition1 = HighestBar( var0, AlertLength ) = 0 ;
if condition1 then
        Alert( "Indicator at high" )
else
begin
condition1 = LowestBar( var0, AlertLength ) = 0 ;
if condition1 then
        Alert( "Indicator at low" ) ;
end;
[/code]

页: [1]