allanster

How to Overlay First LTF Bar of Day

Example how to overlay the first lower timeframe bar of the day across the entire day. Set chart to a timeframe that is lower than 1 Day period. Also included option for coloring wick pressure of that bar.


NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!

Open-source Skript

Ganz im Sinne von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es verstehen und überprüfen können. Ein Hoch auf den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Publikation unterliegt den Hausregeln. Sie können das Skript den Favoriten hinzufügen, um es auf dem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?
Telegram: https://t.me/allanster • Gunbot Tuners: http://www.allanster.com

If you would like to buy me a refreshing beverage :)...

LTC (preferred): LTDaAe7nPzbpBhZVT9o5f9f8M3aZSPa46Y

BTC: 13LhkeXBYrRomVAqbXcoLXHuqMk6Mf7G6N

Kommentare

great
+2 Antworten
allanster UnknownUnicorn5012578
@UnknownUnicorn5012578, thanks appreciate the kind words!
Antworten
Best ! I am starting to learn pinescrit ! Thank you so much sir!
+1 Antworten
Very underrated and short but great logic script, thank you :)
Antworten
allanster Pratik_4Clover
@Pratik_4Clover, thanks for your review, much appreciated!
Antworten
@allanster, Just one question
I've applied this logic
showlastSR = input(title = "Show Only Last Period SR", defval = true)
islastSR = showlastSR ? security(syminfo.tickerid, 'D', barstate.islast, lookahead = true) : true
And implemented "islastSR" it into each plot function as condition, but it seems to still keep previous days levels as well as you can see in shared image



I think this has something to do with what TV is calculating as my local time of the first day of the week rather than what is actual day start of the script, this is why this split,maybe I'm wrong, but any ways to deal with this? Please help ^^
Antworten
allanster Pratik_4Clover
@Pratik_4Clover, this is due to trying to force the script to behave in a way it was never intended to be used. The script is meant only to plot the source values of the the first intraday bar formed. Notice in the script description that it says "Set chart to a timeframe that is lower than 1 Day period", when you use security('D') you are calling a timeframe of 1 Day period, which will not work.
Antworten
@allanster, Thank you for clarifying that ^^

Will change the TF data importing logic and see if it works.
Antworten