ATR vs (H-L)SMA programming help.

 

Hello,

I'd like to observe the difference between Average True Range and High-Low (SMA).

Can someone please help me program a small indicator that plots the ATR(period) with (High-Low) SMA (period) on same indicator window with red for ATR and blue for H-L?

Similarly, if someone has the code for ATR in Matlab, that would be awesome as well.

Thanks

Reason: