[FN] Session Range & Date Range For BacktestingThis has been done before in different ways, however, my goal is to publish a single, simplified copy/paste version of the idea so you can quickly and easily incorporate it into your strategy backtesting.
You can designate weekdays, weekdays + weekends for 24/7 markets, and also session range.
So, you trade bitcoin? It works. CME futures? It works. You are a discretionary trader so the only signals that matter are the ones that happen when you're awake? It works. Copy and paste.
The goal is that its that easy. You'll have to let me know if it is. glhf everyone.
If I'm not mistaken, you should be able to copy/paste this directly into your strategy script (Paste it in before your entry declarations). Just leave out the last 2 lines where the bgcolor() is declared... unless you want the background color lit up, that's up to you. It's just for demonstration purposes in this script.
After you've pasted it in, then in your strategy.entry() function you are adding: to the strategy.entry() function.
e.g:
strategy.entry("Long", strategy.long, qty=1, when = ENTRY_SIGNAL and signal_backtest())
Shoutouts to @zenandtheartoftrading and @allanster for providing the basis of this code that I put together here. We stand on the shoulders of giants.
Session
NSDT Session Background ShadingA simple script to add background colors to specific timeframes. Great for trading futures so you can separate sessions for easier viewing. Use for stocks to separate pre, open, and post market times.
There are three timeframes that can be set and all colors can be modified.
Candle Range - Monthly - Open/High/Low/Close/Wicks (Oldinvestor)This candle range comparison is similar to my original script Candle Range Compare .
This script is to compares the size of open/close high/low and wick size side by side. This version of the script allows you to only show a chosen month of each year to compare. I hadn't even thought to try and vanish the part of the chart I'm not looking at. I'll consider that later (may never happen, I am limited on time).
I have also included check boxes to turn on/off certain candles. This part is pretty self explanatory. For example: if you wish to not see wicks in front of the open/close, go to the settings for the study and uncheck the box for "Show Wicks".
Warning: The script does not work so well on monthly candles? Some of the candles are missing...
Good luck
Oldinvestor
NYSE Session for 24/7 marketsThis script is used for analyzing the correlation between 24/7 markets with regards to the price action during NYSE session. Defaults to showing daily session open/high/low but there is the option to show the weekly session data.
intraday trading perioddisplay the intraday trading period (08:30 - 15:00) on chart with high transparent white background.
you can edit the time period by yourself in the pine editor mode.
London_NYThis is a session indicator that is one color from beginning of London Session to end of New York Session.
Multi-Timeframe VWAP V2 MODQuick and dirty mod of this script in order to fit my needs.
Added one custom session
More user friendly (Enable/disable through inputs menu)
Fx220 Market Sessions IndicatorFx220 NATION! Welcome. Here's a script to add the Market Sessions without altering any settings! Enjoy - Brian
3 Sessions DividerAsia (Syndey + Tokio)
London
NY
Made for GMT-6 (Central US Time)
Sessions may Overlap.
Sessions Asia, London, NY colored USED FOR GMT+2Simple script making easy to see when what session begins also overlaps and ends.
This script used for GMT+2 time zone, if you want to edit it just overite script time cycle.
Custom Colored Session (Pre, Open, Close, Post, Outside)Another script enabling coloring of sessions. Variables for all session timings and colors are exposed. Backgrounds and/or dividers can be enabled. If you only want dividers, just uncheck all of the background sections.
Note: Due to the way weekends are handled on some exchanges, displaying the divider on Friday is not possible.
Note: Displaying backgrounds or dividers in the future does not seem to be possible. I would gladly add this if I can figure it out.
Trading Session IndicatorFollowing time zones showing:
Asia Session - Red
London Open - White
London Session - Blue
NY Open - White
Sector High/LowHighlights which S&P SPDR Sector ETFs are at highs of day (green letter) or lows of day (red letter)
The first candle of the day is always all-green because by default the first candle of the day has the high of the day. So this indicator is more meaningful later in the day when sectors are making repeated highs/lows
Session RangeSimple script for showing the high/low/midrange of a session. By default configured to do the Daily range using the "regular" session. But it's configurable. For example on this chart I am showing the Weekly range.