龙听期货论坛's Archiver

龙听 发表于 2022-11-3 11:42

【Mov Avg Adaptive】

[code]
inputs:
        Price( Close ),
        EffRatioLength( 10 ),
        FastAvgLength( 2 ),
        SlowAvgLength( 30 ) ;

variables:
        var0( 0 ) ;

var0 = AdaptiveMovAvg( Price, EffRatioLength, FastAvgLength, SlowAvgLength ) ;

Plot1( var0, "MAA" ) ;

condition1 = Price crosses over var0 ;
if condition1 then
        Alert( "Bullish alert" )
else
begin
condition1 = Price crosses under var0 ;
if condition1 then
        Alert( "Bearish alert" ) ;
end;
[/code]

页: [1]