OPEN-SOURCE SCRIPT
已更新 Osmosis [ChartPrime]

Osmosis is a multi indicator, multi period heatmap. Lookback periods can be mysterious as it can tend to seem very arbitrary. This tool allows users to see how price/volume reacts to short to long periods by visualizing all of the periods at the same time. This is useful because small periods are only good for short term movements while long periods are useful for long term movements. This more detailed view of market trends is analogues of multi time frame analysis. The lookback periods are arranged from bottom up, where the bottom of the indicator is the shortest period while the top is the longest period.
One major feature of this indicator is its ability to signal potential trend reversals. For example, a shift in the direction at the lower end of the heatmap can indicate a weakening of the current trend, suggesting a possible reversal. On the other hand, when the heatmap is fully saturated at all levels, it may indicate a strong trend that could be nearing a reversal point.
Another important and unique aspect of the Osmosis indicator is its automatic highlighting feature. This feature emphasizes regions within the heatmap that score exceptionally high or low, drawing attention to significant market movements or potential anomalies.
All of the indicators are normalized using min/max scaling driven by the highest highs and lows. The period of this scaling is adjustable by changing the "Lookback" parameter under settings. Delta length changes the lookback for "MA Delta" and "Volume Delta". A longer period corresponds to a smoother output. Fast Mode scales back the range of the indicator, literally halving the increment.
Here is a short description of what each input does:
Available styles include:
'MACD Histogram'

'Normalized MACD'

'Slow MACD'

'MACD Percent Rank'

'MA Delta' (Delta Length set to 2)

'BB Width'

'BB Width Percentile'

'Stochastic'

'RSI'

'True Range OSC'

'Normalized Volume'

'Volume Delta'

'True Range'

'Rate of Change' (Smoothing set to 1)

'OBV' (Smoothing set to 1)

'MFI' (Smoothing set to 1)

'Trend Angle' (Smoothing set to 2 and fast mode off)

One major feature of this indicator is its ability to signal potential trend reversals. For example, a shift in the direction at the lower end of the heatmap can indicate a weakening of the current trend, suggesting a possible reversal. On the other hand, when the heatmap is fully saturated at all levels, it may indicate a strong trend that could be nearing a reversal point.
Another important and unique aspect of the Osmosis indicator is its automatic highlighting feature. This feature emphasizes regions within the heatmap that score exceptionally high or low, drawing attention to significant market movements or potential anomalies.
All of the indicators are normalized using min/max scaling driven by the highest highs and lows. The period of this scaling is adjustable by changing the "Lookback" parameter under settings. Delta length changes the lookback for "MA Delta" and "Volume Delta". A longer period corresponds to a smoother output. Fast Mode scales back the range of the indicator, literally halving the increment.
Here is a short description of what each input does:
- Alternate Source: A choice to use a different data source for the indicator.
- Source: An option to turn on or off the alternate data source.
- Style: A selection menu to choose the visual style of the indicator.
- Lookback: Adjusts how far back in time the indicator looks for its calculations.
- Delta Length: Changes the length of time over which changes are measured.
- Fast Mode: A setting that adjusts the range of the indicator for quicker analysis.
- Enable Smoothing: A choice to smooth out the data for a cleaner look.
- Smooth: Activates the smoothing feature.
- Max Region: Highlights the highest value regions in the heatmap.
- Max Threshold: Sets the threshold for what counts as a 'max' region.
- Minimum Max Width: Determines the smallest size for a 'max' region to be highlighted.
- Max Region Color: Chooses the color for the maximum value regions.
- Max Top Line Alpha: Adjusts the transparency of the top line in max regions.
- Max Bottom Line Alpha: Adjusts the transparency of the bottom line in max regions.
- Line Width: Sets the thickness of the lines in the max regions.
- Region Start Indication: Specifies where the max region starts.
- Fill Max: Decides if the max regions should be filled with color and sets the transparency level for the color fill in max regions.
- Minimum Region: Highlights the lowest value regions in the heatmap.
- Minimum Threshold: Sets the threshold for what counts as a 'min' region.
- Minimum Minimum Width: Determines the smallest size for a 'min' region to be highlighted.
- Minimum Region Color: Chooses the color for the minimum value regions.
- Minimum Top Line Alpha: Adjusts the transparency of the top line in min regions.
- Minimum Bottom Line Alpha: Adjusts the transparency of the bottom line in min regions.
- Minimum Line Width: Sets the thickness of the lines in the min regions.
- Minimum Region Start Indication: Specifies where the min region starts.
- Fill Minimum: Decides if the min regions should be filled with color and sets the transparency level for the color fill in min regions.
- Color Presets: Provides pre-set color schemes.
- Invert Color Scale: Flips the color scale.
- Gradient Colors: Customizes individual colors for the gradient scale.
Available styles include:
'MACD Histogram'
'Normalized MACD'
'Slow MACD'
'MACD Percent Rank'
'MA Delta' (Delta Length set to 2)
'BB Width'
'BB Width Percentile'
'Stochastic'
'RSI'
'True Range OSC'
'Normalized Volume'
'Volume Delta'
'True Range'
'Rate of Change' (Smoothing set to 1)
'OBV' (Smoothing set to 1)
'MFI' (Smoothing set to 1)
'Trend Angle' (Smoothing set to 2 and fast mode off)
版本注释
Code refactor for improved understanding.版本注释
Modified defaults.开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。