Can we change the "Daily" for something else? Like putting a 1H 20-EMA on a 5M chart?
RickAdlam
⋅
Brilliant concept. If you had "Always showing the 5/20/50/200 Day EMA's" on any time frame in the same script that would be very useful. I have these "Day EMA's" set on my 1 hour chart and it has helped out of sight.
jerobibobi
⋅
the values change from when i go from 1d to lower time frames still...
alxgreen
⋅
Why are you plotting the MA only for historical bars?
veryevilone
⋅
@alxgreen, iirc mtf only worked on historical bars at the time. the real time bar would just return the close price. TV has built in MTF on the moving average indicator now so you should probably just use that anyway. Have a nice day
alxgreen
⋅
@veryevilone, thanks!
Turns out these scripts produce different results depending on which version of Pine script you set. V2 didn't have this problem, but it has an offset issue.
I tried TV's MTF (in pine V4) and it actually has exactly the problem you mention: the realtime bar just shows the closing price.
But TV's MTF doesn't allow you to select and style the historical bars independently from the realtime bars so now I'm back to your method in V3 -- seems like the best solution afaik