龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2018-5-11 15:46

ATR波动率指标公式[MC码]

源码:
[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]

徐永礼 发表于 2020-10-27 12:37

感谢版主分享

页: [1]