Estratégia de ressonância de tendência multidimensional

EMA RSI MACD ATR BB STOCH MFI MTF
Data de criação: 2025-11-12 17:01:17 última modificação: 2025-11-12 17:01:17
cópia: 0 Cliques: 209
2
focar em
319
Seguidores

Estratégia de ressonância de tendência multidimensional Estratégia de ressonância de tendência multidimensional

O que é essa estratégia de Shenzhen? 20 indicadores em ação!

Esta estratégia é como colocar um assistente de IA super-inteligente nas suas negociações, que monitora 20 sinais diferentes de mercado ao mesmo tempo, e só lhe dá sugestões de negociação quando a maioria dos indicadores diz “sim”.

Em vez de uma estratégia de um único indicador, trata-se de um “sistema de ressonância multidimensional”. Imagine: se apenas um amigo disser que uma ação é boa, você pode ter dúvidas; mas se 20 amigos profissionais disserem que é boa, você está mais confiante?

A revelação do arsenal de armas nucleares

Identificação de tendências 🗡️

  • EMA rápida ((5) vs EMA lenta ((13)): Captação de uma reversão de tendência de curto prazo
  • Filtro de tendência EMA ((34): confirmação de direção intermédia
  • EMA ((89): A tendência geral, sem oscilações

Análise de Multi-Framas de Tempo ⏰ A estratégia olha para as tendências de 1 hora e 4 horas ao mesmo tempo, como se você estivesse dirigindo um carro e olhasse para o trajeto de navegação, evitando a situação embaraçosa de “pequenas margens de tempo e grandes margens de tempo”.

Gestão inteligente de riscos 🛡️

  • Ajuste de posição dinâmico: ajuste automático do tamanho da aposta de acordo com as flutuações do mercado
  • Não seja ganancioso, aproveite e receba uma parte
  • Stop loss móvel: um protetor de lucro

20 lógica de negociação de seguros

O que é necessário para fazer vários sinais:

  • Tendência ascendente: todos os EMAs em linha reta
  • O RSI, o MACD e o RSI aleatório estão a dar o sinal verde.
  • Combinação de peso: o que é realmente viciante é o aumento de peso
  • Estrutura de mercado saudável: pontos altos em alta
  • Apoio à Liquidez: Apoio a Fundamentos-chave

O sinal de descolagem é exatamente o oposto!

Guia para evitar buracos ️: A estratégia também inclui o teste de compressão da faixa de Brin, que é usado para suspender a negociação quando o mercado está muito calmo, para evitar que os investidores sejam confrontados em mercados em turbulência!

Armas secretas para maximizar os lucros

Estratégia de bloqueio de lotes 📈

  • Primeiro stop: venda de 30% de posição com retorno de 2x o risco
  • A segunda paralisação: venda de 40% da posição em 3,5 vezes.
  • Posições em Residuos: Proteção de Stop Losses Móvel para que os lucros corram

Inteligência de alto nível 🎯 Depois de atingir 2,5 vezes o lucro, o stop-loss é automaticamente transferido para o custo, garantindo que a transação não cause perdas.

Paragem de rastreamento dinâmico 🏃‍♂️ Quando os lucros atingem um certo nível, o stop-loss segue o preço como uma sombra, protegendo os lucros e dando espaço para o investimento.

Por que essa estratégia é tão estúpida?

  1. A cobertura completaAnálise técnica, gestão de fundos, controlo de riscos, tudo isso.
  2. Filtragem inteligente20 níveis de seleção condicional, aumentando significativamente a taxa de sucesso
  3. Altamente adaptávelAnálise de múltiplos prazos, adaptada a diferentes cenários de mercado
  4. Desenho humano“Automatizar a execução, evitar transações emocionais”

Esta estratégia é como ter uma equipe de negociação experiente em seu código, 24 horas sem descanso, procurando as melhores oportunidades de negociação para você!

Código-fonte da estratégia
/*backtest
start: 2024-11-12 00:00:00
end: 2025-11-10 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=6
strategy('Amir Mohammad Lor ', shorttitle='MPF', overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=15, pyramiding=0, max_bars_back=1000)

// === INPUTS ===
// Core Indicators
ema_fast_len = input.int(5, 'EMA Fast Length', minval=1, group="Core Indicators")
ema_slow_len = input.int(13, 'EMA Slow Length', minval=1, group="Core Indicators")
ema_trend_len = input.int(34, 'EMA Trend Filter', minval=1, group="Core Indicators")
ema_major_len = input.int(89, 'EMA Major Trend', minval=1, group="Core Indicators")
rsi_len = input.int(21, 'RSI Length', minval=1, group="Core Indicators")

// Multi-Timeframe Analysis
use_mtf = input.bool(true, 'Use Multi-Timeframe Analysis', group="Multi-Timeframe")
htf1 = input.timeframe("60", "1H Timeframe", group="Multi-Timeframe")
htf2 = input.timeframe("240", "4H Timeframe", group="Multi-Timeframe")

// Advanced Risk Management
initial_rr = input.float(4.0, 'Initial Risk Reward Ratio', minval=2.0, step=0.5, group="Risk Management")
atr_mult_entry = input.float(0.8, 'ATR Entry Stop Multiplier', minval=0.3, step=0.1, group="Risk Management")
use_dynamic_sizing = input.bool(true, 'Use Dynamic Position Sizing', group="Risk Management")
max_risk_per_trade = input.float(1.5, 'Max Risk Per Trade %', minval=0.5, step=0.1, group="Risk Management")

// Profit Maximization
use_partial_tp = input.bool(true, 'Use Partial Take Profits', group="Profit Management")
tp1_percent = input.float(30.0, 'First TP % of Position', minval=10, maxval=50, step=5, group="Profit Management")
tp1_rr = input.float(2.0, 'First TP R:R Ratio', minval=1.0, step=0.25, group="Profit Management")
tp2_percent = input.float(40.0, 'Second TP % of Position', minval=10, maxval=50, step=5, group="Profit Management")
tp2_rr = input.float(3.5, 'Second TP R:R Ratio', minval=2.0, step=0.25, group="Profit Management")
use_breakeven = input.bool(true, 'Move to Breakeven After TP1', group="Profit Management")
use_profit_trail = input.bool(true, 'Use Profit Trailing', group="Profit Management")
trail_activation = input.float(2.5, 'Trail Activation R:R', minval=1.5, step=0.25, group="Profit Management")
trail_distance = input.float(1.0, 'Trail Distance ATR', minval=0.5, step=0.1, group="Profit Management")

// Market Structure
use_market_structure = input.bool(true, 'Use Market Structure Analysis', group="Market Structure")
swing_length = input.int(20, 'Swing Length', minval=5, group="Market Structure")
use_liquidity_zones = input.bool(true, 'Use Liquidity Zone Detection', group="Market Structure")

// Trend Strength Filters
min_trend_strength = input.float(0.6, 'Minimum Trend Strength', minval=0.3, maxval=1.0, step=0.1, group="Filters")
use_momentum_filter = input.bool(true, 'Use Momentum Confluence', group="Filters")
min_volume_ratio = input.float(1.8, 'Minimum Volume Ratio', minval=1.0, step=0.1, group="Filters")

// Alert Settings
enable_sound_alerts = input.bool(true, 'Enable Sound Alerts', group="Alert Settings")
enable_popup_alerts = input.bool(true, 'Enable Popup Alerts', group="Alert Settings")
enable_email_alerts = input.bool(false, 'Enable Email Alerts', group="Alert Settings")
alert_frequency = input.string("Once Per Bar Close", "Alert Frequency", options=["All", "Once Per Bar", "Once Per Bar Close"], group="Alert Settings")

// === INDICATORS ===
// EMAs
ema_fast = ta.ema(close, ema_fast_len)
ema_slow = ta.ema(close, ema_slow_len)
ema_trend = ta.ema(close, ema_trend_len)
ema_major = ta.ema(close, ema_major_len)

// Crossover calculations
fast_under_slow = ta.crossunder(ema_fast, ema_slow)
fast_over_slow = ta.crossover(ema_fast, ema_slow)

// RSI with divergence detection
rsi = ta.rsi(close, rsi_len)
rsi_ma = ta.sma(rsi, 5)

// ATR for dynamic stops
atr = ta.atr(14)
atr_ma = ta.sma(atr, 14)

// Volume analysis
volume_ma = ta.sma(volume, 20)
volume_ratio = volume / volume_ma

// Market Structure Analysis
swing_high = ta.pivothigh(high, swing_length, swing_length)
swing_low = ta.pivotlow(low, swing_length, swing_length)

var float[] swing_highs = array.new<float>()
var float[] swing_lows = array.new<float>()

if not na(swing_high)
    array.unshift(swing_highs, swing_high)
    if array.size(swing_highs) > 5
        array.pop(swing_highs)

if not na(swing_low)
    array.unshift(swing_lows, swing_low)
    if array.size(swing_lows) > 5
        array.pop(swing_lows)

// Trend strength calculation
trend_strength = math.abs(ema_fast - ema_major) / (ema_major * 0.01)
trend_strength_norm = math.min(trend_strength / 2, 1.0)

// Multi-timeframe trend analysis
htf1_trend = request.security(syminfo.tickerid, htf1, ema_fast > ema_slow and ema_slow > ema_trend, barmerge.gaps_on)
htf1_trend_bear = request.security(syminfo.tickerid, htf1, ema_fast < ema_slow and ema_slow < ema_trend, barmerge.gaps_on)
htf2_trend = request.security(syminfo.tickerid, htf2, ema_fast > ema_trend and close > ema_major, barmerge.gaps_on)
htf2_trend_bear = request.security(syminfo.tickerid, htf2, ema_fast < ema_trend and close < ema_major, barmerge.gaps_on)

// Advanced momentum indicators
macd_line = ta.ema(close, 12) - ta.ema(close, 26)
macd_signal = ta.ema(macd_line, 9)
macd_hist = macd_line - macd_signal

// Bollinger Bands with squeeze detection
bb_length = 20
bb_mult = 2.0
[bb_upper, bb_middle, bb_lower] = ta.bb(close, bb_length, bb_mult)
bb_width = (bb_upper - bb_lower) / bb_middle
bb_squeeze = bb_width < ta.percentile_linear_interpolation(bb_width, 50, 20)

// Stochastic RSI
stoch_rsi = ta.stoch(rsi, rsi, rsi, 14)

// Money Flow Index
mfi = ta.mfi(hlc3, 14)

// Liquidity zones detection
var float liquidity_high = na
var float liquidity_low = na
var int liq_high_touches = 0
var int liq_low_touches = 0

if array.size(swing_highs) >= 2
    recent_high = array.get(swing_highs, 0)
    prev_high = array.get(swing_highs, 1)
    if math.abs(recent_high - prev_high) / recent_high < 0.002
        liquidity_high := recent_high
        liq_high_touches := 2

if array.size(swing_lows) >= 2
    recent_low = array.get(swing_lows, 0)
    prev_low = array.get(swing_lows, 1)
    if math.abs(recent_low - prev_low) / recent_low < 0.002
        liquidity_low := recent_low
        liq_low_touches := 2

// Advanced trend detection
uptrend_structure = array.size(swing_lows) >= 2 ? array.get(swing_lows, 0) > array.get(swing_lows, 1) : false
downtrend_structure = array.size(swing_highs) >= 2 ? array.get(swing_highs, 0) < array.get(swing_highs, 1) : false

// === CONFLUENCE SYSTEM ===
// LONG Setup Confluences (20 factors)
long_c1 = ema_fast > ema_slow and ema_slow > ema_trend and ema_trend > ema_major
long_c2 = close > ema_fast and close > ema_slow
long_c3 = rsi > 50 and rsi < 75 and rsi > rsi[1]
long_c4 = macd_line > macd_signal and macd_hist > macd_hist[1]
long_c5 = volume_ratio > min_volume_ratio
long_c6 = not use_mtf or (htf1_trend and htf2_trend)
long_c7 = trend_strength_norm > min_trend_strength
long_c8 = stoch_rsi > 20 and stoch_rsi < 80
long_c9 = mfi > 40 and mfi < 80 and mfi > mfi[1]
long_c10 = not bb_squeeze
long_c11 = close > bb_middle
long_c12 = not use_market_structure or uptrend_structure
long_c13 = fast_over_slow or (ema_fast > ema_slow and ema_fast[1] <= ema_slow[1])
long_c14 = atr > atr_ma * 0.8
long_c15 = close > high[1] or close > open
long_c16 = not use_liquidity_zones or (not na(liquidity_low) and close > liquidity_low)
long_c17 = ta.change(close, 3) > 0
long_c18 = hl2 > ema_trend
long_c19 = ta.roc(close, 5) > 0
long_c20 = close > ta.highest(close, 3)[1]

long_confluences = (long_c1 ? 1 : 0) + (long_c2 ? 1 : 0) + (long_c3 ? 1 : 0) + 
     (long_c4 ? 1 : 0) + (long_c5 ? 1 : 0) + (long_c6 ? 1 : 0) + 
     (long_c7 ? 1 : 0) + (long_c8 ? 1 : 0) + (long_c9 ? 1 : 0) + 
     (long_c10 ? 1 : 0) + (long_c11 ? 1 : 0) + (long_c12 ? 1 : 0) + 
     (long_c13 ? 1 : 0) + (long_c14 ? 1 : 0) + (long_c15 ? 1 : 0) + 
     (long_c16 ? 1 : 0) + (long_c17 ? 1 : 0) + (long_c18 ? 1 : 0) + 
     (long_c19 ? 1 : 0) + (long_c20 ? 1 : 0)

// SHORT Setup Confluences (20 factors)
short_c1 = ema_fast < ema_slow and ema_slow < ema_trend and ema_trend < ema_major
short_c2 = close < ema_fast and close < ema_slow
short_c3 = rsi < 50 and rsi > 25 and rsi < rsi[1]
short_c4 = macd_line < macd_signal and macd_hist < macd_hist[1]
short_c5 = volume_ratio > min_volume_ratio
short_c6 = not use_mtf or (htf1_trend_bear and htf2_trend_bear)
short_c7 = trend_strength_norm > min_trend_strength
short_c8 = stoch_rsi < 80 and stoch_rsi > 20
short_c9 = mfi < 60 and mfi > 20 and mfi < mfi[1]
short_c10 = not bb_squeeze
short_c11 = close < bb_middle
short_c12 = not use_market_structure or downtrend_structure
short_c13 = fast_under_slow or (ema_fast < ema_slow and ema_fast[1] >= ema_slow[1])
short_c14 = atr > atr_ma * 0.8
short_c15 = close < low[1] or close < open
short_c16 = not use_liquidity_zones or (not na(liquidity_high) and close < liquidity_high)
short_c17 = ta.change(close, 3) < 0
short_c18 = hl2 < ema_trend
short_c19 = ta.roc(close, 5) < 0
short_c20 = close < ta.lowest(close, 3)[1]

short_confluences = (short_c1 ? 1 : 0) + (short_c2 ? 1 : 0) + (short_c3 ? 1 : 0) + 
     (short_c4 ? 1 : 0) + (short_c5 ? 1 : 0) + (short_c6 ? 1 : 0) + 
     (short_c7 ? 1 : 0) + (short_c8 ? 1 : 0) + (short_c9 ? 1 : 0) + 
     (short_c10 ? 1 : 0) + (short_c11 ? 1 : 0) + (short_c12 ? 1 : 0) + 
     (short_c13 ? 1 : 0) + (short_c14 ? 1 : 0) + (short_c15 ? 1 : 0) + 
     (short_c16 ? 1 : 0) + (short_c17 ? 1 : 0) + (short_c18 ? 1 : 0) + 
     (short_c19 ? 1 : 0) + (short_c20 ? 1 : 0)

// High probability entry requirements
min_confluences_required = 14
long_entry = long_confluences >= min_confluences_required
short_entry = short_confluences >= min_confluences_required

// Signal strength classification
long_strength = long_confluences >= 18 ? "ULTRA STRONG" : long_confluences >= 16 ? "VERY STRONG" : long_confluences >= 14 ? "STRONG" : "WEAK"
short_strength = short_confluences >= 18 ? "ULTRA STRONG" : short_confluences >= 16 ? "VERY STRONG" : short_confluences >= 14 ? "STRONG" : "WEAK"

// === DYNAMIC POSITION SIZING ===
confluence_multiplier = long_entry ? 
     (long_confluences - min_confluences_required + 1) * 0.2 : 
     short_entry ? 
     (short_confluences - min_confluences_required + 1) * 0.2 : 
     1.0

volatility_factor = atr / close
normalized_vol = math.min(volatility_factor / 0.02, 2.0)
vol_multiplier = 1.0 / math.max(normalized_vol, 0.5)

dynamic_size = use_dynamic_sizing ? confluence_multiplier * vol_multiplier : 1.0
position_size = math.min(dynamic_size * 15, 25)

// === POSITION MANAGEMENT VARIABLES ===
var float entry_price = na
var float initial_stop = na
var float current_stop = na
var float tp1_price = na
var float tp2_price = na
var float tp3_price = na
var bool tp1_hit = false
var bool tp2_hit = false
var bool breakeven_moved = false
var string position_direction = na
var int bars_in_position = 0
var float max_profit = 0.0
var float trail_trigger_price = na
var float unrealized_pnl = 0.0

// Alert trigger variables
var bool long_entry_triggered = false
var bool short_entry_triggered = false
var bool tp1_alert_sent = false
var bool tp2_alert_sent = false
var bool breakeven_alert_sent = false
var bool trail_alert_sent = false

// === ENTRY LOGIC ===
if long_entry and strategy.position_size == 0
    entry_price := close
    initial_stop := close - (atr * atr_mult_entry)
    current_stop := initial_stop
    tp1_price := close + ((close - initial_stop) * tp1_rr)
    tp2_price := close + ((close - initial_stop) * tp2_rr)
    tp3_price := close + ((close - initial_stop) * initial_rr)
    trail_trigger_price := close + ((close - initial_stop) * trail_activation)
    position_direction := "LONG"
    tp1_hit := false
    tp2_hit := false
    breakeven_moved := false
    bars_in_position := 0
    max_profit := 0.0
    long_entry_triggered := true
    tp1_alert_sent := false
    tp2_alert_sent := false
    breakeven_alert_sent := false
    trail_alert_sent := false
    
    if use_dynamic_sizing
        strategy.entry("LONG", strategy.long, qty=position_size, comment="L:" + str.tostring(long_confluences))
    else
        strategy.entry("LONG", strategy.long, comment="L:" + str.tostring(long_confluences))

if short_entry and strategy.position_size == 0
    entry_price := close
    initial_stop := close + (atr * atr_mult_entry)
    current_stop := initial_stop
    tp1_price := close - ((initial_stop - close) * tp1_rr)
    tp2_price := close - ((initial_stop - close) * tp2_rr)
    tp3_price := close - ((initial_stop - close) * initial_rr)
    trail_trigger_price := close - ((initial_stop - close) * trail_activation)
    position_direction := "SHORT"
    tp1_hit := false
    tp2_hit := false
    breakeven_moved := false
    bars_in_position := 0
    max_profit := 0.0
    short_entry_triggered := true
    tp1_alert_sent := false
    tp2_alert_sent := false
    breakeven_alert_sent := false
    trail_alert_sent := false
    
    if use_dynamic_sizing
        strategy.entry("SHORT", strategy.short, qty=position_size, comment="S:" + str.tostring(short_confluences))
    else
        strategy.entry("SHORT", strategy.short, comment="S:" + str.tostring(short_confluences))

// === POSITION MANAGEMENT ===
if strategy.position_size != 0
    bars_in_position += 1
    
    if position_direction == "LONG"
        current_profit = (close - entry_price) / entry_price
        max_profit := math.max(max_profit, current_profit)
        unrealized_pnl := (close - entry_price) * math.abs(strategy.position_size)
        
        // Partial take profits
        if use_partial_tp and not tp1_hit and close >= tp1_price
            strategy.close("LONG", qty_percent=tp1_percent, comment="TP1")
            tp1_hit := true
            tp1_alert_sent := true
            
        if use_partial_tp and not tp2_hit and close >= tp2_price and tp1_hit
            strategy.close("LONG", qty_percent=tp2_percent, comment="TP2")
            tp2_hit := true
            tp2_alert_sent := true
            
        // Move to breakeven after TP1
        if use_breakeven and tp1_hit and not breakeven_moved and close >= tp1_price
            current_stop := entry_price + (atr * 0.2)
            breakeven_moved := true
            breakeven_alert_sent := true
            
        // Profit trailing
        if use_profit_trail and close >= trail_trigger_price
            trail_stop = close - (atr * trail_distance)
            if trail_stop > current_stop
                current_stop := trail_stop
                trail_alert_sent := true
                
    else if position_direction == "SHORT"
        current_profit = (entry_price - close) / entry_price
        max_profit := math.max(max_profit, current_profit)
        unrealized_pnl := (entry_price - close) * math.abs(strategy.position_size)
        
        // Partial take profits
        if use_partial_tp and not tp1_hit and close <= tp1_price
            strategy.close("SHORT", qty_percent=tp1_percent, comment="TP1")
            tp1_hit := true
            tp1_alert_sent := true
            
        if use_partial_tp and not tp2_hit and close <= tp2_price and tp1_hit
            strategy.close("SHORT", qty_percent=tp2_percent, comment="TP2")
            tp2_hit := true
            tp2_alert_sent := true
            
        // Move to breakeven after TP1
        if use_breakeven and tp1_hit and not breakeven_moved and close <= tp1_price
            current_stop := entry_price - (atr * 0.2)
            breakeven_moved := true
            breakeven_alert_sent := true
            
        // Profit trailing
        if use_profit_trail and close <= trail_trigger_price
            trail_stop = close + (atr * trail_distance)
            if trail_stop < current_stop
                current_stop := trail_stop
                trail_alert_sent := true

// Exit conditions
var bool stop_loss_hit = false
var bool final_tp_hit = false
var bool trend_reversal_exit = false
var bool time_exit = false

// === EXIT LOGIC ===
if strategy.position_size > 0
    if close <= current_stop
        strategy.close_all(comment="SL")
        stop_loss_hit := true
        entry_price := na
        position_direction := na
    else if close >= tp3_price
        strategy.close_all(comment="TP3")
        final_tp_hit := true
        entry_price := na
        position_direction := na
    else if fast_under_slow and breakeven_moved
        strategy.close_all(comment="Trend Rev")
        trend_reversal_exit := true
        entry_price := na
        position_direction := na
    else if bars_in_position >= 100
        strategy.close_all(comment="Time Exit")
        time_exit := true
        entry_price := na
        position_direction := na

if strategy.position_size < 0
    if close >= current_stop
        strategy.close_all(comment="SL")
        stop_loss_hit := true
        entry_price := na
        position_direction := na
    else if close <= tp3_price
        strategy.close_all(comment="TP3")
        final_tp_hit := true
        entry_price := na
        position_direction := na
    else if fast_over_slow and breakeven_moved
        strategy.close_all(comment="Trend Rev")
        trend_reversal_exit := true
        entry_price := na
        position_direction := na
    else if bars_in_position >= 100
        strategy.close_all(comment="Time Exit")
        time_exit := true
        entry_price := na
        position_direction := na

// === PLOTTING ===
// EMAs
plot(ema_fast, color=color.lime, linewidth=2, title="EMA Fast")
plot(ema_slow, color=color.orange, linewidth=2, title="EMA Slow")
plot(ema_trend, color=color.blue, linewidth=2, title="EMA Trend")
plot(ema_major, color=color.purple, linewidth=3, title="EMA Major")

// Enhanced Entry signals with strength indication
plotshape(long_entry and long_confluences >= 18, style=shape.triangleup, location=location.belowbar, 
          color=color.new(color.lime, 0), size=size.large, title="ULTRA STRONG Long")
plotshape(long_entry and long_confluences >= 16 and long_confluences < 18, style=shape.triangleup, location=location.belowbar, 
          color=color.new(color.green, 20), size=size.normal, title="VERY STRONG Long")
plotshape(long_entry and long_confluences >= 14 and long_confluences < 16, style=shape.triangleup, location=location.belowbar, 
          color=color.new(color.green, 40), size=size.small, title="STRONG Long")

plotshape(short_entry and short_confluences >= 18, style=shape.triangledown, location=location.abovebar, 
          color=color.new(color.red, 0), size=size.large, title="ULTRA STRONG Short")
plotshape(short_entry and short_confluences >= 16 and short_confluences < 18, style=shape.triangledown, location=location.abovebar, 
          color=color.new(color.orange, 20), size=size.normal, title="VERY STRONG Short")
plotshape(short_entry and short_confluences >= 14 and short_confluences < 16, style=shape.triangledown, location=location.abovebar, 
          color=color.new(color.orange, 40), size=size.small, title="STRONG Short")

// Support and resistance
plot(liquidity_high, color=color.red, linewidth=2, style=plot.style_stepline, title="Liquidity High")
plot(liquidity_low, color=color.green, linewidth=2, style=plot.style_stepline, title="Liquidity Low")

// Position management levels
plot(strategy.position_size != 0 ? current_stop : na, color=color.red, linewidth=2, style=plot.style_linebr, title="Current Stop")
plot(strategy.position_size != 0 ? tp1_price : na, color=color.green, linewidth=1, style=plot.style_linebr, title="TP1")
plot(strategy.position_size != 0 ? tp2_price : na, color=color.green, linewidth=1, style=plot.style_linebr, title="TP2")
plot(strategy.position_size != 0 ? tp3_price : na, color=color.green, linewidth=2, style=plot.style_linebr, title="TP3")

// Background coloring
bgcolor(strategy.position_size > 0 ? color.new(color.green, 95) : strategy.position_size < 0 ? color.new(color.red, 95) : na, title="Position")