Peak Trading Activity Graphs [LuxAlgo]The Peak Trading Activity Graphs displays four graphs that allow traders to see at a glance the times of the highest and lowest volume and volatility for any month, day of the month, day of the week, or hour of the day. By default, it plots the median values of the selected data for each period. Traders can enable the Median Delta feature to further highlight differences in the data. The graphs are customizable in width and height and feature gradient colors by default.
🔶 USAGE
The tool is simple yet powerful. Using the three main parameters on the settings panel, traders can display up to four different graphs and up to 16 different configurations.
There are two main types of data: volume and volatility. There are also four different time periods: months, days of the month, days of the week, and hours of the day. There is also the possibility of displaying the raw medians or the delta between them.
Understanding which time periods have the most and least volume and volatility is essential for any trader. From avoiding trading during periods of low volume to properly sizing positions during periods of high volatility, there are multiple use cases directly related to improving execution and risk management.
🔹 Months
This chart shows the monthly volume and volatility of NQ as medians at the top and as the delta of medians at the bottom.
As we can see on the left-hand chart, the volume is fairly consistent throughout the year. January, March, and October have the highest volume, and December has the lowest volume for obvious reasons. Note the bottom chart with the delta feature enabled, which clearly shows the top and bottom periods.
On the right, we have volatility, which is also evenly distributed throughout most months. October is the most volatile month, and March is the least volatile month. The differences are also very clear on the bottom chart with delta enabled.
Traders may want to compare median volatility and volume by month to size positions and favor exposure during historically high-activity months.
🔹 Days of Month
The same NQ charts are shown, but in this case, the Days of Month period has been selected. As you can see, this displays a calendar-like graph. The volume is on the left, the volatility is on the right, and the delta feature is enabled on the bottom charts. This feature allows for stronger differences in gradient.
The top charts show that the raw medians of both volume and volatility are evenly distributed. We need to enable the delta feature on the bottom charts to see where the most and least volume and volatility are.
Traders can use median activity by calendar day to anticipate liquidity expansions or contractions and adjust trade frequency.
🔹 Days of Week
In this case, we have BTC charts with the same layout as before. Notably, the difference in volume on weekends is not as pronounced from a volatility perspective on those same days.
A practical use case can be differentiate high-risk, high-participation weekdays from low-activity sessions to select trend or range-based strategies.
🔹 Hours of Day
This shows the volume and volatility of each hour of the day for gold futures. As we can see, the most volume and volatility occur during the three hours around the RTH open at 8:00, 9:00, and 10:00 a.m.
Traders may want to isolate hours with the highest median volatility and volume to concentrate execution and avoid low-liquidity periods.
🔹 Assets Comparison
This tool allows us to compare different assets over the same period. In this case, we are comparing the hours of the day for 10-year notes, the S&P 500, silver, and the yen. Each asset has a different volatility profile throughout the day.
With the Delta feature enabled, we can clearly see the differences. The 10Y Notes move from 7:00 to 9:00 and from 2:00 to 9:00. The Yen moves from 7:00 to 9:00 and from 2:00 to 9:00. Silver moves from 8:00 to 10:00. The S&P 500 moves from 8:00 to 9:00 and from 14:00 to 15:00. All times are in exchange time.
🔹 Sizing & Coloring Graphs
Traders can adjust the width and height of the graphs, as well as the text size, at will.
Traders can choose from four different color configurations in the settings panel.
🔶 SETTINGS
Data: Select the type of data to display: Volume or Volatility.
Period: Select the time period to display: Month, Day of Month, Day of Week, or Hours.
Display delta between medians. Display the difference between the medians as a percentage. The smaller median is 0 and the larger median is 100. Enabling this feature highlights the differences between values.
🔹 Graph
Graph: Select the graph location.
Size: Select the graph size.
Width: Select the graph width.
Height: Select the height of the graph.
🔹 Style
Colors: Select a color map: Viridis, Plasma, Magma, or Custom.
Custom Cold: Select a custom color for cold (low values).
Custom Lukewarm: Select a custom color for lukewarm (medium values).
Custom Hot: Select a custom color for hot (high values).
Graph
Relative Crypto Dominance Polar Chart [LuxAlgo]The Relative Crypto Dominance Polar Chart tool allows traders to compare the relative dominance of up to ten different tickers in the form of a polar area chart, we define relative dominance as a combination between traded dollar volume and volatility, making it very easy to compare them at a glance.
🔶 USAGE
The use is quite simple, traders just have to load the indicator on the chart, and the graph showing the relative dominance will appear.
The 10 tickers loaded by default are the major cryptocurrencies by market cap, but traders can select any ticker in the settings panel.
Each area represents dominance as volatility (radius) by dollar volume (arc length); a larger area means greater dominance on that ticker.
🔹 Choosing Period
The tool supports up to five different periods
Hourly
Daily
Weekly
Monthly
Yearly
By default, the tool period is set on auto mode, which means that the tool will choose the period depending on the chart timeframe
timeframes up to 2m: Hourly
timeframes up to 15m: Daily
timeframes up to 1H: Weekly
timeframes up to 4H: Monthly
larger timeframes: Yearly
🔹 Sorting & Sizing
Traders can sort the graph areas by volatility (radius of each area) in ascending or descending order; by default, the tickers are sorted as they are in the settings panel.
The tool also allows you to adjust the width of the chart on a percentage basis, i.e., at 100% size, all the available width is used; if the graph is too wide, just decrease the graph size parameter in the settings panel.
🔹 Set your own style
The tool allows great customization from the settings panel, traders can enable/disable most of the components, and add a very nice touch with curved lines enabled for displaying the areas with a petal-like effect.
🔶 SETTINGS
Period: Select up to 5 different time periods from Hourly, Daily, Weekly, Monthly and Yearly. Enable/disable Auto mode.
Tickers: Enable/disable and select tickers and colors
🔹 Style
Graph Order: Select sort order
Graph Size: Select percentage of width used
Labels Size: Select size for ticker labels
Show Percent: Show dominance in % under each ticker
Curved Lines: Enable/disable petal-like effect for each area
Show Title: Enable/disable graph title
Show Mean: Enable/disable volatility average and select color
FVG Price & Volume Graph [LuxAlgo]The FVG Price & Volume Graph tool plot recently detected fair value gaps relative to the volume traded within their area during their formation. This allows us to effectively visualize significant fair value gaps caused by high liquidity.
The indicator also returns levels from the fair value gaps areas average with the highest associated volume.
Do note that the indicator can consider the chart's visible range when being computed, which will recalculate the indicator when the chart's visible range changes.
🔶 USAGE
Fair Value Gaps (FVG) are core price action concepts occurring when the disparity between supply and demand is significant. Price has a tendency to come back to those areas and mitigating them, that is filling them.
The provided tools allow for effective visualization of both FVG's area's height as well as the volume originating from their creation, which is defined by the total traded volume located within the FVG during its creation. FVG's with more associated volume are displayed to the rightmost of the chart.
Users can determine the amount of most recent FVG's to display from the "Display Amount" setting. Disabling the "Consider Mitigation" setting will return mitigated FVGs in the plot, which can be useful to know where most FVGs were located.
We can use the area average of the FVGs with the most associated volume as potential support/resistance levels. Users can extend more FVG's averages by increasing the "Highest Volume Averages" setting.
🔹 Visualizing Volume/Price Relationships of FVG's
A linear regression is fit between FVG's areas average and their associated volume, with this linear regression helping us see where FVG's with specific volume might be located in the future based on existing FVG's.
Note that FVG's do not tend to exhibit linear relationships with their associated volume, the provided linear regression can give a general sense of tendency, but nothing necessarily accurate.
🔶 DETAILS
🔹 Intrabar Data TF
Given a formation of three candles causing an FVG, the volume traded within that FVG area is obtained by looking at the lower timeframe intrabar candles located within the intermediary candle of the formation. The volume of the intrabar candles located within the FVG areas is added up to obtain the associated volume of the FVG.
Using a lower "Intrabar Data TF" allows obtaining more precise volume results, at the cost of computation time and data availability (if there is a high difference between the "Intrabar Data TF" and the chart TF then less FVG can have their associated volume calculated due to Tradingview limitations).
🔹 Display
Users have access to multiple graphical settings affecting how the indicator is displayed.
The "Graph Resolution" setting determines the length of the X axis, with higher values returning more precise results on the location of FVGs over the X axis. Users can also control the number of labels displayed on the X-axis using the numerical input to the right of "Show X-Axis Labels".
Additionally, users can color FVG areas using a gradient relative to the size of the area, or the volume associated with the FVG.
🔶 SETTINGS
Display Amount: Amount of most recent FVGs to display.
Highest Volume Averages: Amount of FVG averages levels with the highest volume to display and extend.
Consider Mitigation: Only display unmitigated FVGs.
Filter FVGs Outside Visible Range: Only display FVGs areas that are located within the user chart visible range.
Intrabar Data TF: Timeframe used to obtain intrabar data. Should be lower than the user chart timeframe.
RSI is in Normal Distribution?Does RSI Follow a Normal Distribution?
The value of RSI was converted to a value between 0~2, 2~4, ..., 98~100, and the number of samples was graphed.
The Z values are expressed so that the values corresponding to 30 and 70 of the RSI can be compared with the standard normal distribution.
Additionally, when using the RSI period correction function of the 'RSI Candle Advanced V2' indicator that I made before, it shows no change in standard deviation.
RSI는 정규분포를 따를까요
RSI의 값을 0~2, 2~4, ..., 98~100 사이 값으로 변환하고 그 표본 갯수를 그래프로 표현하였습니다.
Z 값은 RSI의 30, 70에 해당하는 값을 표준정규분포와 비교할 수 있도록 표현하였습니다.
추가적으로 제가 예전에 만들었던 'RSI Candle Advanced V2' 지표의 RSI 기간 보정 함수를 사용할 경우 표준편차의 변화가 없음을 보입니다.
MathSearchDijkstraLibrary "MathSearchDijkstra"
Shortest Path Tree Search Methods using Dijkstra Algorithm.
min_distance(distances, flagged_vertices) Find the lowest cost/distance.
Parameters:
distances : float array, data set with distance costs to start index.
flagged_vertices : bool array, data set with visited vertices flags.
Returns: int, lowest cost/distance index.
dijkstra(matrix_graph, dim_x, dim_y, start) Dijkstra Algorithm, perform a greedy tree search to calculate the cost/distance to selected start node at each vertex.
Parameters:
matrix_graph : int array, matrix holding the graph adjacency list and costs/distances.
dim_x : int, x dimension of matrix_graph.
dim_y : int, y dimension of matrix_graph.
start : int, the vertex index to start search.
Returns: int array, set with costs/distances to each vertex from start vertexs.
shortest_path(start, end, matrix_graph, dim_x, dim_y) Retrieves the shortest path between 2 vertices in a graph using Dijkstra Algorithm.
Parameters:
start : int, the vertex index to start search.
end : int, the vertex index to end search.
matrix_graph : int array, matrix holding the graph adjacency list and costs/distances.
dim_x : int, x dimension of matrix_graph.
dim_y : int, y dimension of matrix_graph.
Returns: int array, set with vertex indices to the shortest path.
Moving Average Slope AnalysisThis is a simple script which allows to do slope analysis on any kind of Moving Average. Simply change the moving average function that you wish to work with , in the script.
Slope analysis may be required for fine-tuning trade automation software , which uses Moving Average for determining optimum enter/exit point.
Read code comments for instructions!







