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

premium indicator.pine

Похожие материалы по тегам

ares_indicator.pineTradingView · 1 общих теговgold_trend_revers.mq5MQL5 / MetaTrader 5 · 1 общих тегов!!!-mt4 x-xardg-rsi.mq5MQL5 / MetaTrader 5 · 1 общих тегов! cycle-identifier.mq5MQL5 / MetaTrader 5 · 1 общих тегов!!! rsi ma simple+arrows 1.2 (mtf).mq5MQL5 / MetaTrader 5 · 1 общих теговprecisionflowea.mq5MQL5 / MetaTrader 5 · 1 общих тегов
Вы автор или правообладатель?

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

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

О программе

Данный скрипт — индикатор для TradingView, написанный на Pine Script v6. Он отображает уровни максимума, минимума и средней цены (midpoint) за предыдущий день, неделю и месяц, получая данные с разных таймфреймов через request.security(). Каждый набор уровней рисуется отдельной линией и может быть окрашен в пользовательский цвет.

Индикатор позволяет включать или отключать отображение для каждого таймфрейма индивидуально, рисовать проекционные линии в будущее с настраиваемым смещением, а также показывать текстовые метки с числовыми значениями уровней. Встроена скользящая средняя с выбором типа (SMA, EMA, RMA, WMA, VWMA), длины и источника данных, с опциональным отображением полос Боллинджера.

В скрипте также реализована отрисовка горизонтальных ценовых линий на уровне 29 и 71, обнаружение зон ордер-блоков с информацией об объёмах и индикатор AlphaTrend с сигналами покупки/продажи и условиями оповещений TradingView.

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

НастройкаОписание
i_isDailyEnabled Включает или отключает отображение дневных уровней (высокая, низкая, средняя цена).
i_dailyColor Цвет линий и меток дневного таймфрейма.
i_isWeeklyEnabled Включает или отключает отображение недельных уровней (высокая, низкая, средняя цена).
i_weeklyColor Цвет линий и меток недельного таймфрейма.
i_isMonthlyEnabled Включает или отключает отображение месячных уровней (высокая, низкая, средняя цена).
i_monthlyColor Цвет линий и меток месячного таймфрейма.
i_show_labels Включает или отключает отображение текстовых меток с числовыми значениями уровней.
i_isLogarithmic Определяет, используется ли логарифмический масштаб графика для расчёта средней цены.
i_areHeadsEnabled Включает или отключает проекционные линии, продлевающие предыдущие максимумы и минимумы в будущее.
i_rightOffset Количество баров смещения вправо для проекционных линий в будущее.
i_show_ma Включает или отключает отображение скользящей средней на графике.
len Длина периода основной экспоненциальной скользящей средней (EMA).
src Источник данных для расчёта основной экспоненциальной скользящей средней (EMA).
i_ma_color Цвет основной экспоненциальной скользящей средней.
i_sma_color Цвет дополнительной скользящей средней (SMA/EMA на основе EMA).
i_bb_color Цвет полос Боллинджера.
offset Смещение отрисовки скользящей средней по горизонтальной оси.
maTypeInput Тип дополнительной скользящей средней: None, SMA, SMA + Bollinger Bands, EMA, SMMA (RMA), WMA или VWMA.
maLengthInput Длина периода дополнительной скользящей средней сглаживания.
bbMultInput Множитель стандартного отклонения для полос Боллинджера.
linea29_colore Цвет горизонтальной линии уровня 29.
linea29_spessore Толщина горизонтальной линии уровня 29.
linea71_colore Цвет горизонтальной линии уровня 71.
linea71_spessore Толщина горизонтальной линии уровня 71.
mostra_linea29 Включает или отключает отображение горизонтальных линий уровня 29.
mostra_linea71 Включает или отключает отображение горизонтальных линий уровня 71.
fastMA Период быстрой экспоненциальной скользящей средней.
slowMA Период медленной экспоненциальной скользящей средней.
atrLength Период расчёта ATR (Average True Range).
atrMultiplierSL Множитель ATR для расчёта уровня стоп-лосса.
tp1Multiplier Множитель ATR для расчёта первой цели (Take Profit 1).
tp2Multiplier Множитель ATR для расчёта второй цели (Take Profit 2).
tp3Multiplier Множитель ATR для расчёта третьей цели (Take Profit 3).
showInvalidated Включает или отключает отображение исторических (сломанных) зон ордер-блоков.
orderBlockVolumetricInfo Включает или отключает отображение объёмной информации внутри зон ордер-блоков.
obEndMethod Метод определения окончания зоны ордер-блока: по теневой (Wick) или по цене закрытия (Close).
swingLength Длина свинга для обнаружения формирований зон ордер-блоков. Меньшие значения находят более мелкие зоны.
zoneCount Количество отображаемых зон ордер-блоков: One, Low, Medium или High.
bullOrderBlockColor Цвет бычьих зон ордер-блоков.
bearOrderBlockColor Цвет медвежьих зон ордер-блоков.
textColor Цвет текста в зонах ордер-блоков.
coeff Множитель ATR для расчёта границ AlphaTrend.
AP Общий период для расчёта скользящей средней и AlphaTrend.
asrc Источник данных для расчёта AlphaTrend.
showsignalsk Включает или отключает отображение сигналов покупки и продажи на графике.
novolumedata При включении расчёт AlphaTrend выполняется без использования данных об объёме.
Получить полный код

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

