Moving Average MTF Live [Experimental]

Hello Everyone,

While using "Security" function for Higher Time Frames (htf) you must accept "Repainting" issue or better you must use previous day data such "security(syminfo.tickerid, 'D', close, lookahead=barmerge.lookahead_on)" that's best normally (or barmerge.lookahead_off). But the problem is (as you can see) it uses previous day data, and this causes latency.

So how to draw LIVE and NON-REPAINTING HTF moving averages?
Until the last candle of higher time frame all is fine and no repaint issue. when it came to last candle of HTF and if we use real data, (because of we can not know the future) while price is changing it starts drawing on each candle of current period without correcting old ones (this is repaint issue). it needs to calculate number of curent time frame candles for higher time frame and must change all points in that period as you can see in the video below.

We have "50 lines" limitation in current Pine version. we hope to have unlimited lines in next versions.

This work is completely experimetal.

btw Thanks to all Pine Platform Developers, They are doing very good job!

Better to watch following video to see how they look like:

P.S. There is no check for Higher time frame, so you should set time frame for HTF accordingly in the options.

Remove from Favorite Scripts Add to Favorite Scripts
If you find my works useful, please consider a donation
BTC: 19qDW9AShZhBZsGuXcgRzam5Fbpc3EU8EV
ETH: 0x39c8552371b9b7f4e324197af460ba8bc8e18ef9


Very useful!
+1 Reply
+1 Reply
Thank you.
Please. Renko bar indicator. ♥
+1 Reply
@ahmetk072, you are welcome
Thank you. You are the man...
+1 Reply
@kaptanylmz, you are welcome
Thank you LTB!
+1 Reply
LonesomeTheBlue RambadamDingDong
@RambadamDingDong, you are welcome! hope it's usefull for all.
+1 Reply
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 Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out