Seasonality Widget [LuxAlgo]The Seasonality Widget tool allows users to easily visualize seasonal trends from various data sources.
Users can select different levels of granularity as well as different statistics to express seasonal trends.
🔶 USAGE
Seasonality allows us to observe general trends occurring at regular intervals. These intervals can be user-selected from the granularity setting and determine how the data is grouped, these include:
Hour
Day Of Week
Day Of Month
Month
Day Of Year
The above seasonal chart shows the BTCUSD seasonal price change for every hour of the day, that is the average price change taken for every specific hour. This allows us to obtain an estimate of the expected price move at specific hours of the day.
Users can select when data should start being collected using the "From Date" setting, any data before the selected date will not be included in the calculation of the Seasonality Widget.
🔹 Data To Analyze
The Seasonality Widget can return the seasonality for the following data:
Price Change
Closing price minus the previous closing price.
Price Change (%)
Closing price minus the previous closing price, divided by the
previous closing price, then multiplied by 100.
Price Change (Sign)
Sign of the price change (-1 for negative change, 1 for positive change), normalized in a range (0, 100). Values above 50 suggest more positive changes on average.
Range
High price minus low price.
Price - SMA
Price minus its simple moving average. Users can select the SMA period.
Volume
Amount of contracts traded. Allow users to see which periods are generally the most /least liquid.
Volume - SMA
Volume minus its simple moving average. Users can select the SMA period.
🔹 Filter
In addition to the "From Date" threshold users can exclude data from specific periods of time, potentially removing outliers in the final results.
The period type can be specified in the "Filter Granularity" setting. The exact time to exclude can then be specified in the "Numerical Filter Input" setting, multiple values are supported and should be comma separated.
For example, if we want to exclude the entire 2008 period we can simply select "Year" as filter granularity, then input 2008 in the "Numerical Filter Input" setting.
Do note that "Sunday" uses the value 1 as a day of the week.
🔶 DETAILS
🔹 Supported Statistics
Users can apply different statistics to the grouped data to process. These include:
Mean
Median
Max
Min
Max-Min Average
Using the median allows for obtaining a measure more robust to outliers and potentially more representative of the actual central tendency of the data.
Max and Min do not express a general tendency but allow obtaining information on the highest/lowest value of the analyzed data for specific periods.
🔶 SETTINGS
Granularity: Periods used to group data.
From Data: Starting point where data starts being collected
🔹 Data
Analyze: Specific data to be processed by the seasonality widget.
SMA Length: Period of the simple moving average used for "Price - SMA" and "Volume - SMA" options in "Analyze".
Statistic: Statistic applied to the grouped data.
🔹 Filter
Filter Granularity: Period type to exclude in the processed data.
Numerical Filter Input: Determines which of the selected hour/day of week/day of month/month/year to exclude depending on the selected Filter Granularity. Only numerical inputs can be provided. Multiple values are supported and must be comma-separated.
Season
[SM] Bitcoin cycles bull market
An indicator to determine the seasonality / cyclicality of bitcoin for long trades.
Application
- For traders: Identification of zones with lower risk of entering long positions
- For swing traders and investors: customizable calendar of entries into long position
Indicator structure
1. Vertical zones (green and red) of time ranges. Only for historical bars. The range width is adjustable in the indicator settings.
2. Table (in the form of a calendar) for determining the time of entering a trade in the future. The table is not editable. It displays the result of the configured zones on the historical bars.
General settings
- choose the color of the Tradingview theme (light or dark)
Table settings
- Turn table display on / off
- Set the number of months to be displayed in the table
Settings of vertical zones (green and red)
Each cycle (1 month summer, 1 month autumn, ...) has four dates
- start date of the green zone (day and month)
- date of the end of the green zone
- start date of the red zone
- date of the end of the red zone
AlexD Market annual seasonalityThe indicator displays the percentage of bullish days with a given date over several years.
This allows you to determine the days of the year when the price usually goes up or down.
Indicator has a built-in "simple moving average" shifted back by half a period, due to which the delay of this smoothing is removed.
seasonThis script is meant to help verify the existence of a seasonal effect in asset returns, using a Z-test. There are three steps:
1. Think of a way to identify a season. The available methods are: by month, by week of the year, by day of the month, by day of the week, by hour of the day, and by minute of the hour.
2. Set the chart to the unit of your season. For example, if you want to check whether a crop commodity's harvest season has a seasonal implication, select "month". If you want to investigate the exchange's opening or close, select "hour".
3. Using the inputs, select the unit (e.g. "month", "dayofweek", "hour", etc.) and the range that identifies the season. The example natural gas chart has set "start" to 8 and "end" to 12 for September through December.
The test logic is as follows:
The "season" you select has a fixed length; for example, months eight through twelve has a length of four. This length is used to compute a sample mean, which is the mean return of all September-December periods in the chart. It is also used to calculate the mean/stdev of every other four-month period in the chart history. The latter is considered the "population." Using a Z-test, the script scores the difference between the sample returns and the population returns, and displays the results at two levels of significance (P = 0.05 and P = 0.01). The null hypothesis is "there is no difference between the seasonal periods and the population of ordinary periods". If the Z-score is sufficiently large or small, we can reject the null hypothesis and say that there is a seasonal effect at the given level of confidence. The output table will show green for a rejection of the null hypothesis (meaning there is a seasonal effect) or red of acceptance (there is no seasonal effect).
The seasonal periods that you have defined will be highlighted on the chart, so you can make sure they are correct. Additionally, the output table shows the mean, median, standard deviation, and top and bottom percentiles for both the seasonal and population samples.
Many news sites, twitter feeds, influences, etc. enjoy posting statistics about past returns, like "the stock market has gone up on this day 85 out of the past 100 years" and so on. Unfortunately, these posts don't tell you that many of these statistics are meaningless, as even totally random price fluctuations will cause many such interesting figures to occur. This script provides a limited means of testing some such seasonal effects so you can see if they are probably just random, or if they may have some meaning.
Note that Tradingview seems to use 1-based indexing for daily or higher timeframes, and 0-based indexing for intraday timeframes:
Months: 1-12
Weeks: 1-52
Days (of month): 1-31
Days (of week): 1-7
Hours (of day): 0-23
Minutes (of hour): 0-59
[Bitnalysis] Altcoin Season IndicatorThe Altcoin Season Indicator compares performance of Bitcoin with the performance of the top altcoins over a specified period. The indicator weights the results, giving greater weight to the first specified altcoins. By default, the larger market cap altcoins, such as ETH, BNB, ADA, etc., are included first and therefore given greater weight in the algorithm. To remove the weighting from the formula and consider the performance of all listed altcoins equally, set the weighting setting to "0".
The output shows to what extent altcoins are outperforming Bitcoin; the higher the number, the more altcoins are outperforming Bitcoin. This indicator helps traders predict when "altcoin season" is about to begin or end.
ALT SeasonALT season shows a bullish crypto market when BTC is less profitable than Altcoins.
Therefore, traders can sell their BTC and buy Altcoins to gain more profit. Having an indicator that shows Alt season can be very useful.
To use this tool, you need two coins:
1- Main coin like BTC (you may use TOTAL or ETH, BCH)
2- Alt coin like TOTAL2 (you may use any coin rather than BTC and TOTAL)
Lets say we want to exchange Tron (TRX) with BTC or ETH.
Many Brokers (like Binance, CoinBase, ...) let us to trade TRX/BTC and TRX/ETH.
For example, if you have ETH and ETH market is sideways. Then you may sell ETH and buy TRX. To see wether this exchange is profitable, you can set main coin to ETH/USDT and alt coin to TRX/USDT.
The gray bars shows Alt season and buy opportunity in Alt coin markets.
You may leave a like if you find this script useful.
Seasonality Trader - PerformanceThis indicator is best used with the companion Seasonality Trader and Seasonality Trader - Deviations .
Plots the daily seasonality average performance profile for any ticker. Each day of the year has a statistical performance. The average of that performance can be extracted using either a simple or exponential approach, which is what this indicator shows.
This indicator:
Operates for any ticker . This indicator will not work properly on anything except a day chart using candlesticks, bars, or Heikin Ashi candles.
Any look back period (in years) is possible, as long as there is data available. This indicator will only plot values while the selected look back length is greater than the total number of years available at a given location on the chart.
Supports multiple sources beyond just the ticker close. Any price source can be used from the chart.
Can be dragged onto the main chart area and merged with the same axis used by the companion Seasonality Trader .
Has logic for daylight savings time and leap years.
Please view the following two videos to understand more:
Introduction Part 1 - Seasonality Trader
Introduction Part 2 - Variance and Performance Scripts
Please PM me on Trading View or Telegram for access.
Seasonality Trader - DeviationsThis indicator is best used with the companion Seasonality Trader .
Plots the daily seasonality standard deviation profile for any ticker. Each day of the year has a statistical performance. The average of that performance can be extracted, which can then be used to calculate the standard deviation for that particular day of the year.
This indicator:
Operates for any ticker . This indicator will not work properly on anything except a day chart using candlesticks, bars, or Heikin Ashi candles.
Any look back period (in years) is possible, as long as there is data available. This indicator will only plot values while the selected look back length is greater than the total number of years available at a given location on the chart.
Supports multiple sources beyond just the ticker close. Any price source can be used from the chart.
Can be dragged onto the main chart area and merged with the same axis used by the companion Seasonality Trader .
Has logic for daylight savings time and leap years.
Please view the following two videos to understand more:
Introduction Part 1 - Seasonality Trader
Introduction Part 2 - Variance and Performance Scripts
Please PM me on Trading View or Telegram for access.
How To Set Trade Dates
Example how to backtest specific date(s) which can be useful for testing seasonality strategy ideas such as "Sell in May", etc.
If using Daily period with wild card dates it will not trade on 1st day of month. If market is closed will trade on next open day.
Works only with Daily or lower timeframes. When using on Daily timeframe set dates 1 day earlier to execute on desired dates.
Entering 0 in any of the date fields acts a wild card. Example -> Entry Year: 0 is "Every Year", Exit Month: 0 is "Every Month", etc.
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!
Moon CyclesInformative Script for astrological seasonal changes
Equinoxes and Solstices
Full,New,Growing and waning lunar phases
Lunar Maturation counter
Trend coloring from one of my oscillators to give script something more than vanilla calculations and labels
Labels can be customized
Plotting set to absolute
First version is placeholder and will be updated with eclipse tracking,background coloration
Script is for seasonal and lunar study,Its not generating signals
The decay and lunar calculations borrowed from MQL
SeasonalityA multitool to find seasonal effects and components in your time series. Seasonality is one of most frequently used statistical patterns to improve the accuracy of demand forecasts.
To learn more about seasonality see:
en.wikipedia.org
www.investopedia.com
Features
Ability to see up to 16 period lines
33 metric types
Metrics customization
17 types of the price sources
31 types of the moving averages
Readable and optimized code
How to get access
Buy for 899$ (One-time payment, Source Code Transfer, Sole ownership)
Buy for 349$ (One-time payment, Full-time access, Multi ownership)
Make the symbolic monthly donations to support my open source work (Donate-per-use, Part-time access, Multi ownership)
Free 7-day trial access
Supported Metrics
Price
Average Price
Price Momentum
Price ROC
True Range (by J. Welles Wilder)
Average True Range (by J. Welles Wilder)
Double True Range (by Cynthia Kase)
Average Double True Range
Accumulation/Distribution (by Marc Chaikin)
Volume
Average Volume
Volume Momentum
Volume ROC
Net Volume
On Balance Volume (by Joe Granville)
Trade Value
Tick Volume
Tick Range
Max Tick Movement
Min Tick Movement
Correlation
ADX (by J. Welles Wilder)
Coppock Curve (by Edwin S. Coppock)
Elder Force Index (by Dr. Alexander Elder)
Ease Of Movement (by Richard W. Arms)
Mass Index (by Donald Dorsey)
Price Volume Trend
TRIX (by Jack K. Hutson)
Ulcer Index (by Peter Martin and Byron McCann)
VHF, Vertical Horizontal Filter (by Adam White)
Swing Index (by J. Welles Wilder)
Accumulative Swing Index (by J. Welles Wilder)
Standard Deviation
Supported Price Sources
open
high
low
close
oo2 ( (open + previous open) / 2 )
oh2 ( (open + high) / 2 )
ol2 ( (open + low) / 2 )
oc2 ( (open + close) / 2 )
hh2 ( (high + previous high) / 2 )
hl2
hc2 ( (high + close) / 2 )
ll2 ( (low + previous low) / 2 )
lc2 ( (low + close) / 2 )
cc2 ( (close + previous close) / 2 )
hlc3
ohlc4
wc (weighted close, (2 * close + high + low) / 4 )
Supported Moving Averages
AHMA, Ahrens MA (by Richard D. Ahrens)
ALF, Adaptive Laguerre Filter (by John F. Ehlers)
DEMA, Double Exponential MA (by Patrick G. Mulloy)
EMA, Exponential MA
EVWMA, Elastic Volume Weighted MA (by Christian P. Fries)
FRAMA, Fractal Adaptive MA (by John F. Ehlers)
HMA, Hull MA (by Alan Hull)
IIRF, Infinite Impulse Response Filter (by John F. Ehlers)
LSMA, Least Squares MA
LWMA, Linear Weighted MA
Median
RMA, Running MA (by J. Welles Wilder)
RMF, Recursive Median Filter (by John F. Ehlers)
RMTA, Recursive Moving Trend Average (by Dennis Meyers)
SMA, Simple MA
SHMMA, Sharp Modified MA (by Joe Sharp)
SMMA, Smoothed MA
TEMA, Triple Exponential MA (by Patrick G. Mulloy)
TMA, Triangular MA (Modified by John F. Ehlers)
VIDYA, Variable Index Dynamic Average (by Tushar S. Chande)
VWMA, Volume Weighted MA
WMA, Weighted MA
ZLEMA, Zero Lag Exponential MA (by John F. Ehlers and Ric Way)
2-Pole BF, 2-Pole Butterworth Filter (by John F. Ehlers)
3-Pole BF, 2-Pole Butterworth Filter (by John F. Ehlers)
2-Pole SSF, 2-Pole Super Smoother Filter (by John F. Ehlers)
3-Pole SSF, 2-Pole Super Smoother Filter (by John F. Ehlers)
1-Pole GF, 1-Pole Gaussian Filter (by John F. Ehlers)
2-Pole GF, 2-Pole Gaussian Filter (by John F. Ehlers)
3-Pole GF, 3-Pole Gaussian Filter (by John F. Ehlers)
4-Pole GF, 4-Pole Gaussian Filter (by John F. Ehlers)