indicator('Displays the High, Midpoint, and Low of the Previous Month, Week, and Day + Moving Average', 'High/Mid/Low of the Previous Month, Week and Day + MA', true, max_lines_count = 500)

var DAILY_LINE_STYLE = line.style_solid
var DAILY_LINE_WITDH = 1
var WEEKLY_LINE_STYLE = line.style_solid
var WEEKLY_LINE_WIDTH = 1
var MONTHLY_LINE_STYLE = line.style_solid
var MONTHLY_LINE_WIDTH = 1
var MID_LINE_STYLE = line.style_dashed
var MID_LINE_WIDTH = 1
var LABEL_HIGH_STYLE  = label.style_label_lower_left
var LABEL_LOW_STYLE  = label.style_label_upper_left
var LABEL_MID_STYLE  = label.style_label_left
var LABEL_SIZE  = size.small
var LABEL_TEXT_COLOR = color.white
var STR_MONTHLY = "Monthly"
var STR_WEEKLY = "Weekly"
var STR_DAILY = "Daily"

g_indicator = 'Highs & Lows'
g_style = 'Style'
t_heads = 'Extends previous highs and lows in the future.'
t_gradient = 'Show a color gradient that highlights the recency of highs and lows.'

var i_isDailyEnabled = input(true, 'Daily', inline = 'Daily', group = g_indicator)
var i_dailyColor = input(color.blue, '', inline = 'Daily', group = g_indicator)

var i_isWeeklyEnabled = input(true, 'Weekly', inline = 'Weekly', group = g_indicator)
var i_weeklyColor = input(color.teal, '', inline = 'Weekly', group = g_indicator)

var i_isMonthlyEnabled = input(true, 'Monthly', inline = 'Monthly', group = g_indicator)
var i_monthlyColor = input(color.red, '', inline = 'Monthly', group = g_indicator)

var i_show_labels = input.bool(false, title="Show Labels?", group = g_indicator)
var i_isLogarithmic = input.bool(false, title="Is Chart in Logarithmic Scale?", group = g_indicator)
var i_areHeadsEnabled = input(true, 'Show Projections', t_heads, inline = 'Head', group = g_style)
var i_rightOffset = input.int(25, '', 1, inline = 'Head', group = g_style)

var a_lastHighs = array.new_float(3)
var a_lastLows = array.new_float(3)
var a_lastMids = array.new_float(3)
var canShowDaily = i_isDailyEnabled and timeframe.isintraday
var canShowWeekly = i_isWeeklyEnabled and (timeframe.isintraday or timeframe.isdaily)
var canShowMonthly = i_isMonthlyEnabled and not timeframe.ismonthly

