Accumulation Map [LuxAlgo]The Accumulation Map is a charting tool that tracks traded volume across all price levels within a specified period.
It highlights the relationship between an asset's price and traders' willingness to buy or sell, helping to identify accumulation zones.
These zones represent areas of significant trading activity and provide insights into potential support and resistance levels. The indicator displays these zones using a heatmap, offering a clear, visual representation of market sentiment and activity based on volume.
🔶 USAGE
The Accumulation Map shows the distribution of traded volume across different price levels over a specific period. The volume nodes are displayed as color gradients, each reflecting the accumulation level (trading activity) at that price range.
The heatmap visually represents accumulation areas on the chart with color gradients. This visualization helps traders easily spot areas of significant interest and potential support or resistance levels within the market.
Metric Display controls how accumulation metrics appear on the chart. Options include Level Value Ratio, Level Value Proportion, Combined View, or None.
Color Theme allows users to switch between different color themes.
🔶 SETTINGS
The script includes user-defined parameters to customize profiles. Each input in the indicator settings is provided with a tooltip explaining its usage.
🔹 Accumulation Map
Accumulation Map | Heatmap: Toggles the visibility of the Accumulation Profile | Heatmap.
Metric Display: Controls how accumulation metrics are displayed on the chart.
Color Theme: Switches between different color themes.
🔹 Style & Settings
High Accumulation Color and Threshold: Customize the color for zones with high accumulation, and set the percentage threshold for high accumulation areas (recommended 50%–99%).
Average Accumulation: Define the color for zones with average accumulation.
Low Accumulation: Customize the color for zones with low accumulation, with a threshold range of 10%–40%.
Number of Rows: Specify the number of rows the accumulation map will display.
Horizontal Offset: Controls the horizontal offset of the map relative to the most recent bar.
Profile Width (bars): Sets the profile width in bars.
Extend Calculation To The Right: Extends the calculation to the most recent bar
Anchor Points: Set the first and second anchor points for the map.
🔶 RELATED SCRIPTS
Money-Flow-Profile
MAP
Heat profileA trader once told me that top wicks equals sell interest and bottom wicks equals buy interest. If that's true then this indicator tries to organize and visualize this idea.
It uses transparent boxes to give the impression of a heat map. Due to limitations of my own skill and possibly pinescript it is not possible to render it in a useful manner using different colors that depicts buy and sell interests respectively. This means it works more like a volume profile in that it mixes the buy and sell interest together in the heat map. This can still be helpful because it help traders focus their attention on areas other than the current price candle.
In my limited time of using it, it seems like on the large timeframes the highlighted areas is where the price wants to go, and on small time frames the darkest areas is where the price wants to go. But i will leave it up to any user to spot and use their own patterns with the indicator.
Last but not least, the indicator only uses the last 50 candles, which can be too little on a small timeframe. Unfortunately the way i have done it this limitation is hardcoded in the script due to how pinescript works, by editing the code you can increase it. (Put max_boxes_count = x after overlay = true. Maximum number is 500)
Hope you enjoy. Have a nice day.
CommonTypesMapUtilLibrary "CommonTypesMapUtil"
Common type Container library, for central usage across other reference libraries.
ArrayBool
Fields:
v (bool )
ArrayBox
Fields:
v (box )
ArrayPoint
Fields:
v (chart.point )
ArrayColor
Fields:
v (color )
ArrayFloat
Fields:
v (float )
ArrayInt
Fields:
v (int )
ArrayLabel
Fields:
v (label )
ArrayLine
Fields:
v (line )
ArrayLinefill
Fields:
v (linefill )
ArrayString
Fields:
v (string )
ArrayTable
Fields:
v (table )
Boxes_PlotIn the world of data visualization, heatmaps are an invaluable tool for understanding complex datasets. They use color gradients to represent the values of individual data points, allowing users to quickly identify patterns, trends, and outliers in their data. In this post, we will delve into the history of heatmaps, and then discuss how its implemented.
The "Boxes_Plot" library is a powerful and versatile tool for visualizing multiple indicators on a trading chart using colored boxes, commonly known as heatmaps. These heatmaps provide a user-friendly and efficient method for analyzing the performance and trends of various indicators simultaneously. The library can be customized to display multiple charts, adjust the number of rows, and set the appropriate offset for proper spacing. This allows traders to gain insights into the market and make informed decisions.
Heatmaps with cells are interesting and useful for several reasons. Firstly, they allow for the visualization of large datasets in a compact and organized manner. This is especially beneficial when working with multiple indicators, as it enables traders to easily compare and contrast their performance. Secondly, heatmaps provide a clear and intuitive representation of the data, making it easier for traders to identify trends and patterns. Finally, heatmaps offer a visually appealing way to present complex information, which can help to engage and maintain the interest of traders.
History of Heatmaps
The concept of heatmaps can be traced back to the 19th century when French cartographer and sociologist Charles Joseph Minard used color gradients to visualize statistical data. He is well-known for his 1869 map, which depicted Napoleon's disastrous Russian campaign of 1812 using a color gradient to represent the dwindling size of Napoleon's army.
In the 20th century, heatmaps gained popularity in the fields of biology and genetics, where they were used to visualize gene expression data. In the early 2000s, heatmaps found their way into the world of finance, where they are now used to display stock market data, such as price, volume, and performance.
The boxes_plot function in the library expects a normalized value from 0 to 100 as input. Normalizing the data ensures that all values are on a consistent scale, making it easier to compare different indicators. The function also allows for easy customization, enabling users to adjust the number of rows displayed, the size of the boxes, and the offset for proper spacing.
One of the key features of the library is its ability to automatically scale the chart to the screen. This ensures that the heatmap remains clear and visible, regardless of the size or resolution of the user's monitor. This functionality is essential for traders who may be using various devices and screen sizes, as it enables them to easily access and interpret the heatmap without needing to make manual adjustments.
In order to create a heatmap using the boxes_plot function, users need to supply several parameters:
1. Source: An array of floating-point values representing the indicator values to display.
2. Name: An array of strings representing the names of the indicators.
3. Boxes_per_row: The number of boxes to display per row.
4. Offset (optional): An integer to offset the boxes horizontally (default: 0).
5. Scale (optional): A floating-point value to scale the size of the boxes (default: 1).
The library also includes a gradient function (grad) that is used to generate the colors for the heatmap. This function is responsible for determining the appropriate color based on the value of the indicator, with higher values typically represented by warmer colors such as red and lower values by cooler colors such as blue.
Implementing Heatmaps as a Pine Script Library
In this section, we'll explore how to create a Pine Script library that can be used to generate heatmaps for various indicators on the TradingView platform. The library utilizes colored boxes to represent the values of multiple indicators, making it simple to visualize complex data.
We'll now go over the key components of the code:
grad(src) function: This function takes an integer input 'src' and returns a color based on a predefined color gradient. The gradient ranges from dark blue (#1500FF) for low values to dark red (#FF0000) for high values.
boxes_plot() function: This is the main function of the library, and it takes the following parameters:
source: an array of floating-point values representing the indicator values to display
name: an array of strings representing the names of the indicators
boxes_per_row: the number of boxes to display per row
offset (optional): an integer to offset the boxes horizontally (default: 0)
scale (optional): a floating-point value to scale the size of the boxes (default: 1)
The function first calculates the screen size and unit size based on the visible chart area. Then, it creates an array of box objects representing each data point. Each box is assigned a color based on the value of the data point using the grad() function. The boxes are then plotted on the chart using the box.new() function.
Example Usage:
In the example provided in the source code, we use the Relative Strength Index (RSI) and the Stochastic Oscillator as the input data for the heatmap. We create two arrays, 'data_1' containing the RSI and Stochastic Oscillator values, and 'data_names_1' containing the names of the indicators. We then call the 'boxes_plot()' function with these arrays, specifying the desired number of boxes per row, offset, and scale.
Conclusion
Heatmaps are a versatile and powerful data visualization tool with a rich history, spanning multiple fields of study. By implementing a heatmap library in Pine Script, we can enhance the capabilities of the TradingView platform, making it easier for users to visualize and understand complex financial data. The provided library can be easily customized and extended to suit various use cases and can be a valuable addition to any trader's toolbox.
Library "Boxes_Plot"
boxes_plot(source, name, boxes_per_row, offset, scale)
Parameters:
source (float ) : - an array of floating-point values representing the indicator values to display
name (string ) : - an array of strings representing the names of the indicators
boxes_per_row (int) : - the number of boxes to display per row
offset (int) : - an optional integer to offset the boxes horizontally (default: 0)
scale (float) : - an optional floating-point value to scale the size of the boxes (default: 1)
Price Heat MapWhat does this chart show? Take the highest high and lowest low of 200 bars. Divide that into 20 chunks. The more time the price spends in one of those 1/20th pockets, the brighter it is lit up on the chart. Number of bars back can be modified to around 500. It starts to chug beyond that. Brightness level of heat map can be adjusted. 0.5 is default. 1 = brighter, 0 = dimmer. Use on any time frame. When price moves out of a hot zone, it can move very quickly. There's no trading strategy here, just something to help you visualize recent price action. The blue band shows the price at the center of the current "hottest" band. The yellow band is the ema (exponential moving average) of the price using the "bars back" input. --enjoy!
Heatmap Multi ToolThis indicator is a 32 point heat map with currently 17 indicators built in. You can adjust the normalization period of the heatmap, delta lookback, and you can invert the price scale. I have also included smoothing so that the heatmap is easier to read. Please let me know if I missed any indicator that would benefit from a heatmap view. Thank you very much for your support!
This indicator includes:
MACD
MACD Percent Rank
Slow MACD
MA Delta
Bollinger Band Width
Bollinger Band Width %
Z Score
Stochastic
RSI
RSI Delta
Normalized Price
Normalized Volume
Volume Delta
OBV
Normal Price * Volume
Momentum
ATR
ROC
Trend Angle
Open Close Trend
MFI
ROI
Inverted MACD
MapMap - an indicator that shows the highest and lowest points on the price movement road.
The calculation is based on the type of price data specified in the "Source" parameter and the length of the time interval specified in the "Length" parameter.
The indicator helps to visually find a local trend and rebound points.
Thanks for your attention!
Object: object oriented programming made possible! Hash map's in Pinescript?? Absolutely
This Library is the first step towards bringing a much needed data structure to the Pine Script community.
"Object" allows Pine coders to finally create objects full or unique key:value pairs, which are converted to strings and stored in an array. Data can be stored and accessed using dedicated get and set methods.
The workflow is simple, but has a few nuances:
0. Import this library into your project; you can give it whatever alias you'd like (I'll be using obj)
1. Create your first object using the obj.new() method and assign it a variable or "ID".
2. Use the object's ID as the first argument into the obj.set() method, for the key and value there's one extra step required. They must be added as arguments to the appropriate prop_() method.
Note: While objects in this library technically only store data as strings, any primitive data type can be converted to a string before being stored, meaning that one object can hold data from multiple types at once. There's a trade off though..Pine Script requires that all exported function parameters have pre-defined types, meaning that as convenient as it would be to have a single method for storing and returning data of every type, it's not currently possible. Instead there are functions to add properties for each individual type, which are then converted to strings automatically (the original type is flagged and stored along with the data). Furthermore, since switch/if statements can only return values of the same type, there must also be "get" methods which correspond with each type. Again, a single "get" method which auto-detects the returned value's type was the goal but it's just not currently possible. Instead each get method is only allowed to return a value of its own type. No worries though, all the "get" methods will throw errors if they can't access the data you're trying to access. In that error message, you'll be informed exactly which "get" method you need to use if you ever lose track of what type of data you should be returning.
3. The second argument for obj.set() method is the obj.prop_() method. You just plug in your key as a string and your value and you're done. Easy as that.
Please do not skip this step, properties must be formatted correctly for data to be stored and accessed correctly
4. Obj.get_ (s: string, f: float, b: bool, i: int) methods are even easier, just choose whichever method will return the data type you need, then plug in your ID, and key and that's it. Objects will output data of the same type they were stored as!
There's a short example at the end of the script if you'd like to see more!
prop_string(string: key, string: value)
returns property formatted to string and flagged as string type
prop_float(string: key, float: value)
returns property formatted to string and flagged as float type
prop_bool(string: key, bool: value)
returns property formatted to string and flagged as bool type
prop_int(string: key, int: value)
returns property formatted to string and flagged as int type
Support for lines and shapes coming soon!
new()
returns an empty object
set(string : ID, string: property)
adds new property to object
get_f(string : ID, string: key)
returns float values
get_s(string : ID, string: key)
returns string values
get_b(string : ID, string: key)
returns boolean values
get_i(string : ID, string: key)
returns int values
More methods like Obj.remove(), Obj.size(), Obj.fromString, Obj.fromArray, Obj.toJSON, Obj.keys, & Obj.values coming very soon!!
Chart Map[netguard] V1.0Chart map is a indicator that shows best levels of price.
on this indicator we divided ATH and ATL of chart to 16/32 levels that each one of them can control price and candles.
furthermore you can use weekly or daily map in this indicator.in weekly map we divide High to Low of last week candle to 8 levels that these levels can control candles too.
In general, these levels act as strong support and resistance.
you can trade on these levels with candle patterns.
New Map For TradersUsing previous principles, This setup plots 60 moving averages on the chart. The averages are colored using a normalized oscillation technique (FFT).
To achieve the same display as above, put the same indicator twice and set the 'osx' parameter of one to 0 and the other to 2.
Feel free to play with the 'mul' parameter in ranges between 1-90. Most useful ranges will be 4-16 in my opinion.
Leave me a message if you'd like to explore the behaviors of the fractal dimension further ;)
Data structure map[string, float]The script shows a workaround for map in pine-script via drawings.
There are few restrictions with them:
1. The size of the map cannot be more that amount of allowed drawings (about 40 by now)
2. Because the map shares the space of drawings throughout the whole script, using drawings with the map must be careful, with handly creating and removing of each drawing, because otherwise pine's garbage collector might break the stack. I'd recommend not using more drawings with the map.
3. setters and getters must be called on every bar, because of implementation of functions in pine there are inner serieses, which must be updated on every bar. So wherever you have a setter or getter in the code - it must be called on every bar. But if it's just an update, then you should pass 'false' as a param of the funtion.
The script shows a way to work with the map: filling it with some tickers and values for each of it and then plot the value if the symbol on the chart equals to one of the tickers in the map.
And there are some examples of updating of the value and removing of the item from the map.
DH: Grid Box Mapper For Grid TradingTHE GRID BOX MAPPER
This indicator maps out (literally puts a box around) potentially profitable grid range areas. Not only that... it highlights each grid range box (red or green) to indicate the likely trend tendency for the forthcoming price action. Rarely a day goes by when a grid trading opportunity is not waiting for you... never miss another winner!
Remember, when seeking a grid range for your trades, you are looking for a range in a sideways or upwardly trending market. This indicator presents prime spots where this potential may play out. It works with Heikin-Ashi candles (recommended) or traditional candles.
MULTIPLE RANGES DISPLAYED
Even though, I suggest a grid range from 4% to 8% on most cases, some traders prefer other range spans. For this reason, all range opportunities are exhibited so that you may evaluate each for your personalized trade preference.
TREND TENDANCY HIGHLIGHTED
If a grid box is highlighted in GREEN and meets your other criteria, you may be on your way to a successful trade. If a grid box is highlighted in RED, you should exercise caution before trading this area (it may be ok, but there is a detected trend tendency to the downside that you must consider). In addition, each grid box will update trend tendency via highlight color changes as prices and time moves forward. Do not abort an active grid trade just because a grid box changes trend colors (it may be a minor dip that adds buys that later turn to profits) . However, if you experience an extend trend change or a dramatic decline in prices, you may want to consider an exit or double check you have a stoploss or counter measure in place.
NOT ALL BOXES ARE CREATED EQUAL
This indicator is NOT a trade signal generator! As it's name implies, it is a "Grid Box Mapper." It is designed to HELP you map out where and how your next grid range might start. DO NOT assume the range indicated is the best range (the Grid Box Mapper merely suggests a range, but often you can expand or contract your range to hit support, resistance or FIB levels).
COMBINE WITH OTHER GRID INDICATORS
This indicator works best in combination with other indicators -PLUS- a thorough evaluation of the market you are entering. Alway check relevant structure, support, resistance, trend and prior price action before beginning any grid. Please consider a combination of other indicators I've created. This will help you refine your grid start parameters and opportunities. For example, this Grid Box Mapper works hand-in-glove with the GRID RANGE FINDER INDICATOR and the GRID START INDICATOR .
LESSONS IN HISTORY
There is a hidden value in this indicator if you scroll back in time and evaluate the various grid box opportunities mapped out. ASK YOURSELF: Would you have traded, why, what range and what was the outcome? You can use the Tradingview PLAYBACK feature to develop your skills at finding grid range opportunities. NOTE: The Tradingview PLAYBACK feature does not work with Heikin-Ashi candles (as a work-around, you and switch to traditional for playback).
WANT TO MASTER GRID TRADING?
Join our Crypto Grid Masters Community (Discord) for additional help and ideas with my indicators and your grids!
Automate your Grid Strategy using the Grid Bot here:
cryptogridbot.com
THIS IS A PAID INDICATOR
(currently at 50% off annual subscription)
PURCHASE or SUBSCRIBE HERE:
ez.ht
AFTER YOU'VE PURCHASED - ping me here at Tradingview with receipt number (@DanHollings) or my Discord
Any indicator you purchase will be added to the "Invite-Only" section of your indicators area at Tradingview as quickly as I can get to it.
PLEASE HIT THE LIKE BUTTON (and follow me... lots of great stuff in the works!)
As always, I appreciate your support. Please share with others.
ENJOY!
Dan Hollings
Master Crypto Grid Trader
Host of the "High Leverage Lounge"
Please Explore My Other Indicators, Scripts, Grids and Educational Ideas.
@ DanHollings on Tradingview
Crypto Grid Bot
cryptogridbot.com
Crypto Grid Master Discord
cryptogridtrader.com
Volatility Quality Zero Line MAP-- VOMVolatility Quality Zero Line MAP
15 min
30 min
1 H
2 H
4 H
6 H
8 H
12 H
1 D
Suscribe!
Coinpirate Channels BTCFrom a request to simplify the chart, here we have an easy to read map. It's built on calculated price forecast, math, geometry, historical movement, and fundamentals. Enjoy and invest wisely.
NOT INVESTMENT ADVICE. For educational and learning purposes only. BTCUSD -0.30% Bitcoin -0.30% BTC -0.30%
Heat MapHeatmap currencies. Strategy heat map can be easily found on the Internet, I will not describe here. The script did for a friend.