ZenAndTheArtOfTrading

Trading Session Indicator

This indicator is basically just a back-testing tool. All it does is highlight the background of your charts with the specified color within the specified timezone.

This is useful particularly for back-testing purposes, such as testing a day-trading strategy within a particular period of the day or ignoring signals that fall within the given timeframe (which is useful for ignoring setups during your testing that appear while you're asleep or at work etc.)

Take it easy :)
- Matt.
Release Notes: Minor improvements
Release Notes: Added alert functionality
Release Notes: Added "end of session" alert functionality
Release Notes: Fixed end of session alert
Release Notes: Updated alert functionality
Release Notes: Added ability to hide background color on a separate timeframe
Release Notes: Added an option to hide this indicator on the 4HR timeframe, Daily, Weekly and Monthly
Release Notes: -
- Converted to Pine Script v4
Remove from Favorite Scripts Add to Favorite Scripts
Follow @TradeWisdom on Twitter for Daily inspiration from the best trading wizards, psychologists and philosophers.

Go to http://www.zenandtheartoftrading.com for articles on forex trading, trading psychology, trading resources, Pine Script lessons and more!

Comments

Hey nice indicator, Im using this for trading cfd, since cfd runs 24hrs and the actual market only opens in the day. Im setting the time to highlight the actual day opening hours but its not using my local time i set in tradingview, is there a quick fix for this?
+1 Reply
@traderbyday, Oh man, I wish there was! I have the same problem on all my scripts. I'm not aware of a quick fix unfortunately. It might be worth sending the TradingView support team a ticket if it's really bothering you, they have fixed a number of things on the platform like that when I've sent them requests. Good luck with your trading brother :) Sorry I couldn't be of more help.
Reply
Thanks for this its going to help my back-testing enormously!
+1 Reply
@SAMIR_G11, You're welcome man, good luck with your testing!
Reply
This is awesome. You pretty much nailed all the features one could think of. The weird thing is that if I set it too wide then I get a an internal server study error. As soon as I change a setting in the settings menu, it comes right up, no problem. Not sure how to resolve the initial server study error though.
Reply
kurtsmock kurtsmock
@kurtsmock, I think I figured it... my mistake
Reply
Script not working properly. It zooms out wayyy to much when I add the script.
Reply
@NoahKhan, Not sure what you mean, it appears to be working fine on my end:

Can you please send me a screenshot example? It should not affect your chart zoom at all unless it's some kind of TradingView bug
Reply
NoahKhan ZenAndTheArtOfTrading
@ZenAndTheArtOfTrading, I figured it out, under style I had to uncheck "Plot" if the box is checked when I add it it looks like this:
Reply
Hi, thanks for the script!
Is it possible to make it invisible on timeframes higher than 1H for example
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 Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out