[dailyTime, dailyHigh, dailyLow, dailyMid, isLastDaily] = request.security(syminfo.tickerid, 'D', [time, high, low, i_isLogarithmic? math.exp((math.log(high) + math.log(low)) / 2) : (high - low) / 2 + low, barstate.islast], lookahead = barmerge.lookahead_on)
[weeklyTime, weeklyHigh, weeklyLow, weeklyMid, isLastWeekly] = request.security(syminfo.tickerid, 'W', [time, high, low, i_isLogarithmic? math.exp((math.log(high) + math.log(low)) / 2) : (high - low) / 2 + low, barstate.islast], lookahead = barmerge.lookahead_on)
[monthlyTime, monthlyHigh, monthlyLow, monthlyMid, isLastMonthly] = request.security(syminfo.tickerid, 'M', [time, high, low, i_isLogarithmic? math.exp((math.log(high) + math.log(low)) / 2) : (high - low) / 2 + low, barstate.islast], lookahead = barmerge.lookahead_on)

hasDailyTimeChanged = dailyTime != dailyTime[1]
hasWeekklyTimeChanged = weeklyTime != weeklyTime[1]
hasMonthlyTimeChanged = monthlyTime != monthlyTime[1]

f_getRightBarIndex() =>
    bar_index + i_rightOffset

f_draw(bool _isNew, float _h, float _l, float _m, color _color, string _style, string _midStyle, int _width, int _midWidth) =>
    var line _high = na
    var line _low = na
    var line _mid = na
    var _highs = array.new_line()
    var _lows = array.new_line()
    var _mids = array.new_line()

    _end = i_areHeadsEnabled ? f_getRightBarIndex() : bar_index

    if _isNew
        line.set_x2(_high, _end)
        line.set_x2(_mid, _end)
        line.set_x2(_low, _end)

        _high := line.new(bar_index, _h, bar_index, _h, color = _color, style = _style, width = _width)
        _mid := line.new(bar_index, _m, bar_index, _m, color = _color, style = _midStyle, width = _midWidth)
        _low := line.new(bar_index, _l, bar_index, _l, color = _color, style = _style, width = _width)        
        array.push(_highs, _high)
        array.push(_mids, _mid)
        array.push(_lows, _low)        

        if array.size(_highs) > 2
            line.delete(array.shift(_highs))
            line.delete(array.shift(_mids))
            line.delete(array.shift(_lows))

    if i_areHeadsEnabled and barstate.islast and array.size(_highs) > 1

        for i = 0 to array.size(_highs) - 2 by 1
            line.set_x2(array.get(_highs, i), f_getRightBarIndex())
            line.set_x2(array.get(_mids, i), f_getRightBarIndex())
            line.set_x2(array.get(_lows, i), f_getRightBarIndex())

