• Produkty
  • Społeczność
  • Rynki
  • Brokerzy
  • Więcej
Rozpocznij
  • Społeczność
  • /Wskaźniki i strategie
  • /Smafix

Smafix

Awesome Oscillator with AntiStep CorrectionHere is the well-known Awesome Oscillator (AO), which I use to present the real purpose of this post: a function that provides step correction for simple moving averages (SMAs). We all know that any indicator based on moving averages lags real-time movement. Normally this is fine, but just after large ("step") changes in level, the pre-step values that are still within the SMA window cause the result to falsely reflect continued movement, even when real-time values remain flat. To counter this, when a step change of a configurable size is detected, I temporarily shrink the SMA window size to include only those values occurring since the step change, and then allow the size to increase to normal length as we move away from the step change. This is accomplished within the antistep_sma() function. Note that this will cause SMAs of different lengths (e.g. those used in the AO) to be temporarily equal, until the shorter of the two reaches its normal size and begins to leave the longer one behind again. You can see this above, where the AO, which is the difference of two SMAs, goes to 0 immediately after a sufficiently large step change--configured to 0.5% in this case.
Wskaźnik Pine Script®
od Lemrin
Zaktualizowano
11

Wybierz dane rynkowe dostarczone przez ICE Data Services. Wybierz dane referencyjne dostarczone przez FactSet. Copyright © 2025 FactSet Research Systems Inc.© 2025 TradingView, Inc.

Więcej niż tylko produkt
  • Superwykresy
Skanery
  • Akcje
  • ETFy
  • Obligacje
  • Monety kryptowalutowe
  • Pary CEX
  • Pary DEX
  • Pine
Mapy cieplne
  • Akcje
  • ETFy
  • Krypto
Kalendarze
  • Gospodarczy
  • Dochody
  • Dywidendy
Więcej produktów
  • Krzywe Dochodowości
  • Opcje
  • Przepływ Wiadomości
  • Pine Script®
Aplikacje
  • Aplikacja mobilna
  • Desktop
Społeczność
  • Sieć społecznościowa
  • Ściana Miłości
  • Poleć przyjaciela
  • Regulamin
  • Moderatorzy
Pomysły
  • Trading
  • Edukacja
  • Wybór Redakcji
Pine Script
  • Wskaźniki i strategie
  • Eksperci
  • Freelancerzy
Narzędzia i subskrypcje
  • Funkcje
  • Cennik
  • Dane rynkowe
Trading
  • Przegląd
  • Brokerzy
Oferty specjalne
  • Kontrakty terminowe CME Group
  • Kontrakty terminowe Eurex
  • Pakiet akcji amerykańskich
O firmie
  • Kim jesteśmy
  • Misja kosmiczna
  • Blog
  • Kariera
  • Zestaw multimedialny
Merch
  • Sklep TradingView
  • Karty tarota dla traderów
  • C63 TradeTime
Zasady i bezpieczeństwo
  • Warunki Użytkowania
  • Wyłączenie odpowiedzialności
  • Polityka Prywatności
  • Polityka Plików Cookie
  • Oświadczenie o Dstępności
  • Wskazówki bezpieczeństwa
  • Program nagród za wykrycie błędów
  • Strona Status
Rozwiązania biznesowe
  • Widżety
  • Biblioteki wykresów
  • Lightweight Charts™
  • Zaawansowane Wykresy
  • Platforma Handlowa
Możliwości rozwoju
  • Reklama
  • Integracja usług brokerskich
  • Program Partnerski
  • Program edukacyjny
Społeczność
  • Sieć społecznościowa
  • Ściana Miłości
  • Poleć przyjaciela
  • Regulamin
  • Moderatorzy
Pomysły
  • Trading
  • Edukacja
  • Wybór Redakcji
Pine Script
  • Wskaźniki i strategie
  • Eksperci
  • Freelancerzy
Rozwiązania biznesowe
  • Widżety
  • Biblioteki wykresów
  • Lightweight Charts™
  • Zaawansowane Wykresy
  • Platforma Handlowa
Możliwości rozwoju
  • Reklama
  • Integracja usług brokerskich
  • Program Partnerski
  • Program edukacyjny
Look FirstLook First