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!

Remove from Favorite Scripts Add to Favorite Scripts
Telegram: • Gunbot Tuners:

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

LTC (preferred): LTDaAe7nPzbpBhZVT9o5f9f8M3aZSPa46Y

BTC: 13LhkeXBYrRomVAqbXcoLXHuqMk6Mf7G6N


+2 Reply
allanster MRsinghji
@MRsinghji, thanks appreciate the kind words!
Best ! I am starting to learn pinescrit ! Thank you so much sir!
+1 Reply
Very underrated and short but great logic script, thank you :)
allanster Pratik_4Clover
@Pratik_4Clover, thanks for your review, much appreciated!
@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 ^^
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.
@allanster, Thank you for clarifying that ^^

Will change the TF data importing logic and see if it works.
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 Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out