f_show_labels() =>
    var label _lbl_m_high = na
    var label _lbl_m_mid = na
    var label _lbl_m_low = na
    var label _lbl_w_high = na
    var label _lbl_w_mid = na
    var label _lbl_w_low = na
    var label _lbl_d_high = na
    var label _lbl_d_mid = na
    var label _lbl_d_low = na

    var _lbl_m_highs = array.new_label()
    var _lbl_m_mids = array.new_label()
    var _lbl_m_lows = array.new_label()
    var _lbl_w_highs = array.new_label()
    var _lbl_w_mids = array.new_label()
    var _lbl_w_lows = array.new_label()
    var _lbl_d_highs = array.new_label()
    var _lbl_d_mids = array.new_label()
    var _lbl_d_lows = array.new_label()

    _end = i_areHeadsEnabled ? f_getRightBarIndex() : bar_index

    _lbl_m_high := label.new(_end, array.get(a_lastHighs, 2), text=STR_MONTHLY+" High [ "+str.tostring(array.get(a_lastHighs, 2), "#.#####")+" ]", style=LABEL_HIGH_STYLE, color=i_monthlyColor, textcolor=LABEL_TEXT_COLOR, size = LABEL_SIZE)
    _lbl_m_mid := label.new(_end, array.get(a_lastMids, 2), text="50% "+STR_MONTHLY+" [ "+str.tostring(array.get(a_lastMids, 2), "#.#####")+" ]", style=LABEL_MID_STYLE, color=i_monthlyColor, textcolor=LABEL_TEXT_COLOR, size = LABEL_SIZE)
    _lbl_m_low := label.new(_end, array.get(a_lastLows, 2), text=STR_MONTHLY+" Low [ "+str.tostring(array.get(a_lastLows, 2), "#.#####")+" ]", style=LABEL_LOW_STYLE, color=i_monthlyColor, textcolor=LABEL_TEXT_COLOR, size = LABEL_SIZE)
    _lbl_w_high := label.new(_end, array.get(a_lastHighs, 1), text=STR_WEEKLY+" High [ "+str.tostring(array.get(a_lastHighs, 1), "#.#####")+" ]", style=LABEL_HIGH_STYLE, color=i_weeklyColor, textcolor=LABEL_TEXT_COLOR, size = LABEL_SIZE)
    _lbl_w_mid := label.new(_end, array.get(a_lastMids, 1), text="50% "+STR_WEEKLY+" [ "+str.tostring(array.get(a_lastMids, 1), "#.#####")+" ]", style=LABEL_MID_STYLE, color=i_weeklyColor, textcolor=LABEL_TEXT_COLOR, size = LABEL_SIZE)
    _lbl_w_low := label.new(_end, array.get(a_lastLows, 1), text=STR_WEEKLY+" Low [ "+str.tostring(array.get(a_lastLows, 1), "#.#####")+" ]", style=LABEL_LOW_STYLE, color=i_weeklyColor, textcolor=LABEL_TEXT_COLOR, size = LABEL_SIZE)
    _lbl_d_high := label.new(_end, array.get(a_lastHighs, 0), text=STR_DAILY+" High [ "+str.tostring(array.get(a_lastHighs, 0), "#.#####")+" ]", style=LABEL_HIGH_STYLE, color=i_dailyColor, textcolor=LABEL_TEXT_COLOR, size = LABEL_SIZE)
    _lbl_d_mid := label.new(_end, array.get(a_lastMids, 0), text="50% "+STR_DAILY+" [ "+str.tostring(array.get(a_lastMids, 0), "#.#####")+" ]", style=LABEL_MID_STYLE, color=i_dailyColor, textcolor=LABEL_TEXT_COLOR, size = LABEL_SIZE)
    _lbl_d_low := label.new(_end, array.get(a_lastLows, 0), text=STR_DAILY+" Low [ "+str.tostring(array.get(a_lastLows, 0), "#.#####")+" ]", style=LABEL_LOW_STYLE, color=i_dailyColor, textcolor=LABEL_TEXT_COLOR, size = LABEL_SIZE)

    array.push(_lbl_m_highs, _lbl_m_high)
    array.push(_lbl_m_mids, _lbl_m_mid)
    array.push(_lbl_m_lows, _lbl_m_low)
    array.push(_lbl_w_highs, _lbl_w_high)
    array.push(_lbl_w_mids, _lbl_w_mid)
    array.push(_lbl_w_lows, _lbl_w_low)
    array.push(_lbl_d_highs, _lbl_d_high)
    array.push(_lbl_d_mids, _lbl_d_mid)
    array.push(_lbl_d_lows, _lbl_d_low)

    if array.size(_lbl_m_highs) > 1
        label.delete(array.shift(_lbl_m_highs))
        label.delete(array.shift(_lbl_m_mids))
        label.delete(array.shift(_lbl_m_lows))
        label.delete(array.shift(_lbl_w_highs))
        label.delete(array.shift(_lbl_w_mids))
        label.delete(array.shift(_lbl_w_lows))
        label.delete(array.shift(_lbl_d_highs))
        label.delete(array.shift(_lbl_d_mids))
        label.delete(array.shift(_lbl_d_lows))

if canShowDaily and hasDailyTimeChanged and not isLastDaily
    array.set(a_lastHighs, 0, dailyHigh)
    array.set(a_lastLows, 0, dailyLow)
    array.set(a_lastMids, 0, dailyMid)

if canShowWeekly and hasWeekklyTimeChanged and not isLastWeekly
    array.set(a_lastHighs, 1, weeklyHigh)
    array.set(a_lastLows, 1, weeklyLow)
    array.set(a_lastMids, 1, weeklyMid)

if canShowMonthly and hasMonthlyTimeChanged and not isLastMonthly
    array.set(a_lastHighs, 2, monthlyHigh)
    array.set(a_lastLows, 2, monthlyLow)
    array.set(a_lastMids, 2, monthlyMid)

