TradingView
Trendoscope
Feb 11, 2023 2:47 AM

RSI Impact Heat Map [Trendoscope] 

Bitcoin / TetherUSBinance

Description

â‹…
Here is a simple tool to measure and display outcome of certain RSI event over heat map.

🎲 Process

🎯Event
Event can be either Crossover or Crossunder of RSI on certain value.

🎯Measuring Impact
Impact of the event after N number of bars is measured in terms of highest and lowest displacement from the last close price. Impact can be collected as either number of times of ATR or percentage of price. Impact for each trigger is recorded separately and stored in array of custom type.

🎯Plotting Heat Map

Heat map is displayed using pine tables. Users can select heat map size - which can vary from 10 to 90. Selecting optimal size is important in order to get right interpretation of data. Having higher number of cells can give more granular data. But, chart may not fit into the window. Having lower size means, stats are combined together to get less granular data which may not give right picture of the results. Default value for size is 50 - meaning data is displayed in 51X51 cells.

Range of the heat map is adjusted automatically based on min and max value of the displacement. In order to filter out or merge extreme values, range is calculated based on certain percentile of the values. This will avoid displaying lots of empty cells which can obscure the actual impact.

🎲 Settings

Settings allow users to define their event, impact duration and reference, and few display related properties. The description of these parameters are as below:


🎲 Use Cases
In this script, we have taken RSI as an example to measure impact. But, we can do this for any event. This can be price crossing over/under upper/lower bollinger bands, moving average crossovers or even complex entry or exit conditions. Overall, we can use this to plot and evaluate our trade criteria.

🎲 Interpretation

  • Q1 - If more coloured dots appear on the top right corner of the table, then the event is considered to trigger high volatility and high risk environment.
  • Q2 - If more coloured dots appear on the top left corner, then the events are considered to trigger bearish environment.
  • Q3 - If more coloured dots appear on the bottom left corner of the chart, then the events are considered insignificant as they neither generate higher displacement in positive or negative side. You can further alter outlier percentage to reduce the bracket and hence have higher distribution move towards
  • Q4 - If more coloured dots appear on the bottom right corner, then the events are considered to trigger bullish environment.


Will also look forward to implement this as library so that any conditions or events can be plugged into it.

Release Notes

â‹…
Few updates

  • Added detailed count for each quadrants.
  • Default overlay set to false
  • Highest and Lowest is considered after the impact bar.

Release Notes

â‹…
Fixed the directions so that chart will start from bottom left instead of top left. Quadrants are also marked as per the regular convention.

Release Notes

â‹…
Fixed tooltips :)

Release Notes

â‹…
Minor updates with Event data structure

Release Notes

â‹…
Updated logic for calculating plot transparency in order to increase visibility.
Comments
SPYvsGME
â‹…
Brilliant work. I wish Trading View would add more chart types. Options data would light this candle.
Trendoscope
â‹…
@SPYvsGME, thanks very much. I also made a generic library to make it reusable and available for other coders. Example program towards the end of the library.

tradingview.com/script/ZWIR7vNo-DataChart/
SPYvsGME
â‹…
@HeWhoMustNotBeNamed, this is amazing. I'm going to spend some time with it. I'll share some feedback! Thanks for sharing.
jdehorty
â‹…
Beautiful work! The ability of heatmaps to visualize large amounts of data at once is both powerful and underrated.
Trendoscope
â‹…
@jdehorty, thanks very much pal. :)
PineCoders
â‹…
KioseffTrading
â‹…
Sweet work!!
Trendoscope
â‹…
@KioseffTrading, thanks dude :)
Yelian
â‹…
Awesome work!!! I can't wait to see how this fits into my framework. Is it just me or does the interpretation you offer not vibe with the big image up top showing the quadrants along the positive and negative price impact axis? What I mean is that according to the image Q1 with high positive impact and high negative impact implies higher directionally neutral volatility but that's not what you wrote under 'interpretation' and the rest of the quadrant explanations also seem off relative to the image. Thank you again!
Trendoscope
â‹…
@Yelian, thanks mate. I might convert this to library soon so that it can be adopted to any data. May need some days.
More