LonesomeTheBlue

Pine Script: Live and non-repainting HTF Moving Averages

교육
LonesomeTheBlue Wizard 업데이트됨   
GEMINI:BTCUSD   비트코인
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 times frame candles for higher time frame and must change all points as in that period as you can see in the video (non-repainting one).

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

This work is completely experimetal.

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


Enjoy!
코멘트:
You can find the script here

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.