if canShowMonthly
    f_draw(hasMonthlyTimeChanged, monthlyHigh, monthlyLow, monthlyMid, i_monthlyColor, MONTHLY_LINE_STYLE, MID_LINE_STYLE, MONTHLY_LINE_WIDTH, MID_LINE_WIDTH)

if canShowWeekly
    f_draw(hasWeekklyTimeChanged, weeklyHigh, weeklyLow, weeklyMid, i_weeklyColor, WEEKLY_LINE_STYLE, MID_LINE_STYLE, WEEKLY_LINE_WIDTH, MID_LINE_WIDTH)

if canShowDaily
    f_draw(hasDailyTimeChanged, dailyHigh, dailyLow, dailyMid, i_dailyColor, DAILY_LINE_STYLE, MID_LINE_STYLE, DAILY_LINE_WITDH, MID_LINE_WIDTH)

if i_show_labels
    f_show_labels()

plot(array.get(a_lastHighs, 0), 'DH', color.new(i_dailyColor, 100), editable = false, display = i_show_labels? display.none : display.price_scale)
plot(array.get(a_lastLows, 0), 'DL', color.new(i_dailyColor, 100), editable = false, display = i_show_labels? display.none : display.price_scale)
plot(array.get(a_lastMids, 0), 'DM', color.new(i_dailyColor, 100), editable = false, display = i_show_labels? display.none : display.price_scale)
plot(array.get(a_lastHighs, 1), 'WH', color.new(i_weeklyColor, 100), editable = false, display = i_show_labels? display.none : display.price_scale)
plot(array.get(a_lastLows, 1), 'WL', color.new(i_weeklyColor, 100), editable = false, display = i_show_labels? display.none : display.price_scale)
plot(array.get(a_lastMids, 1), 'WM', color.new(i_weeklyColor, 100), editable = false, display = i_show_labels? display.none : display.price_scale)
plot(array.get(a_lastHighs, 2), 'MH', color.new(i_monthlyColor, 100), editable = false, display = i_show_labels? display.none : display.price_scale)
plot(array.get(a_lastLows, 2), 'ML', color.new(i_monthlyColor, 100), editable = false, display = i_show_labels? display.none : display.price_scale)
plot(array.get(a_lastMids, 2), 'MM', color.new(i_monthlyColor, 100), editable = false, display = i_show_labels? display.none : display.price_scale)

g_period = 'Period'
g_ma_style = 'Moving Average Style'
var i_show_ma = input.bool(false, title="Show Moving Average?", group = g_period)
len = input.int(14, minval=1, title="Length", group = g_period)
src = input(hlc3, title="Source", group = g_period)
var i_ma_color = input(color.new(color.black,75), '', tooltip = "simple ma color", group = g_ma_style)
var i_sma_color = input(color.new(color.blue,50), '', tooltip = "ema color", group = g_ma_style)
var i_bb_color = input(color.new(color.green,90), '', tooltip = "bollinger band color", group = g_ma_style)
offset = input.int(title="Offset", defval=0, minval=-500, maxval=500, display = display.data_window, group = g_period)
out = ta.ema(src, len)
plot(i_show_ma ? out : na, title="EMA", color=i_ma_color, offset=offset)

