// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0…
- User
// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
// https://creativecommons.org/licenses/by-nc-sa/4.0/ // © BigBeluga//@version=5 indicator("Liquidity Zones [BigBeluga]", overlay = true, max_lines_count = 500)
// ---------------------------------------------------------------------------------------------------------------------} // INPUTS --------------------------------------------------------------------------------------------------------------{
int leftBars = input.int(10, "Length") int rightBars = leftBars -2 int qty_pivots = input.int(10, "Zones Amount", minval = 1, maxval = 50) string flt = input.string("Mid", "Volume Strength Filter", options = ["Low", "Mid", "High"], tooltip = "Filtering Pivots By Volume Strength") bool dynamic = input.bool(false, "Dynamic Distance", group = "Mode", tooltip = "Dynamic Distance from Pivots based on Volume Strength") bool hidePivot = input.bool(true, "Filtered Pivots")
// Color definitions color upper_col = input.color(#2370a3, "Upper", group = "Liquidity Color", inline = "L") // Blue color lower_col = input.color(#23a372, "Lower", group = "Liquidity Color", inline = "L") // Green
// Arrays to store lines and boxes var line[] lines = array.new()
var box [] boxes = array.new()// ---------------------------------------------------------------------------------------------------------------------} // CALCULATIONS --------------------------------------------------------------------------------------------------------{ // Volume Filter filter = (flt == "Low" ? 1 : flt == "Mid" ? 2 : flt == "High" ? 3 : 0) // Calculate pivot high and low series float ph = ta.pivothigh(leftBars, rightBars) series float pl = ta.pivotlow(leftBars, rightBars)
// Calculate average volume and normalize it float avg_vol = ta.sma(volume, rightBars) // avg volume on 5 bars float normalized_vol = (avg_vol-0) / ta.stdev(avg_vol, 500)
// Calculate color intensity based on normalized volume int color_intense = math.round(normalized_vol)*15 color_intense := color_intense > 100 ? 100 : color_intense
// Calculate Average True Range float aTR = ta.atr(200)
// Function to extend lines and update boxes extend_line(lineArray, boxes) => if lineArray.size() > 0 and last_bar_index-bar_index < 1500 for i = lineArray.size() - 1 to 0 by 1 x2 = line.get_x2(array.get(lineArray, i)) yValue = line.get_y1(array.get(lineArray, i))
code - Assistant
这个指标名为“Liquidity Zones [BigBeluga]”,旨在识别市场中的潜在流动性区域,以下是其特点、优点、缺点以及关于重绘情况的分析:
特点:
-
流动性区域识别: 通过检测伴随较高成交量的显著高点(Pivot High)和低点(Pivot Low),标识潜在的流动性区域。这些区域可能是价格反转或波动的关键位置。
-
成交量过滤: 提供“低”(Low)、“中”(Mid)、“高”(High)三个等级的成交量强度过滤器,用户可以根据需求筛选出具有重要意义的枢轴点。
-
动态距离调整: 可以选择启用动态距离模式(Dynamic Distance),使流动性区域与枢轴点之间的距离根据成交量强度自动调整,或者使用基于平均真实波幅(ATR)的固定距离。
-
视觉化展示: 通过在图表上绘制线条和框体来直观地展示这些流动性区域。当价格触及这些区域时,指标会更新显示,例如将线条样式变为虚线,并添加提示文字“Liquidity Grabbed”(流动性已获取)。
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.