RicardoSantos

[RS]ZigZag (MA) V0

EXPERIMENTAL: Method to draw zigzag using ma slopes
Remove from Favorite Scripts Add to Favorite Scripts
study("[RS]ZigZag (MA) V0", overlay=true)
length = input(4)
hls = sma(hl2, length)
isRising = hls >= hls[1]
zigzag = isRising and not isRising[1] ? lowest(length) :  not isRising and isRising[1] ? highest(length) : na
plot(zigzag, color=black)
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out