← К каталогу
Исходный код · ID 3703

Volumatic Fair Value Gaps [BigBeluga]

volumatic fair value gaps@free_fx_pro_5924829611564210276.pine
Вы автор или правообладатель?

Сообщите нам, если считаете, что материал размещён без разрешения.

Краткий обзор

О программе

Volumatic Fair Value Gaps [BigBeluga] — это индикатор для TradingView, который отображает на графике бычьи и медвежьи Fair Value Gaps (FVGs) в виде цветных прямоугольников. Индикатор рассчитывает FVG на основе соотношения цен текущей и двух баров назад, применяя фильтр по размеру разрыва. Для определения объёмов внутри FVG используется данные более низкого таймфрейма через request.security_lower_tf().

Индикатор поддерживает визуализацию объёмных полос внутри каждого FVG, показывающих долю бычьего и медвежьего объёма. При срабатывании условия митигации (цена возвращается в зону FVG) прямоугольники автоматически удаляются. Также отображается дашборд с информацией о количестве и суммарном объёме активных FVG.

Индикатор работает в режиме оверлея поверх ценового графика. Пользователь может настраивать источник митигации, отображение бычьих/медвежьих FVG, объёмные полосы и цвета. В коде присутствует ссылка на Telegram-канал в верхней части графика.

Настройки программы

НастройкаОписание
mitigationSrc Источник митигации FVG — Источник данных для определения условия митигации FVG: close (цена закрытия) или high/low (максимум/минимум).
bullGaps Бычий FVG — Включает или отключает отображение бычьих Fair Value Gaps на графике.
bearGaps Медвежий FVG — Включает или отключает отображение медвежьих Fair Value Gaps на графике.
volumeBars Объёмные полосы — Включает или отключает отображение объёмных полос и процентных значений внутри FVG.
bullColor Бычий цвет — Цвет бычьего FVG и связанных элементов на графике.
bearColor Медвежий цвет — Цвет медвежьего FVG и связанных элементов на графике.
Получить полный код

Поиск по коду файла

indicator("Volumatic Fair Value Gaps [BigBeluga]", overlay = true, max_boxes_count = 500, max_bars_back = 5000)

string mitigationSrc = input.string("close", "FVGs Mitigation Source", ["close", "high/low"])

bool bullGaps   = input.bool(true, "Bullish FVG")
bool bearGaps   = input.bool(true, "Bearish FVG")
bool volumeBars = input.bool(true, "Volume Bars")

color bullColor = input.color(color.rgb(26, 194, 216, 50), "Bullish", inline = "colors")
color bearColor = input.color(color.rgb(216, 118, 26, 50), "Bearish", inline = "colors")

type VolumaticFVG
    box  body 
    int  bull 
    int  bear 
    bool isBull
    box  bullBar
    box  bearBar
    float totalVol

var fvgs  = array.new<VolumaticFVG>()
var boxes = array.new<box>()

float diff      =  close[1] > open[1] ? (low - high[2]) / low * 100 : (low[2] - high) / high *100
float sizeFVG   = diff / ta.percentile_nearest_rank(diff, 1000, 100) * 100
bool  filterFVG = sizeFVG > 10

bool isBull_gap = high[2] < low and high[2] < high[1] and low[2] < low and filterFVG
bool isBear_gap = low[2] > high and low[2] > low[1] and high[2] > high  and filterFVG

time_ = timeframe.in_seconds("")/60
time_s = timeframe.in_seconds("")
div   = 10

tf = time_ <= 1 ? "5S" : str.tostring(math.ceil(time_/div))

array<float> BullVolume = request.security_lower_tf('', tf, (close > open ? volume : 0))
array<float> BearVolume = request.security_lower_tf('', tf, (close < open ? volume : 0))

sumBull = BullVolume.sum()
sumBear = BearVolume.sum()
float totalVolume       = sumBull + sumBear

var dash = table.new(position.top_right, 100, 100, chart.bg_color)

if bar_index > 100

    if isBull_gap and bullGaps
        body    = box.new(bar_index-1, low, bar_index+5, high[2], bgcolor = color.new(bullColor, 70), border_color = na)
        mid     = math.avg(low, high[2])
        bullVol = (sumBull[1] / totalVolume[1]) * 100
        bearVol = (sumBear[1] / totalVolume[1]) * 100
        bearBar = box.new(body.get_left(), body.get_top(), body.get_left(), mid, bgcolor = bearColor, border_color = chart.bg_color)
        bullBar = box.new(body.get_left(), mid, body.get_left(), body.get_bottom(), bgcolor = bullColor, border_color = chart.bg_color)

        fvgs.push(VolumaticFVG.new(body, int(bullVol), int(bearVol), true, bullBar, bearBar, totalVolume[1]))

    if isBear_gap and bearGaps
        body    = box.new(bar_index-1, low[2], bar_index+5, high, bgcolor = color.new(bearColor, 70), border_color = na)
        mid     = math.avg(low[2], high)
        bullVol = (sumBull[1] / totalVolume[1]) * 100
        bearVol = (sumBear[1] / totalVolume[1]) * 100
        bearBar = box.new(body.get_left(), body.get_top(), body.get_left(), mid, bgcolor = bearColor, border_color = chart.bg_color)
        bullBar = box.new(body.get_left(), mid, body.get_left(), body.get_bottom(), bgcolor = bullColor, border_color = chart.bg_color)

        fvgs.push(VolumaticFVG.new(body, int(bullVol), int(bearVol), false, bullBar, bearBar, totalVolume[1]))

    if fvgs.size() > 0 

        for fvg in fvgs

            src1 = mitigationSrc == "close" ? close : low
            src2 = mitigationSrc == "close" ? close : high

            left  = fvg.body.get_left()
            right = fvg.body.get_right()

            if fvg.isBull
                if src1 < fvg.body.get_bottom() 
                    fvg.body.delete()
                    fvg.bullBar.delete()
                    fvg.bearBar.delete()
              

Показано первые 50% кода (символов: 4908)

Открыть по тарифу

Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.

Разовая покупка файла

На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.

Чтобы оформить заказ, введите email и перейдите к оплате.

Стоимость полного кода
490,80₽ ≈ $6.00