LWMA w/ Color Change

Linear Weighted MA that changes colors based on slope.

Green = slope up from last bar
Yellow = slope is 0 from last bar
Red = slope down from last bar

This time with the ability to change the period.
Remove from Favorite Scripts Add to Favorite Scripts
study("LWMA w/ Color Change V1.1", shorttitle="LWMA", overlay=true)

p = input(defval=35, title="Period", minval=1)

ma = wma(close, p)

c = ma[1] > ma[2] ? green : ma[1] < ma[2] ? red : yellow
plot(ma[1], color=c)


Is this not just the same as a WMA? Where does the linearity come into play?
Tr_guru overttherainbow
@overttherainbow, it isnt linear i've checked it
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out