GRP = "Moving Average"
TT_BB = "Only applies when 'SMA + Bollinger Bands' is selected. Determines the distance between the SMA and the bands."
maTypeInput = input.string("None", "Type", options = ["None", "SMA", "SMA + Bollinger Bands", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group = GRP, display = display.data_window)
maLengthInput = input.int(26, "Length", group = GRP, display = display.data_window)
bbMultInput = input.float(2.0, "BB StdDev", minval = 0.001, maxval = 50, step = 0.5, tooltip = TT_BB, group = GRP, display = display.data_window)
var enableMA = maTypeInput != "None"
var isBB = maTypeInput == "SMA + Bollinger Bands"

ma(source, length, MAtype) =>
	switch MAtype
		"SMA"                   => ta.sma(source, length)
		"SMA + Bollinger Bands" => ta.sma(source, length)
		"EMA"                   => ta.ema(source, length)
		"SMMA (RMA)"            => ta.rma(source, length)
		"WMA"                   => ta.wma(source, length)
		"VWMA"                  => ta.vwma(source, length)

smoothingMA = i_show_ma and enableMA ? ma(out, maLengthInput, maTypeInput) : na
smoothingStDev = isBB ? ta.stdev(out, maLengthInput) * bbMultInput : na
plot(smoothingMA, "EMA-based MA", color=i_sma_color, display = enableMA ? display.all : display.none)
bbUpperBand = plot(smoothingMA + smoothingStDev, title = "Upper Bollinger Band", color=i_bb_color, display = isBB ? display.all : display.none)
bbLowerBand = plot(smoothingMA - smoothingStDev, title = "Lower Bollinger Band", color=i_bb_color, display = isBB ? display.all : display.none)
fill(bbUpperBand, bbLowerBand, color= isBB ? i_bb_color : na, title="Bollinger Bands Background Fill", display = isBB ? display.all : display.none)

linea29_colore = input.color(color.blue, title = 'Colore Linea 29')
linea29_spessore = input.int(1, title = 'Spessore Linea 29')
linea71_colore = input.color(color.black, title = 'Colore Linea 71')
linea71_spessore = input.int(1, title = 'Spessore Linea 71')

mostra_linea29 = input.bool(true, title = 'Mostra Linea 29')
mostra_linea71 = input.bool(true, title = 'Mostra Linea 71')

f_traccia_linee(prezzo_iniziale, diviso_per, spessore, colore, livello) =>
    valore_diviso = int(prezzo_iniziale / diviso_per) * diviso_per
    for i = -2 to 2 by 1
        livello_corrente = valore_diviso + i * diviso_per

        line.new(x1 = bar_index, y1 = livello_corrente, x2 = bar_index + 1, y2 = livello_corrente, color = colore, width = spessore, extend = extend.both)

        label_text = (livello == 29 ? 'Linea 29: ' : 'Linea 71: ') + str.tostring(livello_corrente)

        label.new(x = bar_index + 1, y = livello_corrente, text = label_text, style = label.style_label_left, color = colore, textcolor = color.white, size = size.small)

prezzo_corrente = close

if mostra_linea29
    f_traccia_linee(prezzo_corrente, 29, linea29_spessore, linea29_colore, 29)

if mostra_linea71
    f_traccia_linee(prezzo_corrente, 71, linea71_spessore, linea71_colore, 71)

fastMA = input(10, title="Fast MA")

slowMA = input(30, title="Slow MA")

atrLength = input(14, title="ATR Length")

atrMultiplierSL = input.float(1.5, title="ATR Stop Multiplier")

tp1Multiplier = input.float(0.5, title="TP1 Multiplier")

tp2Multiplier = input.float(1.0, title="TP2 Multiplier")

tp3Multiplier = input.float(1.5, title="TP3 Multiplier")

fastMA_val = ta.ema(close, fastMA)

slowMA_val = ta.ema(close, slowMA)

atr_val = ta.atr(atrLength)

longCondition = ta.crossover(fastMA_val, slowMA_val)

shortCondition = ta.crossunder(fastMA_val, slowMA_val)

longStopLoss = close - (atr_val * atrMultiplierSL)

shortStopLoss = close + (atr_val * atrMultiplierSL)

longTP1 = close + (atr_val * tp1Multiplier)

longTP2 = close + (atr_val * tp2Multiplier)

longTP3 = close + (atr_val * tp3Multiplier)

shortTP1 = close - (atr_val * tp1Multiplier)

shortTP2 = close - (atr_val * tp2Multiplier)

shortTP3 = close - (atr_val * tp3Multiplier)

signalColor = #32CD32 // Lime Green (for Signal)

tpColor = #008000 // Green (for TP columns)

strengthColor = #000000 // Black (for Strength columns)

slColor = #008000 // Green (for Stop Loss)

transparentColor = color.rgb(0, 0, 0, 0)  // Fully transparent color

var table myTable = table.new(position.top_right, 2, 7, border_width=1, frame_color=color.black, bgcolor=transparentColor)

buyerStrength = (close > open) ? volume : 0

sellerStrength = (close < open) ? volume : 0

if (longCondition)

    table.cell(myTable, 0, 0, "Signal", bgcolor=signalColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 0, "Long", bgcolor=signalColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 1, "TP1", bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 1, str.tostring(longTP1), bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 2, "TP2", bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 2, str.tostring(longTP2), bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 3, "TP3", bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 3, str.tostring(longTP3), bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 4, "Buyers Strength", bgcolor=strengthColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 4, str.tostring(buyerStrength), bgcolor=strengthColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 5, "Sellers Strength", bgcolor=strengthColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 5, str.tostring(sellerStrength), bgcolor=strengthColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 6, "Stop Loss", bgcolor=slColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 6, str.tostring(longStopLoss), bgcolor=slColor, text_color=color.white, text_size=size.tiny)

if (shortCondition)

    table.cell(myTable, 0, 0, "Signal", bgcolor=signalColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 0, "Short", bgcolor=signalColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 1, "TP1", bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 1, str.tostring(shortTP1), bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 2, "TP2", bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 2, str.tostring(shortTP2), bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 3, "TP3", bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 3, str.tostring(shortTP3), bgcolor=tpColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 4, "Buyers Strength", bgcolor=strengthColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 4, str.tostring(buyerStrength), bgcolor=strengthColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 5, "Sellers Strength", bgcolor=strengthColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 5, str.tostring(sellerStrength), bgcolor=strengthColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 0, 6, "Stop Loss", bgcolor=slColor, text_color=color.white, text_size=size.tiny)

    table.cell(myTable, 1, 6, str.tostring(shortStopLoss), bgcolor=slColor, text_color=color.white, text_size=size.tiny)

const bool DEBUG = false

const int maxBoxesCount = 500

const float overlapThresholdPercentage = 0

const int maxDistanceToLastBar = 1750 // Affects Running Time

const int maxOrderBlocks = 30

showInvalidated = input.bool(true, "Show Historic Zones", group = "General Configuration", display = display.none)

OBsEnabled = true

orderBlockVolumetricInfo = input.bool(true, "Volumetric Info", group = "General Configuration", inline="EV", display = display.none)

obEndMethod = input.string("Wick", "Zone Invalidation", options = ["Wick", "Close"],  group = "General Configuration", display = display.none)

combineOBs = DEBUG ? input.bool(true, "Combine Zones", group = "General Configuration", display = display.none) : true

maxATRMult = DEBUG ? input.float(3.5,"Max Atr Multiplier", group = "General Configuration") : 3.5

swingLength = input.int(10, 'Swing Length', minval = 3, tooltip="Swing length is used when finding order block formations. Smaller values will result in finding smaller order blocks.",group = "General Configuration", display = display.none)

zoneCount = input.string("Low", 'Zone Count', options = ["High", "Medium", "Low", "One"], tooltip = "Number of Order Block Zones to be rendered. Higher options will result in older Order Blocks shown.",  group = "General Configuration", display = display.none)

bullOrderBlockColor = input(#08998180, 'Bullish', inline = 'obColor', group = 'General Configuration', display = display.none)

bearOrderBlockColor = input(#f2364680, 'Bearish', inline = 'obColor', group = 'General Configuration', display = display.none)

bullishOrderBlocks = zoneCount == "One" ? 1 : zoneCount == "Low" ? 3 : zoneCount == "Medium" ? 5 : 10

bearishOrderBlocks = zoneCount == "One" ? 1 : zoneCount == "Low" ? 3 : zoneCount == "Medium" ? 5 : 10

timeframe1Enabled = true

timeframe1 = ""

textColor = input.color(#ffffff80, "Text Color", group = "Style")

extendZonesBy = DEBUG ? input.int(15, "Extend Zones", group = "Style", minval = 1, maxval = 30, inline = "ExtendZones") : 15

extendZonesDynamic = DEBUG ? input.bool(true, "Dynamic", group = "Style", inline = "ExtendZones") : true

combinedText = DEBUG ? input.bool(false, "Combined Text", group = "Style", inline = "CombinedColor") : false

volumeBarsPlace = DEBUG ? input.string("Left", "Show Volume Bars At", options = ["Left", "Right"], group = "Style", inline = "volumebars") : "Left"

mirrorVolumeBars = DEBUG ? in

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

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

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

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

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

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

Стоимость полного кода
3 452,60₽ ≈ $42.19