• Productos
  • Comunidad
  • Mercados
  • Brokers
  • Más
Empiece
  • Comunidad
  • /Indicadores y estrategias
  • /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.
Indicador Pine Script®
por Lemrin
Actualizado
11

Seleccione los datos de mercado proporcionados por ICE Data services. Seleccione los datos de referencia proporcionados por FactSet. Derechos de autor © 2025 FactSet Research Systems Inc.© 2025 TradingView, Inc.

Más que un producto
  • Supergráficos
Analizadores
  • Acciones
  • ETF
  • Bonos
  • Criptomonedas
  • Pares CEX
  • Pares DEX
  • Pine
Mapas de calor
  • Acciones
  • ETF
  • Cripto
Calendarios
  • Económico
  • Beneficios
  • Dividendos
Más productos
  • Curvas de rendimiento
  • Opciones
  • Flujo de noticias
  • Pine Script®
Aplicaciones
  • Móvil
  • Desktop
Comunidad
  • Red social
  • Muro del amor
  • Recomendar a un amigo
  • Normas internas
  • Moderadores
Ideas
  • Trading
  • Formación
  • Selecciones de los editores
Pine Script
  • Indicadores y estrategias
  • Wizards
  • Autónomos
Herramientas y suscripciones
  • Funcionalidades
  • Precios
  • Datos de mercado
Trading
  • Resumen
  • Brokers
Ofertas especiales
  • Futuros CME Group
  • Futuros Eurex
  • Paquete de acciones de EE.UU.
Acerca de la empresa
  • Quiénes somos
  • Misión espacial
  • Blog
  • Ofertas de empleo
  • Kit de medios
Tienda
  • Tienda TradingView
  • Cartas de tarot para traders
  • C63 TradeTime
Políticas y seguridad
  • Condiciones de uso
  • Exención de responsabilidad
  • Política de privacidad
  • Política de cookies
  • Declaración de accesibilidad
  • Consejos de seguridad
  • Programa de recompensas por encontrar errores
  • Página de estado
Soluciones para empresas
  • Widgets
  • Bibliotecas de gráficos
  • Lightweight Charts™
  • Gráficos avanzados
  • Plataforma de trading
Oportunidades de crecimiento
  • Publicidad
  • Integración de brokers
  • Programa de socios
  • Programa de formación
Comunidad
  • Red social
  • Muro del amor
  • Recomendar a un amigo
  • Normas internas
  • Moderadores
Ideas
  • Trading
  • Formación
  • Selecciones de los editores
Pine Script
  • Indicadores y estrategias
  • Wizards
  • Autónomos
Soluciones para empresas
  • Widgets
  • Bibliotecas de gráficos
  • Lightweight Charts™
  • Gráficos avanzados
  • Plataforma de trading
Oportunidades de crecimiento
  • Publicidad
  • Integración de brokers
  • Programa de socios
  • Programa de formación
Look FirstLook First