Kaufman Adaptive Least Squares Moving Average


It is possible to use a wide variety of filters for the estimation of a least squares moving average , one of the them being the Kaufman adaptive moving average ( KAMA ) which adapt to the market trend strength, by using KAMA in an lsma we therefore allow for an adaptive low lag filter which might provide a smarter way to remove noise while preserving reactivity.

The Indicator

The lsma aim to minimize the sum of the squared residuals, paired with KAMA we obtain a great adaptive solution for smoothing while conserving reactivity. Length control the period of the efficiency ratio used in KAMA , higher values of length allow for overall smoother results. The pre-filtering option allow for even smoother results by using KAMA as input instead of the raw price.

The proposed indicator without pre-filtering in green, a simple moving average in orange, and a lsma with all of them length = 200. The proposed filter allow for fast and precise crosses with the moving average while eliminating major whipsaws.

Same setup with the pre-filtering option, the result are overall smoother.


The provided code allow for the implementation of any filter instead of KAMA , try using your own filters. Thanks for reading :)
즐겨찾기 스크립트에서 빼기 즐겨찾기 스크립트에 넣기
« Je suis las des cruautés de mes semblables, qui ne sont pas mes pareils.

« Je prendrai l’essor et je m’envolerai vers la mer.

« Je connaîtrai le goût des brises du large. J’entendrai les grands cris de la tempête.


This is great! Thanks.
+1 응답
@stluvin, Thanks you a lot for the support, send me a pm if you have suggestions :)
stluvin alexgrover
@alexgrover, It is perfect. Unfiltered/ filtered crossover is very good!
@alexgrover sir superb.
+1 응답
alexgrover BavarianMan
@BavarianMan, Thx for your comment :)
@alexgrover , Impressive script !! Thanks for sharing.
+1 응답
@jsmehra, You are welcome :)
Hi Alex,

Thanks for sharing!!!! It is Great!!!!
+1 응답
alexgrover sudhir.mehta
@sudhir.mehta, Thank you :)
Great Indicator!!
+1 응답
홈으로 스탁 스크리너 포렉스 스크리너 크립토 스크리너 이코노믹 캘린더 사용안내 차트 특징 프라이싱 프렌드 리퍼하기 하우스룰(내부규정) 헬프 센터 웹사이트 & 브로커 솔루션 위젯 차팅 솔루션 라이트웨이트 차팅 라이브러리 블로그 & 뉴스 트위터
프로화일 프로화일설정 계정 및 빌링 프렌드 리퍼하기 나의 서포트 티켓 헬프 센터 공개아이디어 팔로어 팔로잉 비밀메시지 채팅 로그아웃