This pine script on intraday chart is exactly the same SMA as built-in MovingAverage on a 1Day chart (with the same lengths)
//@version=2 // Use this script on intraday charts study("Daily SMA", overlay=true) src = input(close) len = input(100) s = security(tickerid, "D", sma(src, len), false) plot(s)