OA S/R PowerPurpose of the Script
This script identifies the strength of support and resistance levels based on key factors like volume, bounce frequency, and retests. Each level is assigned a score (0-100) and visualized with color-coded labels on the chart.
Key Features
Dynamic Strength Calculation:
Volume Strength: Measures the strength based on the volume of candles touching the level.
Bounce Strength: Evaluates how often the price bounces back from the level.
Retest Strength: Scores the consistency of retests over time.
Color-Coded Visualization:
Yellow: Strong levels (Strength ≥ 70).
Orange: Medium levels (Strength between 50-70).
Red: Resistance levels (Price is below the level).
Green: Support levels (Price is above the level).
Fully Customizable Settings:
Adjust the weight for volume, bounce, and retest contributions.
Configure timeframes, percentage range, and number of levels to analyze.
How It Works
Identify Peaks and Valleys: The script calculates local highs and lows using a configurable width setting to determine potential support and resistance levels.
Filter Key Levels: Nearby levels are merged based on a user-defined percentage range, ensuring clean and relevant levels.
Strength Scoring: Levels are scored dynamically based on:
The number of touches.
The volume of touches.
The frequency of bounces and retests.
Visual Feedback: Each level is plotted on the chart with a color-coded label, indicating its importance and price relationship.
Best Use Cases
Quickly identify strong support/resistance zones for breakout or reversal trades.
Use the dynamic scoring system to prioritize key levels for your strategy.
Customize weights to align with your trading style, such as emphasizing volume or retests.
Penunjuk dan strategi
Power Of 3 ICT 01 [TradingFinder] AMD ICT & SMC Accumulations🔵 Introduction
The ICT Power of 3 (PO3) strategy, developed by Michael J. Huddleston, known as the Inner Circle Trader, is a structured approach to analyzing daily market activity. This strategy divides the trading day into three distinct phases: Accumulation, Manipulation, and Distribution.
Each phase represents a unique market behavior influenced by institutional traders, offering a clear framework for retail traders to align their strategies with market movements.
Accumulation (19:00 - 01:00 EST) takes place during low-volatility hours, as institutional traders accumulate orders. Manipulation (01:00 - 07:00 EST) involves false breakouts and liquidity traps designed to mislead retail traders. Finally, Distribution (07:00 - 13:00 EST) represents the active phase where significant market movements occur as institutions distribute their positions in line with the broader trend.
This indicator is built upon the Power of 3 principles to provide traders with a practical and visual tool for identifying these key phases. By using clear color coding and precise time zones, the indicator highlights critical price levels, such as highs and lows, helping traders to better understand market dynamics and make more informed trading decisions.
Incorporating the ICT AMD setup into daily analysis enables traders to anticipate market behavior, spot high-probability trade setups, and gain deeper insights into institutional trading strategies. With its focus on time-based price action, this indicator simplifies complex market structures, offering an effective tool for traders of all levels.
🔵 How to Use
The ICT Power of 3 (PO3) indicator is designed to help traders analyze daily market movements by visually identifying the three key phases: Accumulation, Manipulation, and Distribution.
Here's how traders can effectively use the indicator :
🟣 Accumulation Phase (19:00 - 01:00 EST)
Purpose : Identify the range-bound activity where institutional players accumulate orders.
Trading Insight : Avoid placing trades during this phase, as price movements are typically limited. Instead, use this time to prepare for the potential direction of the market in the next phases.
🟣 Manipulation Phase (01:00 - 07:00 EST)
Purpose : Spot false breakouts and liquidity traps that mislead retail traders.
Trading Insight : Observe the market for price spikes beyond key support or resistance levels. These moves often reverse quickly, offering high-probability entry points in the opposite direction of the initial breakout.
🟣 Distribution Phase (07:00 - 13:00 EST)
Purpose : Detect the main price movement of the day, driven by institutional distribution.
Trading Insight : Enter trades in the direction of the trend established during this phase. Look for confirmations such as breakouts or strong directional moves that align with broader market sentiment
🔵 Settings
Show or Hide Phases :mDecide whether to display Accumulation, Manipulation, or Distribution.
Adjust the session times for each phase :
Accumulation: 1900-0100 EST
Manipulation: 0100-0700 EST
Distribution: 0700-1300 EST
Modify Visualization : Customize how the indicator looks by changing settings like colors and transparency.
🔵 Conclusion
The ICT Power of 3 (PO3) indicator is a powerful tool for traders seeking to understand and leverage market structure based on time and price dynamics. By visually highlighting the three key phases—Accumulation, Manipulation, and Distribution—this indicator simplifies the complex movements of institutional trading strategies.
With its customizable settings and clear representation of market behavior, the indicator is suitable for traders at all levels, helping them anticipate market trends and make more informed decisions.
Whether you're identifying entry points in the Accumulation phase, navigating false moves during Manipulation, or capitalizing on trends in the Distribution phase, this tool provides valuable insights to enhance your trading performance.
By integrating this indicator into your analysis, you can better align your strategies with institutional movements and improve your overall trading outcomes.
Deep/High Trend Reversal LevelsDeep/High Trend Reversal Levels (DHTRL)
The Deep/High Trend Reversal Levels by (ebecihalil) indicator provides precise BUY and SELL signals to help traders identify potential market turning points. The indicator dynamically analyzes price movements to highlight significant levels of interest where the market may reverse or continue trending.
Key Features:
SELL Signals (Red Labels): The indicator identifies critical points of potential resistance and displays a red SELL label above the price, signalling an opportunity to go short or take profit.
BUY Signals (Green Labels): It also identifies significant support levels, marking them with a green BUY label below the price, indicating a possible entry for long positions.
Customizable Settings:
Signal Sensitivity: Adjust the settings to fine-tune the conditions for detecting SELL and BUY signals, making the indicator adaptable to different trading styles and timeframes.
How It Works:
The indicator monitors price action to detect key zones where the price may react strongly.
SELL Signals appear at levels where downward pressure is likely, while BUY Signals highlight zones where upward momentum could begin.
Use Cases:
Reversal Signal Detection: Spot areas where the price might change direction, allowing you to anticipate market movements.
Trend Confirmation: Use the signals to confirm trends and align your trades with potential market continuation points.
Ideal for:
Traders seeking reliable entry and exit signals.
Anyone looking to enhance their strategies with actionable support and resistance insights.
Cloud EMA Ajustable (9, 21, 50) con Filtro de SeñalesEl "Cloud EMA Ajustable (9, 21, 50) con Filtro de Señales" es una herramienta de análisis técnico diseñada para identificar zonas de soporte o resistencia dinámicas basadas en tres medias móviles exponenciales (EMAs) ajustables. Este indicador también incluye un filtro de señales que combina un cruce de EMAs con confirmación del RSI para ayudar a identificar posibles puntos de entrada en tendencias alcistas o bajistas.
Características principales:
Medias móviles exponenciales (EMAs):
EMA 9: Actúa como un indicador rápido de la tendencia a corto plazo.
EMA 21: Marca un soporte o resistencia intermedia.
EMA 50: Representa una tendencia más amplia.
Relleno de color entre EMA 21 y EMA 50:
Verde para tendencias alcistas (EMA 21 > EMA 50).
Rojo para tendencias bajistas (EMA 21 < EMA 50).
Señales basadas en mechas y RSI:
Una señal de entrada ocurre cuando la mecha de la vela toca la EMA 21, y se confirma una tendencia mediante las EMAs y el RSI.
Totalmente personalizable: Los usuarios pueden ajustar los períodos de las EMAs y el RSI según sus necesidades.
Ajustes disponibles para los usuarios:
Períodos de las EMAs:
Periodo EMA 9 : Personaliza el período para la EMA más rápida.
Periodo EMA 21 : Define el período de la EMA media, utilizada como referencia clave.
Periodo EMA 50: Ajusta el período para la EMA más lenta.
Período del RSI:
Periodo RSI : Cambia el período del RSI utilizado como filtro de tendencia.
Cómo interpretar el indicador:
Colores y relleno:
Verde: Indica una tendencia alcista (EMA 21 por encima de EMA 50).
Rojo: Indica una tendencia bajista (EMA 21 por debajo de EMA 50).
Señales de entrada:
Una señal de entrada (punto amarillo) aparece cuando:
-La mecha de la vela toca la EMA 21.
-Las EMAs confirman la tendencia (EMA 9 > EMA 21 para alcista o EMA 9 < EMA 21 para bajista).
-El RSI refuerza la tendencia (RSI > 50 para alcista o RSI < 50 para bajista).
Personalización:
Ajusta los períodos de las EMAs y el RSI para adaptarlos a diferentes marcos temporales o estilos de trading.
Este indicador es ideal para traders que buscan confirmar entradas basadas en tendencias y validaciones adicionales como el RSI, mejorando la precisión de sus decisiones operativas.
Credito
Gracias a la publicacion de @Dezziinutz por la aportacion de los parametros para la realizacion de este indicador, y por eso es gratis para la comunidad y el codigo es libre para que puedan manipularlo y modificarlo.
//@version=5
indicator("Cloud EMA Ajustable (9, 21, 50) con Filtro de Señales", overlay=true)
// Permitir al usuario editar los periodos de las EMAs desde la interfaz gráfica
periodoEMA9 = input.int(9, title="Periodo EMA 9", minval=1, tooltip="Edita el periodo de la EMA 9")
periodoEMA21 = input.int(21, title="Periodo EMA 21", minval=1, tooltip="Edita el periodo de la EMA 21")
periodoEMA50 = input.int(50, title="Periodo EMA 50", minval=1, tooltip="Edita el periodo de la EMA 50")
rsiPeriodo = input.int(14, title="Periodo RSI", minval=1, tooltip="Edita el periodo del RSI")
// Calcular las EMAs y el RSI con los periodos ajustables
ema9 = ta.ema(close, periodoEMA9)
ema21 = ta.ema(close, periodoEMA21)
ema50 = ta.ema(close, periodoEMA50)
rsi = ta.rsi(close, rsiPeriodo)
// Definir el color de la sombra entre la EMA 21 y EMA 50
fillColor = ema21 > ema50 ? color.new(color.green, 80) : color.new(color.red, 80)
// Dibujar las EMAs y asignarlas a variables de tipo plot
plotEMA9 = plot(ema9, title="EMA 9", color=color.blue, linewidth=2)
plotEMA21 = plot(ema21, title="EMA 21", color=ema21 > ema50 ? color.green : color.red, linewidth=2)
plotEMA50 = plot(ema50, title="EMA 50", color=ema21 > ema50 ? color.green : color.red, linewidth=2)
// Crear la sombra entre EMA 21 y EMA 50
fill(plotEMA21, plotEMA50, color=fillColor, title="Sombra entre EMA 21 y EMA 50")
// Condición: Cuando la mecha superior o inferior de la vela toque la EMA 21
toqueEMA21 = (high >= ema21 and low <= ema21) // La mecha toca la EMA 21
// Filtro: Asegurarse de que el precio está en una tendencia alcista/bajista según el cruce de EMAs
tendenciaAlcista = ema9 > ema21
tendenciaBajista = ema9 < ema21
// Filtro adicional: RSI debe estar por encima de 50 para tendencia alcista y por debajo de 50 para tendencia bajista
rsiAlcista = rsi > 50
rsiBajista = rsi < 50
// Condición para la señal: El precio toca la EMA 21, y hay una confirmación de tendencia
senal_entrada = toqueEMA21 and ((tendenciaAlcista and rsiAlcista) or (tendenciaBajista and rsiBajista))
// Dibujar un punto amarillo en la mecha de la vela si se da la condición
plotshape(senal_entrada, title="Señal de Entrada", location=location.abovebar, color=color.yellow, style=shape.circle, size=size.small)
Heikin Ashi Impulse SystemThis indicator uses Heikin Ashi and EMA to find buy and sell points, and uses EMA to filter out noise.
To color the K-line using Heikin Ashi, you may need to close the original K-line or place the indicator on the top layer.
On smaller timeframes you can reduce the buy/sell noise by increasing the EMA value, and enjoy it.
Sharpe Ratio Indicator (180)Meant to be used on the 1D chart and on BTC.
The Sharpe Ratio Indicator (180 days) is a tool for evaluating risk-adjusted returns, designed for investors who want to assess whether BTC is overvalued, undervalued, or in a neutral state. It plots the Sharpe Ratio over the past 180 days, color-coded to indicate valuation states:
- Red: Overvalued (Sharpe Ratio > 5).
- Green: Undervalued (Sharpe Ratio < -1).
-Blue: Critically Undervalued (Sharpe Ratio <-3).
- Yellow: Neutral (between -1 and 5).
Note that you can change those values yourself in the settings of the indicator.
Strengths:
- Real-time feedback on risk-adjusted returns helps in making timely investment decisions.
- Color-coded signals (red, green, blue and yellow) provide an intuitive, visual indication of the asset's valuation.
- Flexible: Easily adjustable to different subjective valuation levels and risk-free rates.
All hail to Professor Adam and The Real World Community!
B-Xtrender By Neal inspired from @PuppytherapyThanks to @puppytherapy for creating the original B-Xtrender indicator, available at this link: B-Xtrender by @QuantTherapy
I played around the code to have entry and exit condition. The B-Xtrender @QuantTherapy
indicator is a momentum-based tool designed to help traders identify potential trade opportunities by tracking shifts in market momentum. Using a smoothed momentum oscillator, it detects changes in trend direction and provides clear signals for entry and exit points.
Features
Momentum Detection:
Tracks market momentum using the BX-Trender Oscillator.
Green bars indicate bullish momentum, while red bars indicate bearish momentum.
Lighter shades of green/red reflect weakening momentum.
Entry and Exit Signals:
Entry Condition: A long trade is triggered when the oscillator changes from red to green .
Exit Condition: A long trade exit is triggered when the oscillator changes from green to red .
Dynamic PnL Calculation:
Automatically calculates profit or loss in percentage (%) when a trade is exited.
Positive PnL values are prefixed with `+`, and negative values are shown as `-`.
Clear Visualization:
Bar chart-style oscillator in a separate pane for better trend visualization.
Trade labels on the main price chart for clear entry and exit points.
Inputs
Short-Term Momentum Parameters:
Short - L1: Length of the first EMA for short-term momentum calculations.
Short - L2: Length of the second EMA for short-term momentum calculations.
Short - L3: RSI smoothing period applied to the short-term momentum.
Long-Term Momentum Parameters:
Long - L1: Length of the EMA for long-term momentum calculations.
Long - L2: RSI smoothing period applied to the long-term momentum.
Entry and Exit Logic
Entry Condition:
A long trade is triggered when:
The BX-Trender Oscillator changes from red to green .
This shift indicates bullish momentum.
Exit Condition:
A long trade exit is triggered when:
The BX-Trender Oscillator changes from green to red .
This shift indicates a loss of bullish momentum or the start of bearish momentum.
PnL Calculation:
When exiting a trade, the indicator calculates the profit or loss as a percentage of the entry price.
Example:
A profit is displayed as +5.67% .
A loss is displayed as -3.21% .
Visualization
Oscillator Bars:
Green Bars: Represent increasing bullish momentum.
Light Green Bars: Represent weakening bullish momentum.
Red Bars: Represent increasing bearish momentum.
Light Red Bars: Represent weakening bearish momentum.
Just make sure that you checked off the B-Xtrend oscillator off from the style so chart can be active
Trade Labels:
Entry Labels: Displayed below the candle with the text Entry, long .
Exit Labels: Displayed above the candle with the text Exit .
Bar Chart Pane:
The oscillator is displayed in a separate pane for clear trend visualization.
Default Style
Oscillator Colors:
Green for bullish momentum.
Red for bearish momentum.
Light green and light red for weaker momentum.
Trade Labels:
Green labels for entries.
Red labels for exits, with percentage PnL displayed.
Use Cases
Momentum-Based Entries:
Detects shifts in momentum from bearish to bullish for precise trade entry points.
Trend Reversal Detection:
Identifies when bullish momentum weakens, signaling an exit opportunity.
Visual Simplicity:
Offers an intuitive way to track trends with its bar chart-style oscillator and clear trade labels.
This indicator doesn't indicate that it will work perfectly. More updates on the way.
Trendlines with Breaks ema ALARM//@version=5
strategy('HalfTrend Strategy', overlay=true, initial_capital=1000)
tlpc = input.string(title="Alert", defval="PineConnector", options= , tooltip="Go to alertatron to have alerts automatically sent to Telegram")
// Setting
ID = input("1234567890123", title="License ID (PineConnector)", group="Setting")
risk = input.float(2, title="Risk per Trade %", group="Setting", step=0.5)
typeSL = input.string(title="StopLoss", defval="ATR", options= , group="Setting")
typeTP = input.string(title="TakeProfit", defval="R:R", options= , group="Setting")
trendA = input.string(title="Trend Indicator", defval="EMA", options= , group="Setting")
_x = input.bool(false, title="do not take too small positions", group="Setting", tooltip="This parameter is used to avoid positions that have a stoploss too close to the entry point and that the broker's spreads take all the gains")
security = input.float(10, title="min of pips (00001.00)", group="Setting")
riskt = risk / 100 + 1
//Backtest Time Period
useDateFilter = input.bool(false, title="Filter Date Range of Backtest", group="Backtest Time Period")
backtestStartDate = input.time(timestamp("1 June 2022"), title="Start Date", group="Backtest Time Period", tooltip="This start date is in the time zone of the exchange " + "where the chart's instrument trades. It doesn't use the time " + "zone of the chart or of your computer.")
backtestEndDate = input.time(timestamp("1 July 2022"), title="End Date", group="Backtest Time Period", tooltip="This end date is in the time zone of the exchange " + "where the chart's instrument trades. It doesn't use the time " + "zone of the chart or of your computer.")
inTradeWindow = not useDateFilter or (time >= backtestStartDate and time < backtestEndDate)
//StopLoss
swingHighV = input.int(7, title="Swing High", group="Stop Loss", tooltip="Number of candles in which the parameter targets the highest")
swingLowV = input.int(7, title="Swing Low", group="Stop Loss", tooltip="Number of candles in which the parameter targets the lowest point")
atr1 = input.int(14, title="ATR Period", group="Stop Loss")
atrMultiplierSL = input.int(2, title = "ATR Multiplier", group="Stop Loss")
atr = ta.atr(atr1)
swingHigh = ta.highest(high, swingHighV)
swingLow = ta.lowest(low, swingLowV)
atrSell = close + atr * atrMultiplierSL
atrBuy = close - atr * atrMultiplierSL
//TakeProfit
target_stop_ratio = input.float(title='Risk/Reward (R:R)', defval=3, minval=0.5, maxval=100, step=0.1, group="TakeProfit")
target1 = input.float(1, title='Target 1 R:R (Multiple Target)', group="TakeProfit", step=0.1)
target2 = input.float(2, title='Target 2 R:R (Multiple Target)', group="TakeProfit", step=0.1)
//HalfTrend
amplitude = input(title='Amplitude', defval=2, group="HalfTrend")
channelDeviation = input(title='Channel Deviation', defval=2, group="HalfTrend")
showArrows = input(title='Show Arrows', defval=true, group="HalfTrend")
showChannels = input(title='Show Channels', defval=true, group="HalfTrend")
var int trend = 0
var int nextTrend = 0
var float maxLowPrice = nz(low , low)
var float minHighPrice = nz(high , high)
var float up = 0.0
var float down = 0.0
float atrHigh = 0.0
float atrLow = 0.0
float arrowUp = na
float arrowDown = na
atr2 = ta.atr(100) / 2
dev = channelDeviation * atr2
highPrice = high
lowPrice = low
highma = ta.sma(high, amplitude)
lowma = ta.sma(low, amplitude)
if nextTrend == 1
maxLowPrice := math.max(lowPrice, maxLowPrice)
if highma < maxLowPrice and close < nz(low , low)
trend := 1
nextTrend := 0
minHighPrice := highPrice
minHighPrice
else
minHighPrice := math.min(highPrice, minHighPrice)
if lowma > minHighPrice and close > nz(high , high)
trend := 0
nextTrend := 1
maxLowPrice := lowPrice
maxLowPrice
if trend == 0
if not na(trend ) and trend != 0
up := na(down ) ? down : down
arrowUp := up - atr2
arrowUp
else
up := na(up ) ? maxLowPrice : math.max(maxLowPrice, up )
up
atrHigh := up + dev
atrLow := up - dev
atrLow
else
if not na(trend ) and trend != 1
down := na(up ) ? up : up
arrowDown := down + atr2
arrowDown
else
down := na(down ) ? minHighPrice : math.min(minHighPrice, down )
down
atrHigh := down + dev
atrLow := down - dev
atrLow
ht = trend == 0 ? up : down
var color buyColor = color.blue
var color sellColor = color.orange
htColor = trend == 0 ? buyColor : sellColor
htPlot = plot(ht, title='HalfTrend', linewidth=2, color=htColor)
buySignal = not na(arrowUp) and trend == 0 and trend == 1
sellSignal = not na(arrowDown) and trend == 1 and trend == 0
//EMA
srce = input.source(close, title="Source", group="EMA (Trend)")
emav = input.int(200, title="Length", group="EMA (Trend)")
ema = ta.ema(srce, emav)
//Superichi
tenkan_len = input(9,'Tenkan',inline='tenkan', group="Superichi (Trend)")
tenkan_mult = input(2.,'',inline='tenkan', group="Superichi (Trend)")
kijun_len = input(26,'Kijun',inline='kijun', group="Superichi (Trend)")
kijun_mult = input(4,'',inline='kijun', group="Superichi (Trend)")
spanB_len = input(52,'Senkou Span B',inline='span', group="Superichi (Trend)")
spanB_mult = input(6, '', inline='span', group="Superichi (Trend)")
offset = input(26,'Displacement', group="Superichi (Trend)")
avg(src,length,mult)=>
atr = ta.atr(length)*mult
up = hl2 + atr
dn = hl2 - atr
upper = 0.,lower = 0.
upper := src < upper ? math.min(up,upper ) : up
lower := src > lower ? math.max(dn,lower ) : dn
os = 0,max = 0.,min = 0.
os := src > upper ? 1 : src < lower ? 0 : os
spt = os == 1 ? lower : upper
max := ta.cross(src,spt) ? math.max(src,max ) : os == 1 ? math.max(src,max ) : spt
min := ta.cross(src,spt) ? math.min(src,min ) : os == 0 ? math.min(src,min ) : spt
math.avg(max,min)
tenkan = avg(close,tenkan_len,tenkan_mult)
kijun = avg(close,kijun_len,kijun_mult)
senkouA = math.avg(kijun,tenkan)
senkouB = avg(close,spanB_len,spanB_mult)
tenkan_css = #2157f3
kijun_css = #ff5d00
cloud_a = color.new(color.teal,50)
cloud_b = color.new(color.red,50)
//Alert
getpips() =>
syminfo.mintick * (syminfo.type == "forex" ? 10 : 1)
mess_buyT = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "Prix d'entrée " + str.tostring(close) + " " + "SL " + str.tostring(swingLow) + " ⛔️ " + "TP " + str.tostring(((close-swingLow)*target_stop_ratio)+close) + " 🎯 " + "⚠️ Avertissement : Respectez votre money management, risquez seulement " + str.tostring(risk) + "% de votre capital sur ce trade."
mess_sellT = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "Prix d'entrée " + str.tostring(close) + " " + "SL " + str.tostring(swingHigh) + " ⛔️ " + "TP " + str.tostring(close-((swingHigh-close)*target_stop_ratio)) + " 🎯 " + "⚠️ Avertissement : Respectez votre money management, risquez seulement " + str.tostring(risk) + "% de votre capital sur ce trade."
mess_buyP = "" + str.tostring(ID) + ",buy," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(swingLow) + ",tp=" + str.tostring(((close-swingLow)*target_stop_ratio)+close) + ",risk=" + str.tostring(risk) + ""
mess_sellP = "" + str.tostring(ID) + ",sell," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(swingHigh) + ",tp=" + str.tostring(close-((swingHigh-close)*target_stop_ratio)) + ",risk=" + str.tostring(risk) + ""
mess_buyAT = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "Prix d'entrée " + str.tostring(close) + " " + "SL " + str.tostring(atrBuy) + " ⛔️ " + "TP " + str.tostring(((close-atrBuy)*target_stop_ratio)+close) + " 🎯 " + "⚠️ Avertissement : Respectez votre money management, risquez seulement " + str.tostring(risk) + "% de votre capital sur ce trade."
mess_sellAT = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "Prix d'entrée " + str.tostring(close) + " " + "SL " + str.tostring(atrSell) + " ⛔️ " + "TP " + str.tostring(close-((atrSell-close)*target_stop_ratio)) + " 🎯 " + "⚠️ Avertissement : Respectez votre money management, risquez seulement " + str.tostring(risk) + "% de votre capital sur ce trade."
mess_buyAP = "" + str.tostring(ID) + ",buy," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(atrBuy) + ",tp=" + str.tostring(((close-atrBuy)*target_stop_ratio)+close) + ",risk=" + str.tostring(risk) + ""
mess_sellAP = "" + str.tostring(ID) + ",sell," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(atrSell) + ",tp=" + str.tostring(close-((atrSell-close)*target_stop_ratio)) + ",risk=" + str.tostring(risk) + ""
mess_buyAMT = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "Prix d'entrée " + str.tostring(close) + " " + "SL " + str.tostring(atrBuy) + " ⛔️ " + "TP1 " + str.tostring(((close-atrBuy)*target1)+close) + " 🎯 " + "TP2 " + str.tostring(((close-atrBuy)*target2)+close) + "🎯 " + "⚠️ Avertissement : Respectez votre money management, risquez seulement " + str.tostring(risk) + "% de votre capital sur ce trade. BE si TP1 touché"
mess_sellAMT = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "Prix d'entrée " + str.tostring(close) + " " + "SL " + str.tostring(atrSell) + " ⛔️ " + "TP1 " + str.tostring(close-((atrSell-close)*target1)) + " 🎯 " + "TP2 " + str.tostring(close-((atrSell-close)*target2)) + "🎯 " + "⚠️ Avertissement : Respectez votre money management, risquez seulement " + str.tostring(risk) + "% de votre capital sur ce trade. BE si TP1 touché"
mess_buyAMP1 = "" + str.tostring(ID) + ",buy," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(atrBuy) + ",tp=" + str.tostring(((close-atrBuy)*target1)+close) + ",risk=" + str.tostring(risk/2) + ""
mess_buyAMP2 = "" + str.tostring(ID) + ",buy," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(atrBuy) + ",tp=" + str.tostring(((close-atrBuy)*target2)+close) + ",risk=" + str.tostring(risk/2) + ",betrigger=" + str.tostring(((((close-atrBuy)*target1)+close)-close)/getpips()) + ",beoffset=0"
mess_sellAMP1 = "" + str.tostring(ID) + ",sell," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(atrSell) + ",tp=" + str.tostring(close-((atrSell-close)*target1)) + ",risk=" + str.tostring(risk/2) + ""
mess_sellAMP2 = "" + str.tostring(ID) + ",sell," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(atrSell) + ",tp=" + str.tostring(close-((atrSell-close)*target2)) + ",risk=" + str.tostring(risk/2) + ",betrigger=" + str.tostring((close-(close-((atrSell-close)*target1)))/getpips()) + ",beoffset=0"
mess_buyMT = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "Prix d'entrée " + str.tostring(close) + " " + "SL " + str.tostring(swingLow) + " ⛔️ " + "TP1 " + str.tostring(((close-swingLow)*target1)+close) + " 🎯 " + "TP2 " + str.tostring(((close-swingLow)*target2)+close) + "🎯 " + "⚠️ Avertissement : Respectez votre money management, risquez seulement " + str.tostring(risk) + "% de votre capital sur ce trade. BE si TP1 touché"
mess_sellMT = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "Prix d'entrée " + str.tostring(close) + " " + "SL " + str.tostring(swingHigh) + " ⛔️ " + "TP1 " + str.tostring(close-((swingHigh-close)*target1)) + " 🎯 " + "TP2 " + str.tostring(close-((swingHigh-close)*target2)) + "🎯 " + "⚠️ Avertissement : Respectez votre money management, risquez seulement " + str.tostring(risk) + "% de votre capital sur ce trade. BE si TP1 touché"
mess_buyMP1 = "" + str.tostring(ID) + ",buy," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(swingLow) + ",tp=" + str.tostring(((close-swingLow)*target1)+close) + ",risk=" + str.tostring(risk/2) + ""
mess_buyMP2 = "" + str.tostring(ID) + ",buy," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(swingLow) + ",tp=" + str.tostring(((close-swingLow)*target2)+close) + ",risk=" + str.tostring(risk/2) + ",betrigger=" + str.tostring(((((close-swingLow)*target1)+close)-close)/getpips()) + ",beoffset=0"
mess_sellMP1 = "" + str.tostring(ID) + ",sell," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(swingHigh) + ",tp=" + str.tostring(close-((swingHigh-close)*target1)) + ",risk=" + str.tostring(risk/2) + ""
mess_sellMP2 = "" + str.tostring(ID) + ",sell," + str.tostring(syminfo.ticker) + ",sl=" + str.tostring(swingHigh) + ",tp=" + str.tostring(close-((swingHigh-close)*target2)) + ",risk=" + str.tostring(risk/2) + ",betrigger=" + str.tostring((close-(close-((swingHigh-close)*target1)))/getpips()) + ",beoffset=0"
// Strategy
float risk_long = na
float risk_short = na
float stopLoss = na
float takeProfit1 = na
float takeProfit2 = na
float entry_price = na
bool longcondition = na
bool shortcondition = na
if trendA == "Superichi"
longcondition := buySignal and close > senkouA and senkouA > senkouB
shortcondition := sellSignal and close < senkouA and senkouA < senkouB
if trendA == "EMA"
longcondition := buySignal and close > ema
shortcondition := sellSignal and close < ema
risk_long := risk_long
risk_short := risk_short
lotB = (strategy.equity*riskt-strategy.equity)/(close - swingLow)
lotS = (strategy.equity*riskt-strategy.equity)/(swingHigh - close)
lotB1 = (strategy.equity*riskt-strategy.equity)/(close - atrBuy)
lotS1 = (strategy.equity*riskt-strategy.equity)/(atrSell - close)
if typeSL == "ATR"
if typeTP == "Multiple Target"
if strategy.position_size == 0 and longcondition and inTradeWindow
risk_long := (close - atrBuy) / close
minp = close - atrBuy
if _x
if tlpc == "Telegram"
strategy.entry("long", strategy.long, qty=lotB1, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyAMT, when = minp > security)
if tlpc == "PineConnector"
strategy.entry("long", strategy.long, qty=lotB1, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyAMP1, when = minp > security)
alert(mess_sellAMP2, alert.freq_once_per_bar_close)
else
if tlpc == "Telegram"
strategy.entry("long", strategy.long, qty=lotB1, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyAMT)
if tlpc == "PineConnector"
strategy.entry("long", strategy.long, qty=lotB1, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyAMP1)
alert(mess_sellAMP2, alert.freq_once_per_bar_close)
if strategy.position_size == 0 and shortcondition and inTradeWindow
risk_short := (atrSell - close) / close
minp = atrSell - close
if _x
if tlpc == "Telegram"
strategy.entry("short", strategy.short, qty=lotS1, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellAMT, when = minp > security)
if tlpc == "PineConnector"
strategy.entry("short", strategy.short, qty=lotS1, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellAMP1, when = minp > security)
alert(mess_sellAMP2, alert.freq_once_per_bar_close)
else
if tlpc == "Telegram"
strategy.entry("short", strategy.short, qty=lotS1, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellAMT)
if tlpc == "PineConnector"
strategy.entry("short", strategy.short, qty=lotS1, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellAMP1)
alert(mess_sellAMP2, alert.freq_once_per_bar_close)
if typeTP == "R:R"
if strategy.position_size == 0 and longcondition and inTradeWindow
risk_long := (close - atrBuy) / close
minp = close - atrBuy
if _x
if tlpc == "Telegram"
strategy.entry("long", strategy.long, qty=lotB1, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyAT, when = minp > security)
if tlpc == "PineConnector"
strategy.entry("long", strategy.long, qty=lotB1, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyAP, when = minp > security)
else
if tlpc == "Telegram"
strategy.entry("long", strategy.long, qty=lotB1, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyAT)
if tlpc == "PineConnector"
strategy.entry("long", strategy.long, qty=lotB1, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyAP)
if strategy.position_size == 0 and shortcondition and inTradeWindow
risk_short := (atrSell - close) / close
minp = atrSell - close
if _x
if tlpc == "Telegram"
strategy.entry("short", strategy.short, qty=lotS1, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellAT, when = minp > security)
if tlpc == "PineConnector"
strategy.entry("short", strategy.short, qty=lotS1, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellAP, when = minp > security)
else
if tlpc == "Telegram"
strategy.entry("short", strategy.short, qty=lotS1, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellAT)
if tlpc == "PineConnector"
strategy.entry("short", strategy.short, qty=lotS1, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellAP)
if typeSL == "Swing"
if typeTP == "Multiple Target"
if strategy.position_size == 0 and longcondition and inTradeWindow
risk_long := (close - swingLow) / close
minp = close - swingLow
if _x
if tlpc == "Telegram"
strategy.entry("long", strategy.long, qty=lotB, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyMT, when = minp > security)
if tlpc == "PineConnector"
strategy.entry("long", strategy.long, qty=lotB, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyMP1, when = minp > security)
alert(mess_buyMP2, alert.freq_once_per_bar_close)
else
if tlpc == "Telegram"
strategy.entry("long", strategy.long, qty=lotB, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyMT)
if tlpc == "PineConnector"
strategy.entry("long", strategy.long, qty=lotB, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyMP1)
alert(mess_buyMP2, alert.freq_once_per_bar_close)
if strategy.position_size == 0 and shortcondition and inTradeWindow
risk_short := (swingHigh - close) / close
minp = swingHigh - close
if _x
if tlpc == "Telegram"
strategy.entry("short", strategy.short, qty=lotS, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellMT, when = minp > security)
if tlpc == "PineConnector"
strategy.entry("short", strategy.short, qty=lotS, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellMP1, when = minp > security)
alert(mess_sellMP2, alert.freq_once_per_bar_close)
else
if tlpc == "Telegram"
strategy.entry("short", strategy.short, qty=lotS, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellMT)
if tlpc == "PineConnector"
strategy.entry("short", strategy.short, qty=lotS, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellMP1)
alert(mess_sellMP2, alert.freq_once_per_bar_close)
if typeTP == "R:R"
if strategy.position_size == 0 and longcondition and inTradeWindow
risk_long := (close - swingLow) / close
minp = close - swingLow
if _x
if tlpc == "Telegram"
strategy.entry("long", strategy.long, qty=lotB, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyT, when = minp > security)
if tlpc == "PineConnector"
strategy.entry("long", strategy.long, qty=lotB, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyP, when = minp > security)
else
if tlpc == "Telegram"
strategy.entry("long", strategy.long, qty=lotB, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyT)
if tlpc == "PineConnector"
strategy.entry("long", strategy.long, qty=lotB, comment="Buy " + str.tostring(close) + "", alert_message = mess_buyP)
if strategy.position_size == 0 and shortcondition and inTradeWindow
risk_short := (swingHigh - close) / close
minp = swingHigh - close
if _x
if tlpc == "Telegram"
strategy.entry("short", strategy.short, qty=lotS, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellT, when = minp > security)
if tlpc == "PineConnector"
strategy.entry("short", strategy.short, qty=lotS, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellP, when = minp > security)
else
if tlpc == "Telegram"
strategy.entry("short", strategy.short, qty=lotS, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellT)
if tlpc == "PineConnector"
strategy.entry("short", strategy.short, qty=lotS, comment="Sell " + str.tostring(close) + "", alert_message = mess_sellP)
if typeTP == "Multiple Target"
if tlpc == "Telegram"
if strategy.position_size > 0
stopLoss := strategy.position_avg_price * (1 - risk_long)
takeProfit1 := strategy.position_avg_price * (1 + target1 * risk_long)
takeProfit2 := strategy.position_avg_price * (1 + target2 * risk_long)
entry_price := strategy.position_avg_price
mess_profit1 = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "TP1 Touché ✅ +" + str.tostring(risk*target1) + "% "
strategy.exit("Exit 1", "long", limit = takeProfit1, qty_percent=50, comment_profit = "TP1 ✅", alert_profit = mess_profit1)
if ta.crossover(high, takeProfit1)
mess_profit2 = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "TP2 Touché ✅ +" + str.tostring(risk*target2) + "% "
mess_be = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "BE ❎"
strategy.exit("Exit 2", "long", stop = entry_price, limit = takeProfit2, qty_percent = 100, comment_profit = "TP2 ✅", comment_loss = "BE ❎", alert_profit = mess_profit2)
else
mess_loss = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "SL Touché ❌ -" + str.tostring(risk) + "% "
strategy.exit("Exit 1", "long", stop = stopLoss, qty_percent = 100, comment_loss = "SL ❌", alert_loss = mess_loss)
if strategy.position_size < 0
stopLoss := strategy.position_avg_price * (1 + risk_short)
takeProfit1 := strategy.position_avg_price * (1 - target1 * risk_short)
takeProfit2 := strategy.position_avg_price * (1 - target2 * risk_short)
entry_price := strategy.position_avg_price
mess_profit1 = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "TP1 Touché ✅ +" + str.tostring(risk*target1) + "% "
strategy.exit("Exit 1", "short", limit = takeProfit1, qty_percent = 50, comment_profit = "TP1 ✅", alert_profit = mess_profit1)
if ta.crossunder(low, takeProfit1)
mess_profit2 = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "TP2 Touché ✅ +" + str.tostring(risk*target2) + "% "
mess_be = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "BE ❎"
strategy.exit("Exit 2", "short", stop = entry_price, limit = takeProfit2, qty_percent = 100, comment_profit = "TP2 ✅", comment_loss = "BE ❎", alert_profit = mess_profit2)
else
mess_loss = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "SL Touché ❌ -" + str.tostring(risk) + "% "
strategy.exit("Exit 1", "short", stop = stopLoss, qty_percent = 100, comment_loss = "SL ❌", alert_loss = mess_loss)
if tlpc == "PineConnector"
if strategy.position_size > 0
stopLoss := strategy.position_avg_price * (1 - risk_long)
takeProfit1 := strategy.position_avg_price * (1 + target1 * risk_long)
takeProfit2 := strategy.position_avg_price * (1 + target2 * risk_long)
entry_price := strategy.position_avg_price
strategy.exit("Exit 1", "long", limit = takeProfit1, qty_percent=50, comment_profit = "TP1 ✅")
if ta.crossover(high, takeProfit1)
strategy.exit("Exit 2", "long", stop = entry_price, limit = takeProfit2, qty_percent = 100, comment_profit = "TP2 ✅", comment_loss = "BE ❎")
else
strategy.exit("Exit 1", "long", stop = stopLoss, qty_percent = 100, comment_loss = "SL ❌")
if strategy.position_size < 0
stopLoss := strategy.position_avg_price * (1 + risk_short)
takeProfit1 := strategy.position_avg_price * (1 - target1 * risk_short)
takeProfit2 := strategy.position_avg_price * (1 - target2 * risk_short)
entry_price := strategy.position_avg_price
strategy.exit("Exit 1", "short", limit = takeProfit1, qty_percent = 50, comment_profit = "TP1 ✅")
if ta.crossunder(low, takeProfit1)
strategy.exit("Exit 2", "short", stop = entry_price, limit = takeProfit2, qty_percent = 100, comment_profit = "TP2 ✅", comment_loss = "BE ❎")
else
strategy.exit("Exit 1", "short", stop = stopLoss, qty_percent = 100, comment_loss = "SL ❌")
if typeTP == "R:R"
if strategy.position_size > 0
stopLoss := strategy.position_avg_price * (1 - risk_long)
takeProfit1 := strategy.position_avg_price * (1 + target_stop_ratio * risk_long)
entry_price := strategy.position_avg_price
if tlpc == "Telegram"
mess_profit = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "TP Touché ✅ +" + str.tostring(risk*target_stop_ratio) + "% "
mess_loss = "📈 𝗔𝗖𝗛𝗔𝗧 🔵 " + str.tostring(syminfo.ticker) + " " + "SL Touché ❌ -" + str.tostring(risk) + "% "
strategy.exit("Exit long", "long", stop = stopLoss, limit = takeProfit1, comment_profit="TP ✅", comment_loss="SL ❌", alert_profit = mess_profit, alert_loss = mess_loss)
if tlpc == "PineConnector"
strategy.exit("Exit long", "long", stop = stopLoss, limit = takeProfit1, comment_profit="TP ✅", comment_loss="SL ❌")
if strategy.position_size < 0
stopLoss := strategy.position_avg_price * (1 + risk_short)
takeProfit1 := strategy.position_avg_price * (1 - target_stop_ratio * risk_short)
entry_price := strategy.position_avg_price
if tlpc == "Telegram"
mess_profit = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "TP Touché ✅ +" + str.tostring(risk*target_stop_ratio) + "% "
mess_loss = "📉 𝗩𝗘𝗡𝗧𝗘 🔴 " + str.tostring(syminfo.ticker) + " " + "SL Touché ❌ -" + str.tostring(risk) + "% "
strategy.exit("Exit short", "short", stop = stopLoss, limit = takeProfit1, comment_profit="TP ✅" , comment_loss="SL ❌", alert_profit = mess_profit, alert_loss = mess_loss)
if tlpc == "PineConnector"
strategy.exit("Exit short", "short", stop = stopLoss, limit = takeProfit1, comment_profit="TP ✅" , comment_loss="SL ❌")
//plot
trendema = trendA == "EMA" ? ema : na
plot(trendema, title="EMA", color=color.white, linewidth=2)
trendsuperA = trendA == "Superichi" ? senkouA : na
trendsuperB = trendA == "Superichi" ? senkouB : na
A = plot(trendsuperA,'Senkou Span A', na, offset=offset-1)
B = plot(trendsuperB,'Senkou Span B', na, offset=offset-1)
fill(A,B,senkouA > senkouB ? cloud_a : cloud_b)
plotshape(showArrows and buySignal ? atrLow : na, title='Arrow Up', style=shape.triangleup, location=location.absolute, size=size.tiny, color=color.new(buyColor, 0))
plotshape(showArrows and sellSignal ? atrHigh : na, title='Arrow Down', style=shape.triangledown, location=location.absolute, size=size.tiny, color=color.new(sellColor, 0))
exswingH = typeSL == "Swing" ? swingHigh : na
exswingL = typeSL == "Swing" ? swingLow : na
plot(exswingH, color=color.new(color.white, 60), style=plot.style_cross, title='Swing High')
plot(exswingL, color=color.new(color.white, 60), style=plot.style_cross, title='Swing Low')
exatrS = typeSL == "ATR" ? atrSell : na
exatrB = typeSL == "ATR" ? atrBuy : na
plot(exatrS, color=color.new(color.white, 60), title='ATR')
plot(exatrB, color=color.new(color.white, 60), title='ATR')
p_ep = plot(entry_price, color=color.new(color.white, 0), linewidth=2, style=plot.style_linebr, title='entry price')
p_sl = plot(stopLoss, color=color.new(color.red, 0), linewidth=2, style=plot.style_linebr, title='stopLoss')
p_tp2 = plot(takeProfit2, color=color.new(color.green, 0), linewidth=2, style=plot.style_linebr, title='takeProfit1')
p_tp1 = plot(takeProfit1, color=color.new(#52F071, 0), linewidth=1, style=plot.style_linebr, title='takeProfit2')
fill(p_sl, p_ep, color.new(color.red, transp=85))
fill(p_tp2, p_ep, color.new(color.green, transp=85))
fill(p_tp1, p_ep, color.new(#52F071, transp=85))
colorresult = strategy.netprofit > 0 ? color.green : color.red
profitprc = strategy.netprofit / strategy.initial_capital * 100
periodzone = (backtestEndDate - backtestStartDate) / 3600 / 24 / 1000
var tbl = table.new(position.top_right, 4, 2, border_width=3)
table.cell(tbl, 0, 0, "Symbole", bgcolor = #9B9B9B, width = 6, height = 6)
table.cell(tbl, 1, 0, "Net Profit", bgcolor = #9B9B9B, width = 6, height = 6)
table.cell(tbl, 2, 0, "Trades", bgcolor = #9B9B9B, width = 6, height = 6)
table.cell(tbl, 3, 0, "Period", bgcolor = #9B9B9B, width = 6, height = 6)
table.cell(tbl, 0, 1, str.tostring(syminfo.ticker), bgcolor = #E8E8E8, width = 6, height = 6)
table.cell(tbl, 1, 1, str.tostring(profitprc, format.mintick) + " %", bgcolor = colorresult, width = 6, height = 6)
table.cell(tbl, 2, 1, str.tostring(strategy.closedtrades), bgcolor = colorresult, width = 6, height = 6)
table.cell(tbl, 3, 1, str.tostring(periodzone) + " day", bgcolor = colorresult, width = 6, height = 6)
ICT SETUP BY SHUBHAM MEWARAICT concept setups for buying and selling above ema 200 for long and below ema 200 for short win rate is 70-80% manage proper riskmanagement of your capital
Supply and Demand [tambangEA]Supply and Demand Indicator Overview
The Supply and Demand indicator on TradingView is a technical tool designed to help traders identify areas of significant buying and selling pressure in the market. By identifying zones where price is likely to react, it helps traders pinpoint key support and resistance levels based on the concepts of supply and demand. This indicator plots zones using four distinct types of market structures:
1. Rally-Base-Rally (RBR) : This structure represents a bullish continuation zone. It occurs when the price rallies (increases), forms a base (consolidates), and then rallies again. The base represents a period where buying interest builds up before the continuation of the upward movement. This zone can act as support, where buyers may step back in if the price revisits the area.
2. Drop-Base-Rally (DBR) : This structure marks a bullish reversal zone. It forms when the price drops, creates a base, and then rallies. The base indicates a potential exhaustion of selling pressure and a build-up of buying interest. When price revisits this zone, it may act as support, signaling a buying opportunity.
3. Rally-Base-Drop (RBD) : This structure signifies a bearish reversal zone. Here, the price rallies, consolidates into a base, and then drops. The base indicates a temporary balance before sellers overpower buyers. If price returns to this zone, it may act as resistance, with selling interest potentially re-emerging.
4. Drop-Base-Drop (DBD) : This structure is a bearish continuation zone. It occurs when the price drops, forms a base, and then continues dropping. This base reflects a pause before further downward movement. The zone may act as resistance, with sellers possibly stepping back in if the price revisits the area.
Features of Supply and Demand Indicator
Automatic Zone Detection : The indicator automatically identifies and plots RBR, DBR, RBD, and DBD zones on the chart, making it easier to see potential supply and demand areas.
Customizable Settings : Users can typically adjust the color and transparency of the zones, time frames for analysis, and zone persistence to suit different trading styles.
Visual Alerts : Many versions include alert functionalities, notifying users when price approaches a plotted supply or demand zone.
How to Use Supply and Demand in Trading
Identify High-Probability Reversal Zones : Look for DBR and RBD zones to identify potential areas where price may reverse direction.
Trade Continuations with RBR and DBD Zones : These zones can indicate strong trends, suggesting that price may continue in the same direction.
Combine with Other Indicators: Use it alongside trend indicators, volume analysis, or price action strategies to confirm potential trade entries and exits.
This indicator is particularly useful for swing and day traders who rely on price reaction zones for entering and exiting trades.
Simple Parallel Channel TrackerThis script will automatically draw price channels with two parallel trends lines, the upper trendline and lower trendline. These lines can be changed in terms of appearance at any time.
The Script takes in fractals from local and historic price action points and connects them over a certain period or amount of candles as inputted by the user. It tracks the most recent highs and lows formed and uses this data to determine where the channel begins.
The Script will decide whether to use the most recent high, or low, depending on what comes first.
Why is this useful?
Often, Traders either have no trend lines on their charts, or they draw them incorrectly. Whichever category a trader falls into, there can only be benefits from having Trend lines and Parallel Channels drawn automatically.
Trends naturally occur in all Markets, all the time. These oscillations when tracked allow for a more reliable following of Markets and management of Market cycles.
T3 with ArrowsThe arrows indicate trend reversals - first time closing below and first time closing above.
London USDEGP priceThis indicator calculates the hypothetical USDEGP price using CIB receipts price in London Stock Exchange and its price in EGX. Values are smoothed.
Advanced Pivot Manipulation SuperTrend - Consolidation ZoneHere’s the description translated into English for your TradingView publication:
---
Advanced Pivot Manipulation SuperTrend - Consolidation Zone
Description :
This advanced indicator combines multiple technical tools to provide a comprehensive analysis of trends, key levels, and consolidation zones. Ideal for traders seeking to spot opportunities while avoiding the traps of flat markets, it helps you better understand market dynamics and improve your trading decisions.
Key Features:
1.
Dynamic SuperTrend with Pivot Points:
- An enhanced SuperTrend algorithm based on pivot points for more precise trend tracking.
- Thresholds (Up/Dn) are dynamically adjusted using ATR (Average True Range) for improved volatility adaptation.
2. Consolidation Zones:
- Automatically identifies periods when the market moves within a narrow range (1% by default).
- Consolidation zones are visually highlighted to help avoid risky trades.
3. Dynamic Support and Resistance:
- Automatically calculates support and resistance levels based on a rolling period (configurable).
- These levels serve as key references for potential breakouts or trend reversals.
4. Advanced Detection Tools:
- Includes a volume multiplier and shadow-to-body ratio to signal unusual or potentially manipulated moves (e.g., spoofing).
5. Intuitive Visuals:
- SuperTrend lines are color-coded to indicate bullish (green) or bearish (red) trends.
- Semi-transparent lines mark support and resistance levels, and red backgrounds indicate consolidation zones.
Customizable Parameters:
- Pivot Point Period: Adjust the period for detecting pivot highs and lows.
- ATR Factor and Period: Control the sensitivity of the SuperTrend indicator.
- Lookback Period for S/R: Define the duration for calculating support and resistance levels.
- Volume Multiplier and Shadow/Body Ratio: Configure thresholds for detecting high volumes or anomalies in candlestick patterns.
How to Use:
- Easily identify dominant trends using the SuperTrend.
- Spot consolidation zones to avoid inefficient trades or prepare breakout strategies.
- Use support and resistance levels as reference points for placing orders or adjusting risk management.
Target Audience:
- Intraday and swing traders.
- Anyone looking for a comprehensive and customizable indicator to effectively analyze volatile markets.
---
Notes:
The indicator is fully customizable to suit your needs and strategies. Feel free to experiment with the parameters to maximize its effectiveness according to your trading style.
Keywords: SuperTrend, Support and Resistance, Consolidation, Pivot Points, Trends, ATR, Advanced Trading.
---
This description highlights the indicator’s strengths and is designed to appeal to the TradingView community.
RSI ve MA Al/Sat Stratejisi RSI Hesaplaması: 14 periyotluk RSI kullanarak, fiyatın aşırı alım ya da aşırı satım seviyelerine gelip gelmediğini belirleriz. RSI 50'nin üzerindeyse, bu piyasada bir yükseliş sinyali anlamına gelir.
YekAlgo Pro//@version=5
indicator('YekAlgo Pro', overlay=true, max_labels_count=500)
candle_stability_index_param = input.float(0.5, 'Candle Stability Index', 0, 1, step=0.1, group='Technical', tooltip='Candle Stability Index measures the ratio between the body and the wicks of a candle. Higher - more stable.')
rsi_index_param = input.int(50, 'RSI Index', 0, 100, group='Technical', tooltip='RSI Index measures how overbought/oversold is the market. Higher - more overbought/oversold.')
candle_delta_length_param = input.int(5, 'Candle Delta Length', 3, group='Technical', tooltip='Candle Delta Length measures the period over how many candles the price increased/decreased. Higher - longer period.')
disable_repeating_signals_param = input.bool(false, 'Disable Repeating Signals', group='Technical', tooltip='Removes repeating signals. Useful for removing clusters of signals and general clarity')
GREEN = color.rgb(29, 255, 40)
RED = color.rgb(255, 0, 0)
TRANSPARENT = color.rgb(0, 0, 0, 100)
label_size = input.string('normal', 'Label Size', options= , group='Cosmetic')
label_style = input.string('text bubble', 'Label Style', , group='Cosmetic')
buy_label_color = input(GREEN, 'BUY Label Color', inline='Highlight', group='Cosmetic')
sell_label_color = input(RED, 'SELL Label Color', inline='Highlight', group='Cosmetic')
label_text_color = input(color.white, 'Label Text Color', inline='Highlight', group='Cosmetic')
stable_candle = math.abs(close - open) / ta.tr > candle_stability_index_param
rsi = ta.rsi(close, 14)
bullish_engulfing = close < open and close > open and close > open
rsi_below = rsi < rsi_index_param
decrease_over = close < close
bull = bullish_engulfing and stable_candle and rsi_below and decrease_over and barstate.isconfirmed
bearish_engulfing = close > open and close < open and close < open
rsi_above = rsi > 100 - rsi_index_param
increase_over = close > close
bear = bearish_engulfing and stable_candle and rsi_above and increase_over and barstate.isconfirmed
var last_signal = ''
if bull and (disable_repeating_signals_param ? (last_signal != 'buy' ? true : na) : true)
if label_style == 'text bubble'
label.new(bull ? bar_index : na, low, 'BUY', color=buy_label_color, style=label.style_label_up, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bull ? bar_index : na, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_triangleup, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bull ? bar_index : na, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_arrowup, textcolor=TRANSPARENT, size=label_size)
last_signal := 'buy'
if bear and (disable_repeating_signals_param ? (last_signal != 'sell' ? true : na) : true)
if label_style == 'text bubble'
label.new(bear ? bar_index : na, high, 'SELL', color=sell_label_color, style=label.style_label_down, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_triangledown, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_arrowdown, textcolor=TRANSPARENT, size=label_size)
last_signal := 'sell'
alertcondition(bull, 'BUY Signals', 'New signal: BUY')
alertcondition(bear, 'SELL Signals', 'New signal: SELL')
Support & resistance - DHJ : BUY/SELL Signal//@version=5
indicator(" Support & resistance - DHJ : Support/Resistance, EMA Crossover, Previous Day High/Low", shorttitle = "Support & resistance - DHJ", overlay=true, max_boxes_count=50)
// User Inputs
int lookbackPeriod = input.int(20, "Lookback Period", minval=1, group="Settings")
int vol_len = input.int(2, "Delta Volume Filter Length", tooltip="Higher input, will filter low volume boxes", group="Settings")
float box_withd = input.float(1, "Adjust Box Width", maxval=1000, minval=0, step=0.1, group="Settings")
// Define the EMAs
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
// Plot the EMAs
plot(ema9, color=color.blue, linewidth=1)
plot(ema21, color=color.red, linewidth=1)
// Crossover conditions
longCondition = ta.crossover(ema9, ema21)
shortCondition = ta.crossunder(ema9, ema21)
// Plot buy/sell signals
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Previous day high and low
var float pdHigh = na
var float pdLow = na
if (ta.change(time("1D")))
pdHigh := high
pdLow := low
plot(pdHigh, color=color.green, linewidth=1, title="Previous Day High")
plot(pdLow, color=color.red, linewidth=1, title="Previous Day Low")
// Delta Volume Function
upAndDownVolume() =>
posVol = 0.0
negVol = 0.0
var isBuyVolume = true
switch
close > open => isBuyVolume := true
close < open => isBuyVolume := false
if isBuyVolume
posVol += volume
else
negVol -= volume
posVol + negVol
// Function to identify support and resistance boxes
calcSupportResistance(src, lookbackPeriod) =>
// Volume
Vol = upAndDownVolume()
vol_hi = ta.highest(Vol / 2.5, vol_len)
vol_lo = ta.lowest(Vol / 2.5, vol_len)
var float supportLevel = na
var float supportLevel_1 = na
var float resistanceLevel = na
var float resistanceLevel_1 = na
var box sup = na
var box res = na
var color res_color = na
var color sup_color = na
var float multi = na
var bool brekout_res = na
var bool brekout_sup = na
var bool res_holds = na
var bool sup_holds = na
// Find pivot points
pivotHigh = ta.pivothigh(src, lookbackPeriod, lookbackPeriod)
pivotLow = ta.pivotlow(src, lookbackPeriod, lookbackPeriod)
// Box width
atr = ta.atr(200)
withd = atr * box_withd
// Find support levels with Positive Volume
if (not na(pivotLow)) and Vol > vol_hi
supportLevel := pivotLow
supportLevel_1 := supportLevel - withd
topLeft = chart.point.from_index(bar_index - lookbackPeriod, supportLevel)
bottomRight = chart.point.from_index(bar_index, supportLevel_1)
sup_color := color.from_gradient(Vol, 0, ta.highest(Vol, 25), color(na), color.new(color.green, 30))
sup := box.new(
top_left = topLeft,
bottom_right = bottomRight,
border_color = color.green,
border_width = 1,
bgcolor = sup_color,
text = "Vol: " + str.tostring(math.round(Vol, 2)),
text_color = chart.fg_color,
text_size = size.small
)
// Find resistance levels with Negative Volume
if (not na(pivotHigh)) and Vol < vol_lo
resistanceLevel := pivotHigh
resistanceLevel_1 := resistanceLevel + withd
topLeft = chart.point.from_index(bar_index - lookbackPeriod, resistanceLevel)
bottomRight = chart.point.from_index(bar_index, resistanceLevel_1)
res_color := color.from_gradient(Vol, ta.lowest(Vol, 25), 0, color.new(color.red, 30), color(na))
res := box.new(
top_left = topLeft,
bottom_right = bottomRight,
border_color = color.red,
border_width = 1,
bgcolor = res_color,
text = "Vol: " + str.tostring(math.round(Vol, 2)),
text_color = chart.fg_color,
text_size = size.small
)
// Adaptive Box Len
sup.set_right(bar_index + 1)
res.set_right(bar_index + 1)
// Break of support or resistance conditions
brekout_res := ta.crossover(low, resistanceLevel_1)
res_holds := ta.crossunder(high, resistanceLevel)
sup_holds := ta.crossover(low, supportLevel)
brekout_sup := ta.crossunder(high, supportLevel_1)
// Change Color of Support to red if it was break, change color of resistance to green if it was break
if brekout_sup
sup.set_bgcolor(color.new(color.red, 80))
sup.set_border_color(color.red)
sup.set_border_style(line.style_dashed)
if sup_holds
sup.set_bgcolor(sup_color)
sup.set_border_color(color.green)
sup.set_border_style(line.style_solid)
if brekout_res
res.set_bgcolor(color.new(color.green, 80))
res.set_border_color(color.new(color.green, 0))
res.set_border_style(line.style_dashed)
if res_holds
res.set_bgcolor(res_color)
res.set_border_color(color.new(color.red, 0))
res.set_border_style(line.style_solid)
// Calculate support and resistance levels and their breakouts
= calcSupportResistance(close, lookbackPeriod)
// Check if Resistance becomes Support or Support Becomes Resistance
var bool res_is_sup = na
var bool sup_is_res = na
switch
brekout_res => res_is_sup := true
res_holds => res_is_sup := false
switch
brekout_sup => sup_is_res := true
sup_holds => sup_is_res := false
// Plot Res and Sup breakouts and holds
plotchar(res_holds, "Resistance Holds", "◆", color = #e92929, size = size.tiny, location = location.abovebar, offset = -1)
plotchar(sup_holds, "Support Holds", "◆", color = #20ca26, size = size.tiny, location = location.belowbar, offset = -1)
plotchar(brekout_res and res_is_sup , "Resistance as Support Holds", "◆", color = #20ca26, size = size.tiny, location = location.belowbar, offset = -1)
plotchar(brekout_sup and sup_is_res , "Support as Resistance Holds", "◆", color = #e92929, size = size.tiny, location = location.abovebar, offset = -1)
// Break Out Labels
if brekout_sup and not sup_is_res
label.new(
bar_index , supportLevel ,
text = "Break Sup",
style = label.style_label_down,
color = #7e1e1e,
textcolor = chart.fg_color,
size = size.small
)
if brekout_res and not res_is_sup
label.new(
bar_index , resistanceLevel ,
text = "Break Res",
style = label.style_label_up,
color = #2b6d2d,
textcolor = chart.fg_color,
size = size.small
)
SOL 2X with DecayThe SOL 2X with Decay indicator models the theoretical performance of a 2x leveraged Solana (SOL) token, factoring in daily decay from borrowing costs and compounding effects.
Core Formula:
The indicator calculates the leveraged price using the following formula:
Use this image to check the Formula-
* I have used formula 1 for the easy calculations. *
Where:
SOL Price: Current price of Solana (SOL) in USDT.
2 : Leverage multiplier, doubling the daily returns of SOL.
Decay Rate : Daily cost or decay rate (default: 0.03% or 0.0003).
(Decay rate vary from 0.03% to 0.1%. You can take 0.05% if you want to add more decay)
Days Elapsed: Time (in days) since the specified start date.
How It Works:
Blue Line: Simulates the price of a 2x leveraged SOL token, considering exponential decay.
Orange Line: Plots the actual SOL/USDT price for comparison.
Use Cases:
Understand the long-term impact of decay on leveraged tokens.
Compare leveraged token performance with the underlying asset.
If you have any doubts feel free to Tag me in the chat at Vritant Sawhney or UID 01HJ30D3E0XY6WDKWRCRD93G40.
Thanks to Prof Adam. NO DAYS OFF.
USDEGP Rate MultipleIndicator shows the ratio between USDEGP rate calculated using CIB GDR and the official rate. In no stress, value should be stable.
Advanced MFI + RSI + Bollinger Bands Indicator 🚀📈This custom TradingView indicator is designed to provide advanced insights by combining three powerful tools: MFI (Money Flow Index), RSI (Relative Strength Index), and Bollinger Bands. It’s perfect for traders seeking a comprehensive approach to identifying potential market reversals and confirming entry/exit points.
Key Features:
RSI with Adaptive Multiplier:
Calculates RSI dynamically, adjusting based on its level (below or above 50).
Multiplies RSI values to enhance sensitivity for bullish or bearish signals.
Dual MFI Analysis:
Two separate MFI calculations:
Fast MFI (short period): Captures short-term money flow trends.
Standard MFI (longer period): Provides a broader view of money flow, reducing noise.
Highlights overbought (>90) and oversold (<10) zones with customizable visual cues.
Bollinger Bands Integration:
Combines MFI and RSI values into Bollinger Bands to assess volatility and deviations from the
mean.
Provides upper and lower bands as dynamic thresholds for potential price reversals.
Buy Signal Logic:
A buy signal is triggered when:
MFI and RSI both drop below 10, indicating extreme oversold conditions.
Either indicator rebounds above 15, signaling recovery.
Price or indicators breach the lower Bollinger Band, confirming oversold conditions in
volatile markets.
These criteria ensure a confluence of signals, reducing false positives.
Automated Alerts:
Integrated alert system to notify traders of potential buy opportunities based on the above
criteria.
Alerts are highly customizable, allowing users to stay informed even when away from the
charts.
Visual Enhancements:
Highlights oversold and overbought zones with dynamic background colors for better clarity.
Clear plots for RSI, MFI, and Bollinger Bands, ensuring all critical data is visible at a glance.
How to Use:
Add this indicator to your TradingView chart.
Configure the input settings (RSI length, MFI periods, Bollinger Band multiplier, etc.) to suit
your trading style.
Look for buy signals in oversold zones, confirmed by price rebounding above the lower band
and MFI/RSI recovery.
Enable alerts to receive real-time notifications of buy opportunities.
This indicator is ideal for swing traders, day traders, and anyone looking for a reliable tool to navigate volatile markets. 🚀
Dynamic TestingInput Parameters
`lookbackPeriod` : Number of candles to check for determining the highest high (resistance) and lowest low (support) levels.
`atrPeriod` : The period for calculating the Average True Range (ATR), a measure of market volatility.
`atrMultiplierSL` : Multiplier to calculate the stop-loss distance relative to the ATR.
`atrMultiplierTP1` and `atrMultiplierTP2` : Multipliers to calculate two take-profit levels relative to ATR.
`rewardToRisk` : The ratio between reward (profit) and risk (stop loss) for trade management.
---
Core Calculations
ATR (Average True Range)
atr = ta.atr(atrPeriod)
ATR is computed using the specified period to gauge price volatility.
Volume SMA
volumeSMA = ta.sma(volume, atrPeriod)
The script calculates the simple moving average of volume over the same period as ATR. This is used as a threshold for validating high-volume scenarios.
---
Support and Resistance Levels
`support` : Lowest price over the last `lookbackPeriod` candles.
`resistance` : Highest price over the same period.
`supportBuffer` and `resistanceBuffer` : These are "buffered" zones around support and resistance, calculated using half of the ATR to prevent false breakouts.
---
Entry Scenarios
Bullish Entry (`isBullishEntry`)
The close is above the buffered support level.
The low of the current candle touches or breaks below the support level.
The trading volume is greater than the `volumeSMA`.
Bearish Entry (`isBearishEntry`)
The close is below the buffered resistance level.
The high of the current candle touches or exceeds the resistance level.
The trading volume is greater than the `volumeSMA`.
---
Box Visualization
Bullish and Bearish Boxes
Bullish Box (`bullishBox`):
- A green, semi-transparent rectangle around the support level to highlight the bullish entry zone.
- Dynamically updates based on recent price action.
Bearish Box (`bearishBox`):
- A red, semi-transparent rectangle around the resistance level to highlight the bearish entry zone.
- Adjusts similarly as price evolves.
---
Stop Loss and Take Profit Calculations
Bullish Trades
Stop Loss (`bullishSL`): Calculated as support - atrMultiplierSL * ATR .
Take Profit 1 (`bullishTP1`): support + rewardToRisk * atrMultiplierTP1 * ATR .
Take Profit 2 (`bullishTP2`): support + rewardToRisk * atrMultiplierTP2 * ATR .
Bearish Trades
Stop Loss (`bearishSL`): resistance + atrMultiplierSL * ATR .
Take Profit 1 (`bearishTP1`): resistance - rewardToRisk * atrMultiplierTP1 * ATR .
Take Profit 2 (`bearishTP2`): resistance - rewardToRisk * atrMultiplierTP2 * ATR .
---
Visualization for Key Levels
Bullish Scenario
Green lines represent `bullishTP1` and `bullishTP2` for profit targets.
A red line indicates the `bullishSL` .
Labels like "TP1," "TP2," and "SL" dynamically appear at respective levels to make the targets and risk visually clear.
Bearish Scenario
Red lines represent `bearishTP1` and `bearishTP2` .
A green line marks the `bearishSL` .
Similar dynamic labeling for `TP1` , `TP2` , and `SL` at corresponding bearish levels.
---
Dynamic Updates
Both the entry boxes and key level visualizations (lines and labels) adjust dynamically based on real-time price and volume data.
---
Purpose
Identify high-probability bullish and bearish trade setups.
Define clear entry zones (using boxes) and exit levels (TP1, TP2, SL).
Incorporate volatility (via ATR) and volume into decision-making.
---
Technical Summary
Dynamically visualize support/resistance levels.
Set risk-managed trades using ATR-based stop-loss and profit levels.
Automate visual trade zones for enhanced chart clarity.
---
Trend Intensity Index TeyoV5This indicator measures the strength and direction of a trend by analyzing the relationship between multiple smoothed price averages. It calculates an intensity index value, which ranges from 0 to 100, indicating the strength of the current trend.
Key Features:
Multiple Smoothing Methods: Users can select from various smoothing techniques (e.g., SMA, EMA, WMA) to customize the indicator's sensitivity.
Adjustable Smoothing Periods: Different smoothing periods can be applied to the price data to identify trends at various timeframes.
Intensity Index Calculation: The indicator computes the intensity index by comparing the values of the smoothed price averages. A higher positive value indicates a stronger uptrend, while a higher negative value suggests a stronger downtrend.
Visual Representation: The indicator is displayed as a line plot, with the intensity index values plotted against the price chart.
This indicator can be used to identify potential trend reversals, filter out false signals, and improve the timing of entry and exit points.