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

Smart Money Trades Pro

indicator smart money trades pro for tradingview.pine

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

#__slope direction line.mq5MQL5 / MetaTrader 5 · 1 общих теговrange breakout @meowforex1.pineTradingView · 1 общих тегов#1.mtf_collider_h4_close_13_v18bar.mq4MQL4 / MetaTrader 4 · 1 общих тегов!mth_fasttmaline_edit3.mq4MQL4 / MetaTrader 4 · 1 общих тегов!mth_fasttmaline_edit2.mq4MQL4 / MetaTrader 4 · 1 общих тегов!mth_fasttmaline_edit.mq4MQL4 / MetaTrader 4 · 1 общих тегов
Вы автор или правообладатель?

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

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

О программе

Индикатор Smart Money Trades Pro для TradingView (Pine Script v5) анализирует рыночную структуру и отображает сигналы разрыва структуры на графике в режиме реального времени. Он определяет точки разворота свечей (swing points) за заданный период и фиксирует пробои уровней высоких и низких свечей с подтверждением по телу или по тени. При обнаружении изменения направления тренда индикатор отрисовывает графические отметки, линии уровней и цветные свечи. При активной торговой позиции рассчитываются три уровня фиксации прибыли и стоп-лосс на основе среднестатистического диапазона движения, а также отображается информационная таблица с текущими параметрами сделки.

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

НастройкаОписание
structurePeriod Период определения структуры — Количество баров для обнаружения точек разворота свечей (swing points).
confirmationType Тип подтверждения пробоя — Способ подтверждения пробоя уровня: по телу свечи или по тени.
showCHoCH Отображение изменения характера — Показывать сигнал CHoCH при смене направления тренда.
showTrendBars Цветовая индикация баров тренда — Окрашивать свечи в зависимости от текущего направления рыночной структуры.
showTable Показать информационную таблицу — Отображать таблицу с текущей информацией о торговой позиции.
tablePosition Позиция таблицы — Расположение информационной таблицы на графике: верхний левый, верхний правый, нижний левый или нижний правый угол.
bullColor Цвет бычьего сигнала — Цвет для обозначения бычьих сигналов и направления вверх.
bearColor Цвет медвежьего сигнала — Цвет для обозначения медвежьих сигналов и направления вниз.
neutralColor Цвет нейтрального состояния — Цвет свечей в нейтральном состоянии без определённого тренда.
successColor Цвет успешных уровней — Цвет для обозначения уровней фиксации прибыли и успешных сигналов.
dangerColor Цвет уровней риска — Цвет для обозначения стоп-лосса и уровней риска.
bgColor Фон таблицы — Цвет фона информационной таблицы.
textColor Цвет текста таблицы — Цвет текста в информационной таблице.
Получить полный код

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

indicator("Smart Money Trades Pro", overlay=true, max_lines_count=500)

structurePeriod = input.int(20, "Structure Detection Period", minval=5, maxval=50, tooltip="Lookback period for swing point detection")

confirmationType = input.string("Body", "Break Confirmation", options=["Body", "Wick"], tooltip="Use candle body or wick for break confirmation")

showCHoCH = input.bool(true, "Display Change of Character", tooltip="Show CHoCH when trend changes")

showTrendBars = input.bool(true, "Color Trend Bars", tooltip="Color candles based on market structure trend")

showTable = input.bool(true, "Show Info Table", tooltip="Display current trade information table")

tablePosition = input.string("Top Right", "Table Position", options=["Top Left", "Top Right", "Bottom Left", "Bottom Right"])

