Multi-Timeframe Period Separators█ OVERVIEW
This indicator plots period separators for up to four higher timeframes. The separators are fully customizable and designed to work on any symbols.
█ FEATURES
Reference
You can choose to plot the separators starting from midnight 00:00 or the opening of the exchange trading session.
Timezone
You can specify to localize midnight 00:00 to the region of your liking. The timezone format conveniently requires no manual adjustment during clock changes.
█ NOTES
Scans the bar opening and closing times
The script checks the bar ` time ` and ` time_close ` to pinpoint the separators that can occur intrabar.
Tracks from the last separator
The script tracks the time elapsed since the last separator, which is useful when there is no trading activity or the market is closed. As it can result in missing bars, it plots the separator on the first available bar.
Others
The script automatically hides the separators when navigating to an equal or higher chart timeframe.
Vertical
Time-input Lines [MFX]THE LINES
The indicator plots a horizontal price line at a specified hour and minute (default: 9:30 - Equities Open). This line extends for a predefined number of minutes (default: 60 minutes - Opening Range Full Spectrum). Additionally, the indicator can plot two vertical lines: one at the selected start time and another at the end of the horizontal line.
STYLE
Both the horizontal and vertical lines are fully customizable, allowing adjustments to color, style, and width. For a cleaner, minimalist chart, any of these lines can be disabled.
TIMEZONE
By default, the indicator operates in the New York time zone, but this can be modified by unchecking the option and specifying a custom offset relative to UTC/GMT. The default offset is +2, corresponding to CEST (Central European Summer Time, UTC/GMT+2). The offset can be adjusted with up to 15-minute precision, where 0.25 represents a quarter of an hour.
Time Vertical LineThis indicator is designed to plot vertical lines at specified hourly intervals on a trading chart. The indicator includes default settings to draw vertical lines at every hour of the day and provides users with the flexibility to customize up to six additional vertical lines at specified times.
Traders can use the vertical lines to segment the trading day, making it easier to analyze market movements within specific hours.
Customizable lines allow traders to mark important times such as market openings, closings, and economic news releases.
This indicator is a powerful tool for traders who need to keep track of specific times and events during the trading day, providing a clear and customizable visual representation of time on their charts.
The indicator allows you to easily customize the appearance of the 24 default vertical lines that mark each hour of the day. You can change the color by adjusting the Color input, modify the transparency using the Transparency input, and set the line width with the Line Width input.
Each of custom lines can have its own color, transparency, and line width, giving you full control over their appearance. By default, these custom vertical lines are turned off. To activate them, go to the "Style" tab in the settings menu of the indicator.
The time for each vertical line is based on the exchange's timezone. You can set the time for each of the 6 custom vertical lines using decimal notation. For example:
Input 9.1 to display a vertical line at 9:10.
Input 9.15 to display a vertical line at 9:15.
The indicator should only be displayed in time frames less than 15 minutes. Go to "Visibility" in settings for options.
Vertical Lines 2A vertical line plotting function is missing in Pinescript. This is another method to plot vertical line on a chart, and an improvement on my previous script "vertical lines" .
The script hacks the plotcandle function to display just the wicks without the body. This hack simulates a vertical line. The body of the candle is non-existing since the open and close are the same and its color is set to null. The wicks are abutting resulting in a continuous vertical line.
Drawbacks include inability to set width and transparency of the lines. The plotcandle function does not allow setting the width and transparency of the wicks. This feature would be desirable.
The crossing of the RSI of overbought and undersold zones is used as an example in this published script. Any indicator can be used and this script can be executed on any other indicator by using "add indicator" on the desired indicator, and selecting the indicator as the source. I added crossover lines on the plotted RSI as an example.
//////////////////////////////////////////////////////Breakdown of the script////////////////////////////////////////////////////////
The src input determines which price data is used for the highest value calculation. By default, it is set to the close price.
The length input determines the length of the RSI calculation. By default, it is set to 14.
The mult input determines the multiplier of the highest value that is used to determine the height of the vertical lines. By default, it is set to 100%, meaning the lines will reach the highest value in the dataset.
The top and bot inputs determine the overbought and oversold levels for the RSI. By default, they are set to 70 and 30, respectively.
The current_rsi and previous_rsi variables calculate the RSI values for the current bar and the previous bar, respectively.
The hi_value variable finds the highest value in the dataset, and the hi variable calculates the height of the vertical lines based on the highest value and the user-defined multiplier. The lo variable calculates the distance between the highest value and the current price data.
The uph, dnh, upl, and dnl variables determine the height and low of the vertical lines for when the RSI crosses overbought or oversold levels.
The if statements check if the RSI has crossed overbought or oversold levels and set the uph, dnh, upl, and dnl variables accordingly.
Finally, the plotcandle() function is used to plot the vertical lines on the chart. The open and close values are set to the src input, and the high and low values are set to the uph, dnh, upl, and dnl variables. The bordercolor argument is set to na to hide the borders of the lines, and the wickcolor argument is set to green or red, depending on whether the line is an overbought or oversold crossover.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Moon Phases + Daily, Weekly, Monthly, Quarterly & Yearly Breaks█ Moon Phases
From LuxAlgo description.
Trading moon phases has become quite popular among traders, believing that there exists a relationship between moon phases and market movements.
This strategy is based on an estimate of moon phases with the possibility to use different methods to determine long/short positions based on moon phases.
Note that we assume moon phases are perfectly periodic with a cycle of 29.530588853 days (which is not realistically the case), as such there exists a difference between the detected moon phases by the strategy and the ones you would see. This difference becomes less important when using higher timeframes.
█ Daily, Weekly, Monthly, Quarterly & Yearly Breaks
This indicator marks the start of the selected periods with a vertical line that help with identifying cycles.
It allows to enable or disable independently the daily, weekly, monthly, quarterly and yearly session breaks.
This script is based on LuxAlgo and kaushi / icostan scripts.
Moon Phases Strategy
Year/Quarter/Month/Week/Day breaks
Month/week breaks
[VTaL] Vertical Time Alert Lines - By BlueJayBird🦾 USE
- Vertical lines drawn ON TOP of chart at selected key times of the day, week, month, year.
- You can use it at any symbol (as far as I know).
- Programmatic alerts available.
- Lines from lower time-frames are selectively NOT visible at higher time-frames. Example: At 1h time-frame, vertical lines from 1h and 4h intervals are not visible. Drawing them is considered not really useful.
🎭 MAIN FEATURES
- Available targeted times: 3m, 15m, 1h, 4h, 1D, 1W, 1M, 1Y.
- Offset available for all lines. Example: 1 offset for 4h moves lines from 4AM to 8AM.
- Programmatic alerts for all lines. Example: If alert is enabled for 15m lines, every time those lines are reached, alert will trigger.
- Available drawing themes: Custom, Light, Dark.
💻 NOTES ON CODE
- Vertical lines are drawn using a custom function, which uses line.new() built-in function.
- Alerts are triggered using ta.cross() built-in function. Alert is triggered when close price crosses a given time value from the line.get_x1() built-in function.
- I've added, where necessary, several comments to the code for understanding what's going on. If you have additional questions, you may ask them in the comment section of the publication.
- 3m lines are not really useful in day-trading, they were added for debugging purposes mainly. Useful for learning how to use alerts, though.
👉🏼 NOTES ON ALERTS
- When setting up an alert, the targeted line must be enabled/visible.
- Every time any alert is enabled or disabled, you must create AGAIN the alert from the "Alerts" panel (remember, alerts run in the back-end).
- Alerts contain really useful information. If you have any idea for adding some other data, tell in the comment section. 💡
⚠️ KNOWN ISSUES
- None. Let me know please if you find any.
--------------------------------------------
~ Comment , Follow and Boost ~ 🚀
Yearly Monthly Vertical Lines [MsF]This indicator that draws vertical lines for each year and month starting from the specified date and time.
For example, starting from August 26th, 2022,
The annual vertical lines are Aug 26th, 2022, Aug 26th, 2021, Aug 26th, 2020, Aug 26th, 2019, Aug 26th, 2018, Aug 26th, 2017...
It is useful to check the action of the chart at the event of each year and month.
Caution:
Since there is a limit to the Bar-Count that can be specified in the script language, depending on the chart period setting It may not be displayed.
-------------------------
指定した日時を起点として、年、月ごとに垂直線(縦線)を描画するインジケータです。
例えば、2022/9/1を起点とした場合、
年次のラインは、2021/9/1、2020/9/1、2019/9/1、2018/9/1、2017/9/1、2016/9/1...
に描画します。
年、月ごとのイベント時のチャートの動きを確認するのに便利です。
※過去イベント時の価格変動確認の際、手作業で垂直線を引くのが面倒なため、作成しました。
<注意>
スクリプト言語で指定できるBarCntに制限がある為、チャートの期間設定によっては
表示されない場合があります。※今後改善の余地あり
Range Gap/Open to Close/Close to CloseThis indicator shows the percentage variation of:
gap
close to close (day including gap)
open to close (without gap)
The green bars represent the days when the variation did not reach the selected range. The red bars show the days when the variation was higher than the selected range.
Best timeframe : DAY
Vertical LinesSPEICALLY USED FOR BANKNIFTY RIGHT NOW
Draw vertical lines based on script, based on many conditions :
Conditions used right now are :
1. its a wednesday and the range of day is less than 600 points
EMAs Vertical & Horizontal Offset
This script allows you to set Horizontal and Vertical offset to EMA lines.
Default settings is to have one set of EMAs to show bearish wave (red line and circles)and the second set to show bullish wave (green line and circles).
It also includes supporting EMAs & SMA for direction and confirmation
Timeframe option allows you to overlay Higher TF EMAs onto the current TF.
Hour Vertical LinesPlots a vertical line on each hour. Only goes back so far.
This indicator is great to look at the structure of the 15m, 5m, 3m, or 1m within the block of a 60m candle.
Vertical LinesThis script plots vertical lines on charts or indicators. Unfortunately pinescript is lacking a vertical line plotting function. Vertical lines are useful to mark events, such as crossover of levels, indicators signals or as a time marker.
After searching the internet for a long time and trying different scripts, this script is the simplest and visually the best. You would think that plotting a vertical line would be relatively easy, it is not! I thank the unknow author for sharing this solution and now I will share it on tradingview to make it readily available to anybody that needs it.
RSI crossover signals are used as an example in this script. When the RSI crosses over 70 or below 30, the script plots a red or green vertical line.
The script plots a vertical line as a histogram bar. The histogram bar must have a height.
Setting the height near infinity like 1e20 will cover all the ranges from top to bottom in most charts, but doesn't work all the time. If the chart range is small in values, the line is not plotted or the chart is visually compressed because the top of the bar is also a data point in the chart. Another solution is to find the highest point in the chart and multiply it by a number from 2 to 10 to set the top of the histogram bar. But this solution doesn't work if the line is drawn in the indicator window. additionally if the chart or indicator includes negative values, a histogram bar with a negative height must be concatenated to the histogram bar with a positive height to cover the positive and negative range.
It would seem intuitive to include a vertical plot function since it is very useful and pinescript already has a horizontal line plot function called Hline. But pinescript is becoming less intuitive, and redundant. A case in point is Version 4 variable declaration and naming, it less intuitive and more redundant than previous versions. I beg Tradingview to adopt a more refined scripting language such as Matlab or Python for charting purposes. These languages can be easily ported to other analysis programs for AI or statistical analysis.
Daily lines (UTC)This is a simple script to add highlighted lines on the daily open.
It uses UTC as timezone.
portfolio_strikesA simple script for keeping track of your options portfolio. Basically, you can write one line of code per strategy (single, vertical, or strangle) to keep a line drawn on the underlying's chart, at the strike price, from the current bar until expiration. See the comments at the top of the code for more explanation.
vertical_pricer
USAGE
1. Select the type of contract (call or put), the long strike, and the width.
2. Select the volatility model
3. The standard deviation is shown, enter it into the input.
The tool gives a theoretical price of a vertical spread, based on a
historical sample. The test assumes that a spread of equal width was sold on
every prior trading day at the given standard deviation, based on the
volatility model and duration of the contract. For example, if the 20 dte
110 strike is presently two standard deviations based on the 30 period
historical volatility, then the theoretical value is the average price all
2SD (at 20 dte) calls upon expiration, limited by the width of the spread and
normalized according to the present value of the underlying.
Other statistics include:
- The number of spreads in the sample, and percentage expired itm
- The median value at expiration
- The Nth percentile value of spreads at expiration
- The number of spreads that expired at max loss
Check the script comments and release notes for further updates, since Tradingview doesn't allow me to edit this description.
Hourly Time SeparatorI made this indicator mostly for personal use but there may be few others who would like to have vertical lines occur every day in specific our on chart.
I am no developer and all I did was copy @allanster's work and delete few lines and duplicate few others. Code will be open for anyone to edit since it was not my code to start with after all. Hopefully this one helps to someone.
How To Show Vertical LinesExample of various methods to show dashed or solid vertical lines on chart based on using either session or time.
Credit for line method goes to midtownsk8rguy ->
Credit for plot method goes to PineCoders -> www.pinecoders.com
Special thanks to LucF, midtownsk8rguy, and PineCoders for permission to use their work.
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!
Highlight Last Bar of: D | W | M | Hour| H4 | MinutesSimple script highlighting a vertical line on the last bar of the Day/ Week/ Month/ Hour/ H4/ minute etc.
Helps maintain visibility of higher timeframes when on lower timeframes.
Quickly identify end of period levels.
vline() Function for Pine Script v4.0+It's been a long time coming, but here is a versatile vline() function applicable to PSv4.0+ utilizing line.new(). I decided to finally figure this out at the request of another member recently. I have been waiting myself for months, but it's now time for an idea who's time has come to unleash upon planet Pine Script. It's a handy little function I believe will be very useful in the future. It only requires 4 parameters of BarIndex, Color, LineStyle, and LineWidth. Make sure you place it in an appropriate if() block to use it properly. As displayed above, this plots every 10 bars using a conditional statement employing the rarely used modulus operator.
Use it as you please, this is free code to implement into your new Pine projects. I don't require an credit for any one to use this function. I simply don't want any credit. I would however like to see some great ideas utilizing this when I randomly and accidentally come across them in the public library. I didn't know where to put this script, so I just tossed into the "Trend Analysis" category. I'm pondering we members need a "Miscellaneous" category some time in the future.
The comments section below is solely just for commenting and other remarks, ideas, compliments, etc... regarding only this indicator, not others. If you do have any questions or comments regarding this indicator, I will consider your inquiries, thoughts, and concepts presented below in the comments section, when time provides it. When my indicators achieve more prevalent use by TV members, I will implement more ideas when they present themselves as worthy additions. As always, "Like" it if you simply just like it with a proper thumbs up, and also return to my scripts list occasionally for additional postings. Have a profitable future everyone!
Vertical TimelinesYou can display different times of the day on the chart. For minutes use "." For example 20.30
Vertical Horizontal Filter BacktestVertical Horizontal Filter was initiated by Adam White. It was first published
in a magazine called “Issues of Futures” in August, 1991. The Vertical Horizontal
Filter (VHF) is a very common Indicator used by traders to find out the Phase of
a Price Trend. Normally, a price trend can be in a Trending Phase or a Congestion
Phase/Choppy Movement Phase. Adam White created this particular Technical Indicator
to determine whether prices are trending in a particular direction or are they going
through a transitional period. He used it to measure the range of Futures available
in the market.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Vertical Horizontal Filter Strategy Vertical Horizontal Filter was initiated by Adam White. It was first published
in a magazine called “Issues of Futures” in August, 1991. The Vertical Horizontal
Filter (VHF) is a very common Indicator used by traders to find out the Phase of
a Price Trend. Normally, a price trend can be in a Trending Phase or a Congestion
Phase/Choppy Movement Phase. Adam White created this particular Technical Indicator
to determine whether prices are trending in a particular direction or are they going
through a transitional period. He used it to measure the range of Futures available
in the market.
WARNING:
- This script to change bars colors.