Board logo

标题: 【Mov Avg Adaptive】 [打印本页]

作者: 龙听    时间: 2022-11-3 11:42     标题: 【Mov Avg Adaptive】

  1. inputs:
  2.         Price( Close ),
  3.         EffRatioLength( 10 ),
  4.         FastAvgLength( 2 ),
  5.         SlowAvgLength( 30 ) ;

  6. variables:
  7.         var0( 0 ) ;

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

  9. Plot1( var0, "MAA" ) ;

  10. condition1 = Price crosses over var0 ;
  11. if condition1 then
  12.         Alert( "Bullish alert" )
  13. else
  14. begin
  15. condition1 = Price crosses under var0 ;
  16. if condition1 then
  17.         Alert( "Bearish alert" ) ;
  18. end;
复制代码





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