bullColor = input.color(#26A69A, "Bullish", group="Colors")

bearColor = input.color(#EF5350, "Bearish", group="Colors")

neutralColor = input.color(#9E9E9E, "Neutral", group="Colors")

successColor = input.color(#4CAF50, "Success/TP", group="Colors")

dangerColor = input.color(#F44336, "Danger/SL", group="Colors")

bgColor = input.color(color.new(#1E1E1E, 95), "Table Background", group="Colors")

textColor = input.color(color.white, "Table Text", group="Colors")

getMarketStructure() =>

    var float lastHigh = na

    var float lastLow = na

    var int lastHighBar = na

    var int lastLowBar = na

    var int trendDirection = 0

    var bool highBreakPending = false

    var bool lowBreakPending = false

    swingHigh = ta.pivothigh(high, structurePeriod, structurePeriod)

    swingLow = ta.pivotlow(low, structurePeriod, structurePeriod)

    if not na(swingHigh)

        lastHigh := swingHigh

        lastHighBar := bar_index - structurePeriod

        highBreakPending := true

    if not na(swingLow)

        lastLow := swingLow

        lastLowBar := bar_index - structurePeriod

        lowBreakPending := true

    breakPrice = confirmationType == "Body" ? close : (trendDirection > 0 ? high : low)

    highBroken = false

    lowBroken = false

    if highBreakPending and not na(lastHigh)

        if (confirmationType == "Body" and close > lastHigh) or (confirmationType == "Wick" and high > lastHigh)

            highBroken := true

            highBreakPending := false

    if lowBreakPending and not na(lastLow)

        if (confirmationType == "Body" and close < lastLow) or (confirmationType == "Wick" and low < lastLow)

            lowBroken := true

            lowBreakPending := false

    prevTrend = trendDirection

    if highBroken

        trendDirection := 1

    else if lowBroken

        trendDirection := -1

    isChoch = (prevTrend == -1 and trendDirection == 1) or (prevTrend == 1 and trendDirection == -1)

    [highBroken, lowBroken, lastHigh, lastLow, lastHighBar, lastLowBar, trendDirection, isChoch]

[bullBreak, bearBreak, structHigh, structLow, highBar, lowBar, trend, chochSignal] = getMarketStructure()

var float entryLevel = na

var float tp1Level = na

var float tp2Level = na

var float tp3Level = na

var float stopLevel = na

var int tradeDirection = 0

var bool tp1Hit = false

var bool tp2Hit = false

var bool tp3Hit = false

var int lastTradeBar = na

var tp1line = line(na)

var tp2line = line(na)

var tp3line = line(na)

var stopline = line(na)

var entryline = line(na)

var box entryBox = na

var box riskBox = na

var box rewardBox = na

atr = ta.atr(14)

volatilityMultiplier = 2

if bullBreak and not na(structHigh)

    entryLevel := structHigh

    targetRange = atr * volatilityMultiplier

    tp1Level := entryLevel + targetRange * 0.8

    tp2Level := entryLevel + targetRange * 1.6

    tp3Level := entryLevel + targetRange * 2.8

    stopLevel := entryLevel - targetRange * 1.2

    tradeDirection := 1

    tp1Hit := false

    tp2Hit := false

    tp3Hit := false

    lastTradeBar := bar_index

    tp1line := line(na)

    tp2line := line(na)

    tp3line := line(na)

    stopline := line(na)

    entryline := line(na)

    box.delete(entryBox)

    box.delete(riskBox)

    box.delete(rewardBox)

if bearBreak and not na(structLow)

    entryLevel := structLow

    targetRange = atr * volatilityMultiplier

    tp1Level := entryLevel - targetRange * 0.8

    tp2Level := entryLevel - targetRange * 1.6

    tp3Level := entryLevel - targetRange * 2.8

    stopLevel := entryLevel + targetRange * 1.2

    tradeDirection := -1

    tp1Hit := false

    tp2Hit := false

    tp3Hit := false

    lastTradeBar := bar_index

    tp1line := line(na)

    tp2line := line(na)

    tp3line := line(na)

    stopline := line(na)

    entryline := line(na)

    box.delete(entryBox)

    box.delete(riskBox)

    box.delete(rewardBox)

if tradeDirection == 1

    if not tp1Hit and high >= tp1Level

        tp1Hit := true

        line.delete(tp1line)

        tp1line := line(na)

    if not tp2Hit and high >= tp2Level

        tp2Hit := true

        line.delete(tp2line)

        tp2line := line(na)

    if not tp3Hit and high >= tp3Level

        tp3Hit := true

        line.delete(tp3line)

        tp3line := line(na)

        line.delete(entryline)

        entryline := line(na)

if tradeDirection == -1

    if not tp1Hit and low <= tp1Level

        tp1Hit := true

        line.delete(tp1line)

        tp1line := line(na)

    if not tp2Hit and low <= tp2Level

        tp2Hit := true

        line.delete(tp2line)

        tp2line := line(na)

    if not tp3Hit and low <= tp3Level

        tp3Hit := true

        line.delete(tp3line)

        tp3line := line(na)

        line.delete(stopline)

        stopline := line(na)

        line.delete(entryline)

        entryline := line(na)

if not na(tp1line)

    tp1line.set_x2(bar_index + 15)

if not na(tp2line)

    tp2line.set_x2(bar_index + 15)

if not na(tp3line)

    tp3line.set_x2(bar_index + 15)

if not na(stopline)

    stopline.set_x2(bar_index + 15)

if not na(entryline)

    entryline.set_x2(bar_index + 15)

if not na(entryBox)

    box.set_right(entryBox, bar_index + 15)

if not na(riskBox)

    box.set_right(riskBox, bar_index + 15)

if not na(rewardBox)

    box.set_right(rewardBox, bar_index + 15)

stopHit = (tradeDirection == 1 and low <= stopLevel) or (tradeDirection == -1 and high >= stopLevel)

if stopHit

    line.delete(stopline)

    line.delete(entryline)

    line.delete(tp1line)

    line.delete(tp2line)

    line.delete(tp3line)

    stopline := line(na)

    entryline := line(na)

    tp1line := line(na)

    tp2line := line(na)

    tp3line := line(na)

    tradeDirection := 0

    box.delete(entryBox)

    box.delete(riskBox)

    box.delete(rewardBox)

trendBarColor = showTrendBars ? 

     (trend == 1 ? color.new(bullColor, 10) : 

      trend == -1 ? color.new(bearColor, 10) : 

      color.new(neutralColor, 60)) : na

barcolor(trendBarColor)

if bullBreak and not na(structHigh) and not na(highBar)

    breakLine = line.new(highBar, structHigh, bar_index, structHigh, 

             color=color.new(bullColor, 30), width=2, style=line.style_dotted, extend=extend.none)

    labelText = chochSignal and showCHoCH ? "CHoCH ↗" : "BOS ↗"

    labelOffset = ta.highest(high, 5) + (atr * 0.5)

    breakLabel = label.new(bar_index, labelOffset, labelText, 

              color=color.new(bullColor, 0), textcolor=color.white, 

              style=label.style_label_down, size=size.normal, force_overlay=true)

if bearBreak and not na(structLow) and not na(lowBar)

    breakLine = line.new(lowBar, structLow, bar_index, structLow, 

             color=color.new(bearColor, 30), width=2, style=line.style_dotted, extend=extend.none)

    labelText = chochSignal and showCHoCH ? "CHoCH ↘" : "BOS ↘"

    labelOffset = ta.lowest(low, 5) - (atr * 0.5)

    breakLabel = label.new(bar_index, labelOffset, labelText, 

              color=color.new(bearColo

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

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

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

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

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

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

Стоимость полного кода
1 228,50₽ ≈ $15.01