alexgrover

Supertrend Filter

A derivation of the famous SuperTrend indicator.

My motivation for such indicator was to use more recursion in the original SuperTrend code, this work was made quite fast but feel free to modify it, as always my work is more for inspirational use than anything else so i hope it will inspire you to get more involved with the SuperTrend code or to start coding with Pine.

The indicator no longer act as a trailing-stop but more like a filter, this is due to the fact that the indicator conditions are swapped and that the output is reused many times in the calculation.

Parameters change as well and involve particular gestion. The Factor Parameter is no longer an integer but decimals such that 0 < Factor < 1.

When the Period is high the indicator tend to become less linear/static and look more like a classic moving average.So it is important to have higher Factor values when the Period is high and reciprocally.Here a table to help you with parameters settings :

for Period = 1 to 50 Factor = 0.5
for Period = 50 to 100 Factor = 0.6
for Period = 100 to 150 Factor = 0.7
for Period = 150 to 200 Factor = 0.8
for Period = 200 to 300 Factor = 0.9

There could be a formula to scale the Factor depending on the Period but there would be no proof that the scaling method used is optimal.

Hope you enjoy

For any questions/demands feel free to pm me, i would be happy to help you









Check out the indicators we are making at luxalgo: www.tradingview.com/u/LuxAlgo/
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?