Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © aprenderainvertirenbolsa.es
- //@version=5
- indicator("Media Móvil Ponderada con Desviaciones", shorttitle="MMPD", overlay=true)
- // Entradas
- length = input(200, title="Longitud de la Media")
- deviation_upper = input(10.0, title="Desviación Superior (%)")
- deviation_lower = input(10.0, title="Desviación Inferior (%)")
- // Medias Móviles Ponderadas
- wma_central = ta.wma(close, length)
- wma_upper = ta.wma(close, length) * (1 + deviation_upper / 100)
- wma_lower = ta.wma(close, length) * (1 - deviation_lower / 100)
- // Trama de la Media Central
- plot(wma_central, color=color.blue, title="Media Central")
- // Trama de la Media Superior
- plot(wma_upper, color=color.green, title="Media Superior")
- // Trama de la Media Inferior
- plot(wma_lower, color=color.red, title="Media Inferior")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement