Auto Trend Channel + Buy/Sell AlertsThis indicator automatically detects trend channels using a linear regression line, and dynamically plots upper and lower channel boundaries based on standard deviation. It helps traders identify potential Buy and Sell zones with clear visual signals and customizable alerts.
💡 How It Works:
🧠 Regression-Based Channel: Calculates the central trend line using ta.linreg() over a user-defined length.
📏 Dynamic Boundaries: Upper and lower channel lines are offset by a multiplier of the standard deviation for precision volatility tracking.
✅ Buy Signals: Triggered when price crosses above the lower boundary — potential bounce entry.
❌ Sell Signals: Triggered when price crosses below the upper boundary — potential reversal exit.
🔔 Alerts Enabled: Get real-time alerts when price touches the channel lines.
Bands and Channels
Multi Scanner Plot & Table V1Here's how to interpret each column in the table:
Price vs MAs:
What it shows: Where the current price is relative to the short-term (e.g., 20-period) and long-term (e.g., 50-period) Simple Moving Averages (SMAs) calculated on your current chart's timeframe.
Interpretation:
Above Both (Green background): Price is above both the short and long MAs. Generally considered a bullish sign for the current trend.
Below Both (Red background): Price is below both MAs. Generally considered a bearish sign.
Mixed (Gray background): Price is between the two MAs (e.g., above the short but below the long, or vice-versa). Indicates indecision or a potential trend change.
RSI Value:
What it shows: The actual numerical value of the Relative Strength Index (RSI) calculated on your current chart's timeframe.
Interpretation: Just the raw RSI number (e.g., 65.32). The background is always gray. You compare this value to standard overbought/oversold levels (like 70/30) or the levels defined in the script's inputs.
RSI Status:
What it shows: Interprets the RSI Value based on the Overbought/Oversold levels set in the script's inputs (default 70/30). Calculated on your current chart's timeframe.
Interpretation:
Overbought (Red background): RSI is above the overbought level (e.g., > 70). Suggests the asset might be due for a pullback or reversal downwards. Red indicates a potentially bearish condition.
Oversold (Green background): RSI is below the oversold level (e.g., < 30). Suggests the asset might be due for a bounce or reversal upwards. Green indicates a potentially bullish condition.
Neutral (Gray background): RSI is between the oversold and overbought levels.
Last Sig Price:
What it shows: The price level where the last "SIG NOW" Buy or Sell signal occurred on your current chart's timeframe.
Interpretation: Helps you see the entry price of the most recent short-term signal generated by this script. The background color matches the signal type: Green for the last Buy signal, Red for the last Sell signal. N/A if no signal has occurred yet.
SIG NOW:
What it shows: This is the main short-term signal generated by the script based on conditions on your current chart's timeframe. It combines the "Price vs MAs" status and specific RSI conditions (price must be above/below both MAs and RSI must be within a certain range defined in the inputs).
Interpretation:
BUY (Green background): The specific buy conditions are met right now. (Price above both MAs AND RSI is strong but not necessarily overbought).
SELL (Red background): The specific sell conditions are met right now. (Price below both MAs AND RSI is weak but not necessarily oversold).
NEUTRAL (Gray background): Neither the Buy nor the Sell conditions are currently met.
ALERT:
What it shows: Flags unusual volume activity on the current bar compared to the recent average volume (calculated on your current chart's timeframe).
Interpretation:
SPIKE (Yellow background, black text): Current volume is significantly higher than the recent average (defined by the Volume Spike Multiplier). Can indicate strong interest or a potential climax.
DUMP (Purple background): Current volume is significantly lower than the recent average (defined by the Volume Dump Multiplier). Can indicate fading interest.
NONE (Gray background): Volume is within the normal range for the lookback period.
SD$:
What it shows: The price level where the last Volume Spike or Dump occurred on your current chart's timeframe.
Interpretation: Shows the price associated with the most recent significant volume event. The background color indicates the type of the last event: Green if the last event was a Spike, Red if the last event was a Dump. N/A if no Spike/Dump has occurred yet.
BB Value (%B):
What it shows: This relates to Bollinger Bands, but specifically calculated on a Higher Timeframe (HTF) that you can set in the inputs (e.g., Daily BBs while viewing an Hourly chart). It shows the Bollinger Band Percent B (%B) value for that HTF. %B measures where the HTF closing price is relative to the HTF upper and lower bands.
Interpretation:
Value > 1: HTF price closed above the HTF upper Bollinger Band.
Value < 0: HTF price closed below the HTF lower Bollinger Band.
Value between 0 and 1: HTF price closed within the HTF Bollinger Bands (e.g., 0.5 is exactly on the middle band).
The background is always gray.
LTS (Long Term Signal):
What it shows: A signal derived only from the Higher Timeframe (HTF) Bollinger Bands.
Interpretation:
BUY (Green background): The HTF price closed above the HTF upper Bollinger Band (see BB Value > 1). Considered a strong bullish signal from the higher timeframe perspective.
SELL (Red background): The HTF price closed below the HTF lower Bollinger Band (see BB Value < 0). Considered a strong bearish signal from the higher timeframe perspective.
NEUTRAL (Gray background): The HTF price closed within the HTF Bollinger Bands.
How to Understand Bollinger Bands and Signals in this Context:
Bollinger Bands are primarily used for the Long Term Signal (LTS) column. This script calculates BBs on a higher timeframe (you choose which one, or it defaults to the chart's timeframe if left blank).
The "LTS" signal triggers:
A BUY when the price on that higher timeframe closes above its upper Bollinger Band. This often indicates strong momentum or a potential breakout.
A SELL when the price on that higher timeframe closes below its lower Bollinger Band. This often indicates strong negative momentum or a potential breakdown.
The "BB Value" column gives you the raw %B number from that same higher timeframe, showing you exactly where the price is relative to the bands (is it just barely above/below, or way outside?).
The script does not directly use Bollinger Bands from the current chart timeframe for the "SIG NOW" or other table signals. The main short-term signals ("SIG NOW") rely on Moving Averages and RSI on the current timeframe. The LTS provides a longer-term perspective using HTF Bollinger Bands.
In summary: Look at the table to quickly gauge:
Short-term trend (Price vs MAs).
Short-term momentum (RSI Status, SIG NOW).
Recent short-term entry points (Last Sig Price).
Current volume anomalies (ALERT).
Long-term strength/weakness based on HTF Bollinger Bands (LTS, BB Value).
Combine these pieces of information to get a more rounded view of the current market conditions according to this specific script's logic.
supertrend.ch support band level 1in support band level 1 I personally start longing with 1%-5% of my capital stop loss 20%
if we lose this level i start longing at support band level 2 with double as much money, stop loss 20% again.
This is the strongest support band bitcoin has in a bull market
if we close 1-2 weekly candles under the band then this very likely means the support is broken and that a bearmarket will start
supertrend.ch support band level 2above the white band its bullish
under the white band a bearmarket has started
wait for 1-2 weekly closes under the white band to have confirmation that a bearmarket started
PHAI GIAU NHAT VN)
positive and negative are recreated each bar using nz(... ) to keep the old value if no new signal is present.
The line p_mom ? true : nz(positive , false) ensures the variable keeps the correct state across bars.
Clearly displays "UP" and "DOWN" signals.
Fractal CorridorsFractal Corridors - visual tool that maps market structure through a multi-scale lens, revealing the underlying architecture of price action across time. By processing pivot points at multiple depths, it constructs a layered geometric corridors that reflects the self-similar, scalable nature of financial markets. Each pivot scale connects successive highs and lows with lines, and when both sides are present, fills the space between them, forming polygonal bands that shift in shape and density as volatility and trend evolve.
Inputs
Base Depth: Number of bars for the smallest pivot
Factor: Multiplier between small, medium and large depths
Selectable color of components
The real value of this indicator lies not in generating executive signals, but in offering a structural perspective that blends short-term fluctuations with longer-term market cycles. The output allows to visually assess trends in terms of shapes, detect compression zones, and identify multi-timeframe confluence areas where price is likely to react. Whether used for macro trend confirmation or pattern evaluation, this indicator transforms raw price data into a clear, fractal-informed map of market behavior, helping the user navigate the complexity of emerging price through the language of geometry.
ORB-LD-NY-Trail StrategyOpening range breakout strategy.
This runs after the first 15 min of London and New York opens.
Once price breaks either the high or low of the first 15 and order is placed in that direction. Trailing stop for more money!
Have fun!
I've had success, and failures. As with any strategy.
Use at your own risk!
Trading isn't easy!
Neither is automation!
Nothing is guaranteed!
VWAP Bands with Price LineThis indicator plots the VWAP (Volume Weighted Average Price) line along with standard deviation bands (±1σ, ±2σ, ±3σ). It includes two modes:
-Timeframe-based VWAP reset
-Dynamic reset whenever the price touches ±1σ band
It also plots the actual price line over time to compare with the VWAP bands.
Standard Deviation Bands
Bands are calculated like Bollinger Bands but centered on VWAP:
+1σ / -1σ = VWAP ± 1 * std deviation
+2σ / -2σ = VWAP ± 2 * std deviation
+3σ / -3σ = VWAP ± 3 * std deviation
These act as dynamic support/resistance zones.
Dynamic Reset (Touch of ±1σ Band)
If selected:
-VWAP and its bands reset every time price touches either +1σ or -1σ.
-This makes the bands more reactive and useful for identifying short-term mean reversions or breakouts.
How to Read It
VWAP Line (gray): Acts like a gravity center — price tends to revert to it.
±1σ Band (blue): Normal trading range.
±2σ Band (green): Overbought/oversold territory — potential reversals.
±3σ Band (red): Extreme move — often unsustainable without strong trend/volume.
Trading Ideas:
Signal Interpretation
-Price touches ±2σ or ±3σ Consider mean reversion if volume is low
-Price breaks ±1σ and stays Possible trend confirmation
there with volume.
-Switch to dynamic reset Helps in scalping or range trading
mode.
-Price hovers near VWAP No strong trend, avoid breakout trades
Ultimate Ema RibbonEma Ribbon with two parts ema 12 and ema 20 to ema 100 and then ema 150 to 200 with increments of 5 and colored to show trend and make it easy to see the 20ema in red, 50ema in white.
Weekday Divider Lines//@version=5
indicator("Weekday Divider Lines", overlay=true)
// === Define line colors for each weekday ===
mondayColor = color.gray
tuesdayColor = color.yellow
wednesdayColor = color.orange
thursdayColor = color.green
fridayColor = color.blue
// === Plot vertical lines at the beginning of each day (on daily timeframes and below) ===
isNewDay = ta.change(time("D"))
// === Get current day of the week ===
// Monday = 1, ..., Sunday = 7
day = dayofweek
if (isNewDay)
if (day == dayofweek.monday)
line.new(x1=bar_index, y1=low, x2=bar_index, y2=high, color=mondayColor, width=1, style=line.style_dotted)
if (day == dayofweek.tuesday)
line.new(x1=bar_index, y1=low, x2=bar_index, y2=high, color=tuesdayColor, width=1, style=line.style_dotted)
if (day == dayofweek.wednesday)
line.new(x1=bar_index, y1=low, x2=bar_index, y2=high, color=wednesdayColor, width=1, style=line.style_dotted)
if (day == dayofweek.thursday)
line.new(x1=bar_index, y1=low, x2=bar_index, y2=high, color=thursdayColor, width=1, style=line.style_dotted)
if (day == dayofweek.friday)
line.new(x1=bar_index, y1=low, x2=bar_index, y2=high, color=fridayColor, width=1, style=line.style_dotted)
M2 Liqudity WaveGlobal Liquidity Wave Indicator (M2-Based)
The Global Liquidity Wave Indicator is designed to track and visualize the impact of global M2 liquidity on risk assets—especially those highly correlated to monetary expansion, like Bitcoin, MSTR, and other macro-sensitive equities.
Key features include:
Leading Signal: Historically leads Bitcoin price action by approximately 70 days, offering traders and analysts a forward-looking edge.
Wave-Based Projection: Visualizes a "probability cloud"—a smoothed band representing the most likely trajectory for Bitcoin based on changes in global liquidity.
Min/Max Offset Controls: Adjustable offsets let you define the range of lookahead windows to shape the wave and better capture liquidity-driven inflection points.
Explicit Offset Visualization: Option to manually specify an exact offset to fine-tune the overlay, ideal for testing hypotheses or aligning with macro narratives.
Macro Alignment: Particularly effective for assets with high sensitivity to global monetary policy and liquidity cycles.
This tool is not just a chart overlay—it's a lens into the liquidity engine behind the market, helping anticipate directional bias in advance of price moves.
How to use?
- Enable the indicator for BTCUSD.
- Set Offset Range Start and End to 70 and 115 days
- Set Specific Offset to 78 days (this can change so you'll need to play around)
FAQ
Why a global liquidity wave?
The global liquidity wave accounts for variability in how much global liquidity affects an underlying asset. Think of the Global Liquidity Wave as an area that tracks the most probable path of Bitcoin, MSTR, etc. based on the total global liquidity.
Why the offset?
Global liquidity takes time to make its way into assets such as #Bitcoin, Strategy, etc. and there can be many reasons for that. It's never a specific number of days of offset, which is why a global liquidity wave is helpful in tracking probable paths for highly correlated risk assets.
Spot Premium with ROCDescription:
This indicator tracks the spot premium of BTC by comparing the perpetual futures price (perp) from Binance against the spot price on Coinbase. The histogram displays the price difference (spot minus perp) with green bars when spot is higher and red when perp carries a premium. The Rate of Change (ROC) line measures how quickly this premium shifts, with an option to normalize fluctuations for greater stability.
Implications & Possible Use Cases:
• Market Sentiment Gauge: A sustained positive premium often indicates bullish sentiment, while a discount can signal bearish bias.
• Arbitrage Signals: Significant divergences between perp and spot may present short-term arbitrage opportunities across exchanges.
• Risk Management & Hedging: Traders can align derivatives and spot positions when premiums deviate sharply, reducing funding cost exposures.
• Funding Rate Insights: Since perp funding rates tend to follow premium levels, this indicator can act as an early warning for funding spikes.
• Trend Confirmation: Use the normalized ROC to confirm continuation or reversal of premium trends, filtering out noise around small diff values.
Let me know if you would like additional features.
Key Levels (4H and Daily)Key Levels (4H and Daily)
This indicator highlights important key price levels derived from the 4-hour (4H) and daily (D) timeframes, providing traders with critical support and resistance areas. The levels are calculated using the highest highs and lowest lows over a customizable lookback period, offering a dynamic view of significant price points that could influence market movement.
Key Features:
Key Levels for 4H and Daily Timeframes:
The indicator calculates and displays the highest high and lowest low over a user-defined period for both the 4-hour and daily timeframes. This helps traders identify key support and resistance levels that could dictate the market's behavior.
Customizable Lookback Period:
Traders can adjust the lookback period (in days) for both the 4-hour and daily timeframes to reflect different market conditions. This flexibility ensures the levels are tailored to your preferred trading style and market conditions.
Horizontal Lines:
The indicator plots horizontal lines at the high and low levels for both timeframes. These levels serve as dynamic support and resistance areas and help traders monitor price action near these critical points.
Real-Time Updates:
The lines adjust automatically with each new bar, providing up-to-date key levels based on the most recent price action and trading session.
Alert Conditions:
Alerts are built-in to notify traders when the price breaks above or below these key levels. Traders can set up notifications to stay informed when significant market moves occur.
How to Use:
Support and Resistance: Use the levels as potential support and resistance areas where price could reverse. Price often reacts at these levels, providing potential trading opportunities.
Breakouts: Pay attention to breakouts above the high or below the low of these levels. A break above the 4H or daily high could indicate bullish momentum, while a break below could signal bearish trends.
Trend Confirmation: Combine these levels with other technical analysis tools to confirm the overall market trend and enhance your trading strategy.
Perfect for:
Day Traders: Use the 4-hour levels for intraday trading setups, such as potential reversals or breakouts.
Swing Traders: The daily levels provide longer-term insights, helping to identify key zones where price might pause, reverse, or break out.
Market Context: Ideal for those who want to contextualize their trades within broader timeframes, helping to understand the market’s structure at multiple time scales.
This description conveys the utility and functionality of the indicator, focusing on how it helps traders identify and monitor key levels that influence market action.
Micro Channel Alert Pro//@version=6
indicator("Micro Channel Alert Pro", overlay=true)
// === تنظیمات
len = input.int(7, "Micro Channel Length", minval=3, maxval=10)
emaLength = input.int(20, "EMA Length")
minTrendStrength = input.float(0.002, "Min Trend Strength (%)", step=0.0001)
angleThreshold = input.float(25.0, "Min Channel Angle (degrees)")
cooldownBars = input.int(10, "Cooldown after Signal", minval=1)
// === محاسبه EMA و قدرت روند
ema = ta.ema(close, emaLength)
trendStrength = math.abs(ema - ema ) / ema
isTrending = trendStrength > minTrendStrength
// === محاسبه زاویه رگرسیون (به درجه)
regNow = ta.linreg(close, len, 0)
regPrev = ta.linreg(close, len, 1)
angleClose = math.atan(regNow - regPrev) * 180 / math.pi
// === بررسی ساختار HL یا LH
isHL = true
isLH = true
for i = 1 to len - 1
isHL := isHL and (low > low ) and (high > high )
isLH := isLH and (low < low ) and (high < high )
// === بررسی نوسان پایین (کندلهای کوچک)
avgRange = ta.sma(high - low, len)
avgBody = ta.sma(math.abs(close - open), len)
lowVolatility = avgBody / avgRange < 0.6
// === شرایط سیگنال
microUp = isTrending and isLH and angleClose > angleThreshold and lowVolatility and close > high
microDn = isTrending and isHL and angleClose < -angleThreshold and lowVolatility and close < low
// === جلوگیری از سیگنال تکراری
var int lastSignalBar = na
cooldownOk = na(lastSignalBar) or (bar_index - lastSignalBar > cooldownBars)
signalUp = microUp and cooldownOk
signalDn = microDn and cooldownOk
if signalUp or signalDn
lastSignalBar := bar_index
// === نمایش روی چارت
plotshape(signalUp, title="Micro Up", location=location.belowbar, style=shape.labelup, color=color.green, text="Micro ↑")
plotshape(signalDn, title="Micro Down", location=location.abovebar, style=shape.labeldown, color=color.red, text="Micro ↓")
// === آلارم
alertcondition(signalUp, title="Micro Channel Up Alert", message="Micro Channel Up Detected!")
alertcondition(signalDn, title="Micro Channel Down Alert", message="Micro Channel Down Detected!")
Million Moves Algø v4.3//...................../´¯¯/)
//...................,/¯.../
//.................../..../
//.............../´¯/'..'/´¯¯`·¸
//.........../'/.../..../....../¨¯\
//..........('(....´...´... ¯~/'..')
//...........\..............'...../
//............\....\.........._.·´
//.............\..............(
//..............\..............\
//----
//---------
// Telegram Join Us >> t.me
//@version=5
indicator("Million Moves Algø v4.3",overlay = true,max_labels_count = 500)
bullColor = #e43a72
bearColor = #00ffcc
sigsensiviti = input.float(2.5, "Sensivity", tooltip = "Changes the signal display frequency",group = "Main Settings")
signaltype = input.string("All Signals","Signals", ,tooltip = "Changes the Signal Typr" ,group = "Main Settings",display = display.none)
factor = 11//input.int(11, "Factor")
trend_ribbon = input.bool(true, "Trend Ribbon        ",inline = '1', group="Trend Settings")
trend_cloud = input.bool(true, "Trend Cloud",inline = '1', group="Trend Settings",tooltip = "")
chaos_trend = input.bool(true, "Chaos Trend Line  ",inline = '2', group="Trend Settings")
order_blocks = input.bool(false, "Order Block",inline = '2', group="Trend Settings",tooltip = "")
moving_avarg = input.bool(true, "Moving Average  ",inline = '3', group="Trend Settings")
ma_value = input.int(200, "",inline = '3', group="Trend Settings",tooltip = "")
candlestick_color = input.bool(true, "Candlestik Colors  ",inline = '4', group="Advance Settings")
candletype = input.string("CleanScalper","", ,tooltip = "" ,inline = '4',group="Advance Settings",display = display.none)
over_rsi = input.bool(true, "Show Overbought/OverSold", group="Advance Settings",tooltip = "")
c_break = input.bool(false, "Show Channel Breakouts", group="Advance Settings",tooltip = "")
signals_show = input.bool(true, "Turn Signals Off", group="Advance Settings",tooltip = "")
dashboard = "Million Moves DASHBOARD Settings"
showDashboard = input.bool(true,"Dashboard On/Off",tooltip = "Changes the size of the dashboard" ,group = dashboard,display = display.none)
dashboardLocation = input.string("Bottom Right","Dashboard Location", , inline = "3",tooltip = "Changes dashboard positions" ,group = dashboard,display = display.none)
dashboardSize = input.string("Small","Dashboard Size       ", , inline = "4",tooltip = "Changes the size of the dashboard" ,group = dashboard,display = display.none)
riskmanage = input.bool(false, "On/Off -Strength  ",inline = '1', group="Enable Stop-loss/take-profit areas")
tpstrength = input.float(1,"",tooltip = "" ,inline = '1',group="Enable Stop-loss/take-profit areas",display = display.none)
TP1 = input.bool(true, "TP 1Â Â ",inline = '2', group="Enable Stop-loss/take-profit areas")
TP2 = input.bool(true, "TP 2Â Â ",inline = '2', group="Enable Stop-loss/take-profit areas")
TP3 = input.bool(true, "TP 3Â Â ",inline = '2', group="Enable Stop-loss/take-profit areas")
// MainMA
emaLength = ma_value//input.int(title="EMA Length", defval=200, minval=2)
emaSource = close
ema = ta.ema(emaSource, emaLength)
ema2 = ta.ema(emaSource, emaLength)
plot(moving_avarg? ema : na, color=close > ema and close > ema ? color.green : color.red, linewidth=4,editable = false)
// Signals
supertrend(_close, factor, atrLen) =>
atr = ta.atr(atrLen)
upperBand = _close + factor * atr
lowerBand = _close - factor * atr
prevLowerBand = nz(lowerBand )
prevUpperBand = nz(upperBand )
lowerBand := lowerBand > prevLowerBand or close < prevLowerBand ? lowerBand : prevLowerBand
upperBand := upperBand < prevUpperBand or close > prevUpperBand ? upperBand : prevUpperBand
int direction = na
float superTrend = na
prevSuperTrend = superTrend
if na(atr )
direction := 2
else if prevSuperTrend == prevUpperBand
direction := close > upperBand ? -1 : 1
else
direction := close < lowerBand ? 1 : -1
superTrend := direction == -1 ? lowerBand : upperBand
sma1 = ta.sma(close, 8)
sma2 = ta.sma(close, 9)
sma3 = ta.sma(close, 13)
= supertrend(open, sigsensiviti, factor)
Cbull = ta.crossover(close, supertrend) and close >= sma3
Cbear = ta.crossunder(close, supertrend) and close <= sma3
bull = ta.crossover(close, supertrend) and close >= sma3 and not(close > ema and close > ema)
bear = ta.crossunder(close, supertrend) and close <= sma3 and not(not(close > ema and close > ema))
Sbull = ta.crossover(close, supertrend) and close >= sma3 and (close > ema and close > ema)
Sbear = ta.crossunder(close, supertrend) and close <= sma3 and not(close > ema and close > ema)
countbull = ta.barssince(Cbull)
countbear = ta.barssince(Cbear)
Trigger = nz(countbull, bar_index) < nz(countbear, bar_index) ? 1 : 0
plotshape(signals_show?signaltype =="Smart Signals"? na : bull:na, title = "Buy", text = 'Buy', style = shape.labelup, location = location.belowbar, color= bearColor,textcolor = color.black, size = size.normal,editable = false)
plotshape(signals_show?signaltype =="Smart Signals"? na : bear:na, title = "Sell", text = 'Sell', style = shape.labeldown, color= bullColor,textcolor = color.white, size = size.normal,editable = false)
plotshape(signals_show?Sbull:na, title = "Buy", text = 'Smart Buy', style = shape.labelup, location = location.belowbar, color= bearColor,textcolor = color.black, size = size.normal,editable = false)
plotshape(signals_show?Sbear:na, title = "Sell", text = 'Smart Sell', style = shape.labeldown, color= bullColor,textcolor = color.white, size = size.normal,editable = false)
// Trends
HighestTrend = ta.ema(close, 20)
LowestTrend = ta.ema(close, 55)
Trend01 = ta.ema(close,50)
Trend02 = ta.ema(close,45)
Trend03 = ta.ema(close,40)
Trend04 = ta.ema(close,35)
Trend05 = ta.ema(close,30)
Trend06 = ta.ema(close,25)
var bool uptrend = false
buySignal = ta.crossover(HighestTrend, LowestTrend)
sellSignal = ta.crossunder(HighestTrend, LowestTrend)
uptrend := buySignal ? true : sellSignal ? false : uptrend
plot(trend_ribbon?HighestTrend:na, color = uptrend ? color.new(bearColor,80) : color.new(bullColor,80),editable = false)
plot(trend_ribbon?Trend01:na, color = uptrend ? color.new(bearColor,20) : color.new(bullColor,20), editable = false)
plot(trend_ribbon?Trend02:na, color = uptrend ? color.new(bearColor,30) : color.new(bullColor,30), editable = false)
plot(trend_ribbon?Trend03:na, color = uptrend ? color.new(bearColor,40) : color.new(bullColor,40), editable = false)
plot(trend_ribbon?Trend04:na, color = uptrend ? color.new(bearColor,50) : color.new(bullColor,50), editable = false)
plot(trend_ribbon?Trend05:na, color = uptrend ? color.new(bearColor,60) : color.new(bullColor,60), editable = false)
plot(trend_ribbon?Trend06:na, color = uptrend ? color.new(bearColor,70) : color.new(bullColor,70), editable = false)
plot(trend_ribbon?LowestTrend:na, color = uptrend ? color.new(bearColor,10) : color.new(bullColor,10), editable = false)
// Dashboard
indicatorTF = "Chart"
// -- MTF Function
f_chartTfInMinutes() =>
float _resInMinutes = timeframe.multiplier * (
timeframe.isseconds ? 1. / 60 :
timeframe.isminutes ? 1. :
timeframe.isdaily ? 60. * 24 :
timeframe.isweekly ? 60. * 24 * 7 :
timeframe.ismonthly ? 60. * 24 * 30.4375 : na)
equal_tf(res) => str.tonumber(res) == f_chartTfInMinutes()
higher_tf(res) => str.tonumber(res) > f_chartTfInMinutes()
too_small_tf(res) => (timeframe.isweekly and res=="1") or (timeframe.ismonthly and str.tonumber(res) < 10)
securityNoRep(sym, res, src) =>
bool _bull = na
_bull := equal_tf(res) ? src : _bull
_bull := higher_tf(res) ? request.security(sym, res, src, barmerge.gaps_off, barmerge.lookahead_on) : _bull
bull_array = request.security_lower_tf(syminfo.tickerid, higher_tf(res) ? str.tostring(f_chartTfInMinutes()) : too_small_tf(res) ? (timeframe.isweekly ? "3" : "10") : res, src)
if array.size(bull_array) > 1 and not equal_tf(res) and not higher_tf(res)
_bull := array.pop(bull_array)
array.clear(bull_array)
_bull
// Checking Trend
di_length = 14
adx_smoothing = 14
bullish_threshold_multiplier = 1.2
bearish_threshold_multiplier = 0.8
= ta.dmi(di_length, adx_smoothing)
median_adx = ta.sma(_adx, 14)
bullish_threshold = median_adx * bullish_threshold_multiplier
bearish_threshold = median_adx * bearish_threshold_multiplier
detectADXTrend() =>
isBullish = _adx > bullish_threshold
isBearish = _adx < bearish_threshold
trendQuality = isBullish ? 1 : isBearish ? -1 : 0
// Wywołanie funkcji
adxTrend = detectADXTrend()
// MTF
TF1Bull = securityNoRep(syminfo.tickerid, "1" , adxTrend)
TF3Bull = securityNoRep(syminfo.tickerid, "3" , adxTrend)
TF5Bull = securityNoRep(syminfo.tickerid, "5" , adxTrend)
TF10Bull = securityNoRep(syminfo.tickerid, "10" , adxTrend)
TF15Bull = securityNoRep(syminfo.tickerid, "15" , adxTrend)
TF30Bull = securityNoRep(syminfo.tickerid, "30" , adxTrend)
TF60Bull = securityNoRep(syminfo.tickerid, "60" , adxTrend)
TF120Bull = securityNoRep(syminfo.tickerid, "120" , adxTrend)
TF240Bull = securityNoRep(syminfo.tickerid, "240" , adxTrend)
TF720Bull = securityNoRep(syminfo.tickerid, "720" , adxTrend)
TFDBull = securityNoRep(syminfo.tickerid, "1440", adxTrend)
// -- Volatility
atrr = 3 * ta.atr(10)
stdAtr = 2 * ta.stdev(atrr, 20)
smaAtr = ta.sma(atrr, 20)
topAtrDev = smaAtr + stdAtr
bottomAtrDev = smaAtr - stdAtr
calcDev = (atrr - bottomAtrDev) / (topAtrDev - bottomAtrDev)
percentVol = 40 * calcDev + 30
string VolStatus = percentVol < 35 ? "Very Low" :percentVol < 50 ? "Low" :percentVol < 70 ? "High" :"Very High"
// Set RSI parameters
rsiLength = 14
rsiSource = close
rsiValue = ta.rsi(rsiSource, rsiLength)
bullishThreshold = 50
rsiColor = rsiValue > bullishThreshold ? color.green : color.red
table_position = dashboardLocation == 'Bottom Left' ? position.bottom_left
: dashboardLocation == 'Top Right' ? position.top_right
: position.bottom_right
table_size = dashboardSize == 'Tiny' ? size.tiny
: dashboardSize == 'Small' ? size.small
: size.normal
tb = table.new(table_position, 18, 8
, bgcolor = #11172565
, border_color = #373a4600
, border_width = 1
, frame_color = #000000
, frame_width = 1)
if showDashboard
if barstate.islast
table.cell(tb, 0, 0, '  Million Moves Dashboard                                ', text_color = color.white,text_halign = text.align_left, text_size = table_size,bgcolor = #18233a)
table.merge_cells(tb, 0, 0, 3, 0)
tb.cell(0, 2, "âš ï¸ Volatility", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(1, 2, VolStatus, text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(2, 2, "ðŸ³ï¸„1¤7 RSI", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(3, 2, str.tostring(rsiValue,"#.##"), text_color = rsiColor, text_size = table_size, text_halign = text.align_center)
tb.cell(0, 3, "Timeframe", text_color = #b0b2b9, text_size = table_size, text_halign = text.align_center)
tb.cell(1, 3, "Trend", text_color = #b0b2b9, text_size = table_size, text_halign = text.align_center)
tb.cell(2, 3, "Timeframe", text_color = #b0b2b9, text_size = table_size, text_halign = text.align_center)
tb.cell(3, 3, "Trend", text_color = #b0b2b9, text_size = table_size, text_halign = text.align_center)
tb.cell(0, 4, "3 Minute", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(1, 4, TF3Bull?"Bullish":"Bearish", text_color = TF3Bull?color.green:color.red, text_size = table_size, text_halign = text.align_center)
tb.cell(2, 4, "2 Hour", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(3, 4, TF120Bull?"Bullish":"Bearish", text_color = TF120Bull?color.green:color.red, text_size = table_size, text_halign = text.align_center)
tb.cell(0, 5, "5 Minute", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(1, 5, TF5Bull?"Bullish":"Bearish", text_color = TF5Bull?color.green:color.red, text_size = table_size, text_halign = text.align_center)
tb.cell(2, 5, "4 Hour", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(3, 5, TF240Bull?"Bullish":"Bearish", text_color = TF240Bull?color.green:color.red, text_size = table_size, text_halign = text.align_center)
tb.cell(0, 6, "15 Minute", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(1, 6, TF15Bull?"Bullish":"Bearish", text_color = TF15Bull?color.green:color.red, text_size = table_size, text_halign = text.align_center)
tb.cell(2, 6, "12 Hour", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(3, 6, TF720Bull?"Bullish":"Bearish", text_color = TF720Bull?color.green:color.red, text_size = table_size, text_halign = text.align_center)
tb.cell(0, 7, "1 Hour", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(1, 7, TF60Bull?"Bullish":"Bearish", text_color = TF60Bull?color.green:color.red, text_size = table_size, text_halign = text.align_center)
tb.cell(2, 7, "Daily", text_color = color.white, text_size = table_size, text_halign = text.align_center)
tb.cell(3, 7, TFDBull?"Bullish":"Bearish", text_color = TFDBull?color.green:color.red, text_size = table_size, text_halign = text.align_center)
// bgcolor
// Define the RSI
rsi_Source = close
rsi_Period = 14
rsi_ = ta.rsi(rsi_Source, rsi_Period)
// Define thresholds for high and highest bullish/bearish levels
highBull = 75
highestBull = 85
highBear = 25
highestBear = 15
// Background color based on RSI level
bgColor = rsi_ > highestBull ? color.rgb(0, 255, 204, 86) : rsi_ > highBull ? #00ffcc10 :rsi_ < highestBear ? #e43a7333 : rsi_ < highBear ? color.rgb(228, 58, 115, 93) : na // High Bear - Light Red
bgcolor(over_rsi?bgColor:na, title="RSI Background")
//Ema Cloud
ema150 = ta.ema(close, 150)
ema250 = ta.ema(close, 250)
fill(plot(trend_cloud? ema150: na, "", na, editable=false), plot(trend_cloud? ema250: na, "", na, editable=false), ema150 > ema250 ? color.new(color.green, 70) : ema150 < ema250 ? color.new(color.red, 70) : na)
// Bar color
src = close
len = 14//input.int(14, minval=1, title='RSI Length')
up = ta.rma(math.max(ta.change(src), 0), len)
down = ta.rma(-math.min(ta.change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - 100 / (1 + up / down)
tierLow = rsi <= 45
tierMid = rsi > 45 and rsi <= 55
tierHigh = rsi > 55
color colorVar = na
colorVar := tierLow ? #db3943 : // Red for low RSI
tierMid ? #9900CA : // Purple for mid RSI
tierHigh ? #30b56a : // Green for high RSI
na
if (tierMid)
colorVar := rsi <= 50 ? #9900ca : #b200ff // Gradient between the mid values
if (tierHigh)
colorVar := rsi <= 65 ? #30b56a : #30b56a // Gradient between high values
green = #00DD00
red = #DD0000
barcolor(candlestick_color?candletype=="CleanScalper"?colorVar:candletype=="Trend Ribbon"?uptrend?green:red:close > ema and close > ema ? green : red:na)
// Define finer tiers for a more nuanced gradient
tierLow1 = rsi <= 30
tierLow2 = rsi > 30 and rsi <= 45
tierHigh2 = rsi > 65 and rsi <= 75
tierHigh3 = rsi > 55
color upTier = na
color downTier = na
downTier := tierLow1 ? #e43a72 : tierLow2 ? #e6002352 : color(na)
upTier := tierHigh2 ? #00ffcc : tierHigh3 ? #00ffcc65 :color(na)
// Cloud
k_length = 0.425
uphighColor = #ca009e4d
uplowColor = #ca009e27
downhighColor = #b300ff2f
downlowColor = #9700ca10
= ta.kc(close, 10, 10.5*k_length)
= ta.kc(close, 10, 9.5*k_length)
= ta.kc(close, 10, 8*k_length)
= ta.kc(close, 10, 3*k_length)
middleLineValue = ta.ema((upperKC1 + lowerKC1) / 2, 50)
middleLineColor = middleLineValue > middleLineValue ? color.green : color.red
middleLine = plot(middleLineValue, "Middle Line", color=middleLineColor,linewidth=2, editable=false)
k1 = plot(ta.ema(upperKC1, 50), "", color = downTier, style=plot.style_circles,linewidth = 2, editable=false)
k2 = plot(ta.ema(upperKC2, 50), "", na, editable=false)
k3 = plot(ta.ema(upperKC3, 50), "", na, editable=false)
k4 = plot(ta.ema(upperKC4, 50), "", na, editable=false)
k5 = plot(ta.ema(lowerKC4, 50), "", na, editable=false)
k6 = plot(ta.ema(lowerKC3, 50), "", na, editable=false)
k7 = plot(ta.ema(lowerKC2, 50), "", na, editable=false)
k8 = plot(ta.ema(lowerKC1, 50), "", color = upTier, style=plot.style_circles,linewidth = 2, editable=false)
fill(k1, k2, uphighColor , editable=false)
fill(k2, k3, uplowColor , editable=false)
//fill(k3, k4, color.new(red2, 90) , editable=false)
//fill(k5, k6, color.new(green2, 90) , editable=false)
fill(k6, k7, downlowColor , editable=false)
fill(k7, k8, downhighColor, editable=false)
//Tralling Step
amplitude = 3//input(title='Amplitude', defval=2)
channelDeviation = 2//input(title='Channel Deviation', defval=2)
showArrows = false//input(title='Show Arrows', defval=true)
showChannels = false//input(title='Show Channels', defval=true)
src5 = close
len_a = 14
up_a = ta.rma(math.max(ta.change(src5), 0), len_a)
var int trend = 0
var int nextTrend = 0
var float maxLowPrice = nz(low , low)
var float minHighPrice = nz(high , high)
var float up1 = 0.0
var float down1 = 0.0
float atrHigh = 0.0
float atrLow = 0.0
float arrowUp = na
float arrowDown = na
atr2 = ta.atr(100) / 2
dev = channelDeviation * atr2
highPrice1 = high
lowPrice1 = low
highma = ta.sma(high, amplitude)
lowma = ta.sma(low, amplitude)
if nextTrend == 1
maxLowPrice := math.max(lowPrice1, maxLowPrice)
if highma < maxLowPrice and close < nz(low , low)
trend := 1
nextTrend := 0
minHighPrice := highPrice1
minHighPrice
else
minHighPrice := math.min(highPrice1, minHighPrice)
if lowma > minHighPrice and close > nz(high , high)
trend := 0
nextTrend := 1
maxLowPrice := lowPrice1
maxLowPrice
if trend == 0
if not na(trend ) and trend != 0
up1 := na(down1 ) ? down1 : down1
arrowUp := up_a - atr2
arrowUp
else
up1 := na(up1 ) ? maxLowPrice : math.max(maxLowPrice, up1 )
up1
atrHigh := up1 + dev
atrLow := up1 - dev
atrLow
else
if not na(trend ) and trend != 1
down1 := na(up1 ) ? up1 : up1
arrowDown := down1 + atr2
arrowDown
else
down1 := na(down1 ) ? minHighPrice : math.min(minHighPrice, down1 )
down1
atrHigh := down1 + dev
atrLow := down1 - dev
atrLow
ht = trend == 0 ? up1 : down1
var color buyColor = #00e73a
var color sellColor = color.red
htColor = trend == 0 ? buyColor : sellColor
htPlot = plot(chaos_trend?ht:na, title='ATR', linewidth=2, color=htColor,editable = false)
// Risk Manager
tpLabels(tp,bull,bear) =>
rsi1 = ta.rsi(close, 14)
countBull = ta.barssince(bull)
countBear = ta.barssince(bear)
trigger = nz(countBull, bar_index) < nz(countBear, bar_index) ? 1 : 0
tp1Bull = ta.crossover (rsi1, 70), tp2Bull = ta.crossover (rsi1, 85), tp3Bull = ta.crossover (rsi1, 100)
tp1Bear = ta.crossunder(rsi1, 30), tp2Bear = ta.crossunder(rsi1, 15), tp3Bear = ta.crossunder(rsi1, 5)
tp1Bull := tp1Bull and (nz(ta.barssince(tp1Bull) , 9999) > countBull), tp2Bull := tp2Bull and (ta.barssince(tp1Bull) <= countBull), tp2Bull := tp2Bull and (nz(ta.barssince(tp2Bull) , 9999) > countBull), tp3Bull := tp3Bull and (ta.barssince(tp2Bull) <= countBull), tp3Bull := tp3Bull and (nz(ta.barssince(tp3Bull) , 9999) > countBull)
tp1Bear := tp1Bear and (nz(ta.barssince(tp1Bear) , 9999) > countBear), tp2Bear := tp2Bear and (ta.barssince(tp1Bear) <= countBear), tp2Bear := tp2Bear and (nz(ta.barssince(tp2Bear) , 9999) > countBear), tp3Bear := tp3Bear and (ta.barssince(tp2Bear) <= countBear), tp3Bear := tp3Bear and (nz(ta.barssince(tp3Bear) , 9999) > countBear)
trigger ? (tp == 1 ? tp1Bull : tp == 2 ? tp2Bull : tp3Bull) : (tp == 1 ? tp1Bear : tp == 2 ? tp2Bear : tp3Bear)
plotshape(TP1 and tpLabels(1,Cbull,Cbear) and Trigger, "TP", shape.xcross, location.abovebar, color.green , 0, "TP1", color.green , false,size = size.tiny)
plotshape(TP2 and tpLabels(2,Cbull,Cbear) and Trigger, "TP", shape.xcross, location.abovebar, color.green , 0, "TP2", color.green , false,size = size.tiny)
plotshape(TP3 and tpLabels(3,Cbull,Cbear) and Trigger, "TP", shape.xcross, location.abovebar, color.green , 0, "TP3", color.green , false,size = size.tiny)
plotshape(TP1 and tpLabels(1,Cbull,Cbear) and not Trigger, "TP", shape.xcross, location.belowbar, color.red, 0, "TP1", color.red, false,size = size.tiny)
plotshape(TP2 and tpLabels(2,Cbull,Cbear) and not Trigger, "TP", shape.xcross, location.belowbar, color.red, 0, "TP2", color.red, false,size = size.tiny)
plotshape(TP3 and tpLabels(3,Cbull,Cbear) and not Trigger, "TP", shape.xcross, location.belowbar, color.red, 0, "TP3", color.red, false,size = size.tiny)
_bull = Cbull
_bear = Cbear
risksteps = tpstrength
percTrailingSL = 1//input.float(1, "", 0, step=0.1, inline="2", group="RISK MANAGEMENT SETTINGS")
usePercSL = false//input(false, "% Trailing sl", inline="2", group="RISK MANAGEMENT SETTINGS")
enableTpSlAreas = riskmanage
useTP1 = true //input(true, "", inline="4", group="RISK MANAGEMENT SETTINGS")
multTP1 = risksteps //input.float(1, "TP 1", 0, inline="4", group="RISK MANAGEMENT SETTINGS")
useTP2 = true//input(true, "", inline="5", group="RISK MANAGEMENT SETTINGS")
multTP2 = risksteps * 2 //input.float(2, "TP 2", 0, inline="5", group="RISK MANAGEMENT SETTINGS")
useTP3 = true //input(true, "", inline="6", group="RISK MANAGEMENT SETTINGS")
multTP3 = risksteps * 3 //input.float(3, "TP 3", 0, inline="6", group="RISK MANAGEMENT SETTINGS")
tpLabels = true //input(true, "Take profit labels", group="RISK MANAGEMENT SETTINGS")
// Plots
none = close > 0
countBull = ta.barssince(_bull)
countBear = ta.barssince(_bear)
trigger = nz(countBull, bar_index) < nz(countBear, bar_index) ? 1 : 0
atrBand = usePercSL ? (trigger ? low : high) * (percTrailingSL / 100) : ta.atr(14) * 2.2
atrStop = trigger ? low - atrBand : high + atrBand
lastTrade(src) => ta.valuewhen(_bull or _bear, src, 0)
entry_y = lastTrade(close)
stop_y = lastTrade(atrStop)
tp1_y = (entry_y-lastTrade(atrStop))*multTP1 + entry_y
tp2_y = (entry_y-lastTrade(atrStop))*multTP2 + entry_y
tp3_y = (entry_y-lastTrade(atrStop))*multTP3 + entry_y
labelTpSl(cond, y, txt, color) =>
label labelTpSl = enableTpSlAreas and cond ? label.new(bar_index + 1, y, txt, xloc.bar_index, yloc.price, color, label.style_label_left, color.white, size.normal) : na
label.delete(labelTpSl )
labelTpSl(none, entry_y, "Entry : " + str.tostring(math.round_to_mintick(entry_y)), color.orange)
labelTpSl(none, stop_y , "Stop loss : " + str.tostring(math.round_to_mintick(atrStop)), color.red)
labelTpSl(useTP1 and multTP1 != 0, tp1_y, "TP 1 : " + str.tostring(math.round_to_mintick(tp1_y)), color.green)
labelTpSl(useTP2 and multTP2 != 0, tp2_y, "TP 2 : " + str.tostring(math.round_to_mintick(tp2_y)), color.green)
labelTpSl(useTP3 and multTP3 != 0, tp3_y, "TP 3 : " + str.tostring(math.round_to_mintick(tp3_y)), color.green)
lineTpSl(cond, y, color, style) =>
line lineTpSl = enableTpSlAreas and cond ? line.new(bar_index - (trigger ? countBull : countBear), y, bar_index + 1, y, xloc.bar_index, extend.none, color, style) : na
line.delete(lineTpSl )
lineTpSl(none, entry_y, color.orange, line.style_dashed)
lineTpSl(none, stop_y , color.red , line.style_solid )
lineTpSl(useTP1 and multTP1 != 0, tp1_y, color.green, line.style_dotted)
lineTpSl(useTP2 and multTP2 != 0, tp2_y, color.green, line.style_dotted)
lineTpSl(useTP3 and multTP3 != 0, tp3_y, color.green, line.style_dotted)
// Reversal Signals
enableReversal = true
ReversalInputs = 25//input.int(14, minval=1, title="Reversals Sensitivity", group="Reversal Settings")
overbought = 75//input(75, 'Reversal Down Level', group='Reversal Settings')
oversold = 25//input(25, 'Reversal Up Level', group='Reversal Settings')
upwardd = ta.rma(math.max(ta.change(close), 0), ReversalInputs)
dnwardd = ta.rma(-math.min(ta.change(close), 0), ReversalInputs)
source = dnwardd == 0 ? 100 : upwardd == 0 ? 0 : 100 - (100 / (1 + upwardd / dnwardd))
revdn = ta.crossunder(source, overbought) and enableReversal
revup = ta.crossover(source, oversold) and enableReversal
plotshape(revup, 'Reversal Up Signal', shape.labelup, location.belowbar, #b300ff4f, text='', size=size.small, textcolor=color.white)
plotshape(revdn, 'Reversal Down Signal', shape.labeldown, location.abovebar, #ca009e79, text='', size=size.small, textcolor=color.white)
//Channel Breakouts
bars = 3//input(3)
checkbox = true//input.bool(title= "color chenging by trend", defval=true)
ph = ta.pivothigh(high, bars, bars)
pl = ta.pivotlow(low, bars, bars)
//INIT VARIABLES
var int ph_uptrend_flag = 0
var float ph_valid1 = 0
var float ph_valid2 = 0
var float ph_valid3 = 0
var float ph_valid4 = 0
var float ph_valid5 = 0
var float pl_valid1 = 0
var float pl_valid2 = 0
var float pl_valid3 = 0
var float pl_valid4 = 0
var float pl_valid5 = 0
var float ph_valid_old = 2
var float pl_valid_old = 0 // non meaningful number here for initialization only
ph_non_na = nz(ph, 0)
pl_non_na = nz(pl, 0) // stores 0's instead of na's for non-pivot-pointed bars
if ph_non_na != 0
ph_valid5 := ph_valid4
ph_valid4 := ph_valid3
ph_valid3 := ph_valid2
ph_valid2 := ph_valid1
ph_valid1 := ph_non_na
ph_valid_old := ph_valid1
ph_valid_old
else
ph_valid1 := ph_valid1
ph_valid_old := ph_valid_old
ph_valid_old
if pl_non_na != 0
pl_valid5 := pl_valid4
pl_valid4 := pl_valid3
pl_valid3 := pl_valid2
pl_valid2 := pl_valid1
pl_valid1 := pl_non_na
pl_valid_old := pl_valid1
pl_valid_old
else
pl_valid1 := pl_valid1
pl_valid_old := pl_valid_old
pl_valid_old
max = math.max(ph_valid2, ph_valid1)
min = math.min(pl_valid2, pl_valid1)
avg = math.avg(ph_valid2, ph_valid1,pl_valid2, pl_valid1)
plot(c_break ?max:na, title = "High level", color=green)
plot(c_break ?min:na, title = "Low level", color=red)
//plot(avg, title = "Mid level", color=color.yellow )
// OrderBlock
box_ob = order_blocks//input.bool(false, "Toggle Order Block", group="ORDER BLOCK")
box_hide_gray = true//input.bool(false, "Hide gray boxes", group="ORDER BLOCK")
bos_type = "High and Low"//input.string("High and Low", "MSB trigger", , group="ORDER BLOCK")
box_sv = true//input.bool(true, "Plot demand boxes", group="ORDER BLOCK")
box_test_delay = 3//input.int(3, "Delay to count test of demand box", 1, group="ORDER BLOCK")
box_fill_delay = 3//input.int(3, "Delay to count fill of demand box", 1, group="ORDER BLOCK")
box_test_sv = true//input.bool(true, "Dim tested demand boxes", group="ORDER BLOCK")
box_stop_sv = true//input.bool(true, "Stop plotting filled demand boxes", group="ORDER BLOCK")
var float pvh1_price = array.new_float(1000, na)
var int pvh1_time = array.new_int (1000, na)
var float pvl1_price = array.new_float(1000, na)
var int pvl1_time = array.new_int (1000, na)
var float pvh2_price = array.new_float(1000, na)
var int pvh2_time = array.new_int (1000, na)
var float pvl2_price = array.new_float(1000, na)
var int pvl2_time = array.new_int (1000, na)
var float htcmrll_price = na
var int htcmrll_time = na
var float ltcmrhh_price = na
var int ltcmrhh_time = na
var box long_boxes = array.new_box()
var box short_boxes = array.new_box()
var float temp_pv_0 = na
var float temp_pv_1 = na
var float temp_pv_2 = na
bool pvh = high < high and high > high
bool pvl = low > low and low < low
int pv1_time = bar_index
float pv1_high = high
float pv1_low = low
float trigger_high = bos_type == "High and Low" ? high : math.max(open, close)
float trigger_low = bos_type == "High and Low" ? low : math.min(open, close)
if box_ob and barstate.isconfirmed
if pvh
array.pop(pvh1_price)
array.pop(pvh1_time)
array.unshift(pvh1_price, pv1_high)
array.unshift(pvh1_time, pv1_time)
if array.size(pvh1_price) > 2
temp_pv_0 := array.get(pvh1_price, 0)
temp_pv_1 := array.get(pvh1_price, 1)
temp_pv_2 := array.get(pvh1_price, 2)
if temp_pv_0 > temp_pv_1
for i = 0 to array.size(pvl1_time) - 1 by 1
temp_ltcmrhh_time = array.get(pvl1_time, i)
if temp_ltcmrhh_time < array.get(pvh1_time, 0)
ltcmrhh_price := array.get(pvl1_price, i)
ltcmrhh_time := temp_ltcmrhh_time
break
if temp_pv_0 < temp_pv_1 and temp_pv_1 > temp_pv_2
array.pop(pvh2_price)
array.pop(pvh2_time)
array.unshift(pvh2_price, temp_pv_1)
array.unshift(pvh2_time, array.get(pvh1_time, 1))
if pvl
array.pop(pvl1_price)
array.pop(pvl1_time)
array.unshift(pvl1_price, pv1_low)
array.unshift(pvl1_time, pv1_time)
if array.size(pvl1_price) > 2
temp_pv_0 := array.get(pvl1_price, 0)
temp_pv_1 := array.get(pvl1_price, 1)
temp_pv_2 := array.get(pvl1_price, 2)
if temp_pv_0 < temp_pv_1
for i = 0 to array.size(pvh1_time) - 1 by 1
temp_htcmrll_time = array.get(pvh1_time, i)
if temp_htcmrll_time < array.get(pvl1_time, 0)
htcmrll_price := array.get(pvh1_price, i)
htcmrll_time := temp_htcmrll_time
break
if temp_pv_0 > temp_pv_1 and temp_pv_1 < temp_pv_2
array.pop(pvl2_price)
array.pop(pvl2_time)
array.unshift(pvl2_price, temp_pv_1)
array.unshift(pvl2_time, array.get(pvl1_time, 1))
if trigger_high > htcmrll_price
if box_sv
loBox = box.new(left=array.get(pvl1_time, 0), top=math.min(high , high ), right=bar_index, bottom=array.get(pvl1_price, 0), bgcolor=color.rgb(0, 255, 0, 80), border_color=color.rgb(0, 255, 0, 80), extend=extend.right)
if array.size(long_boxes) >= 25
box.delete(array.shift(long_boxes))
array.push(long_boxes, loBox)
htcmrll_price := na
htcmrll_price
if trigger_low < ltcmrhh_price
if box_sv
hiBox = box.new(left=array.get(pvh1_time, 0), top=array.get(pvh1_price, 0), right=bar_index, bottom=math.max(low , low ), bgcolor=color.rgb(255, 0, 0, 80), border_color=color.rgb(255, 0, 0, 80), extend=extend.right)
if array.size(short_boxes) >= 25
box.delete(array.shift(short_boxes))
array.push(short_boxes, hiBox)
ltcmrhh_price := na
ltcmrhh_price
if array.size(short_boxes) > 0
for i = array.size(short_boxes) - 1 to 0 by 1
tbox = array.get(short_boxes, i)
top = box.get_top(tbox)
bottom = box.get_bottom(tbox)
if trigger_high > bottom and box.get_left(tbox) + box_test_delay < bar_index and box_test_sv
if box_hide_gray
box.set_bgcolor(tbox, #00000000)
box.set_border_color(tbox, #00000000)
else
box.set_bgcolor(tbox, color.rgb(192, 192, 192, 80))
box.set_border_color(tbox, color.rgb(192, 192, 192, 80))
if trigger_high > top and box.get_left(tbox) + box_fill_delay < bar_index
if box_stop_sv
box.set_right(tbox, bar_index)
box.set_extend(tbox, extend.none)
array.remove(short_boxes, i)
if array.size(long_boxes) > 0
for i = array.size(long_boxes) - 1 to 0 by 1
lbox = array.get(long_boxes, i)
top = box.get_top(lbox)
bottom = box.get_bottom(lbox)
if trigger_low < top and box.get_left(lbox) + box_test_delay < bar_index and box_test_sv
if box_hide_gray
box.set_bgcolor(lbox, #00000000)
box.set_border_color(lbox, #00000000)
else
box.set_bgcolor(lbox, color.rgb(192, 192, 192, 80))
box.set_border_color(lbox, color.rgb(192, 192, 192, 80))
if trigger_low < bottom and box.get_left(lbox) + box_fill_delay < bar_index
if box_stop_sv
box.set_right(lbox, bar_index)
box.set_extend(lbox, extend.none)
array.remove(long_boxes, i)
Trend Breakout Strategy with Separated Alertshz, nado denygi zarabatuvaty, onoto i xoposho i ploxo sho tak trudno, no po drugomy nikak
Bollinger Band Expansion with EMAsCall Entry above Purple Candle's High, Stop loss previous candle low.
Sell Entry Below Grey Candle's Low, Stop loss previous candle High.
supertrend.ch support band level 1if support level 1 breaks the blue band
we go usually tend to go to support level 2 the white band
and rebound from there
PRO SMC Full Suite BY Mashrur“PRO SMC Full Suite BY Mashrur”
A Pine Script (v5) indicator for TradingView, focused on Smart Money Concepts (SMC). It overlays on price charts and provides visual tools for identifying key institutional trading behaviors.
🎯 Purpose
This script is designed to help traders analyze and trade using SMC principles by automatically detecting:
Order Blocks (OBs)
Fair Value Gaps (FVGs)
Breaks of Structure (BoS)
Liquidity Sweeps (Buy/Sell Side Liquidity Grabs)
Mitigation Entries
⚙️ Inputs / Settings
Show Fair Value Gaps: Toggle FVGs on/off
Higher Timeframe (HTF): Choose HTF for OB analysis
Use HTF OBs: Switch between current TF OBs and HTF OBs
Show Order Blocks: Toggle OBs on/off
Show OB Mitigation Entries: Toggle mitigation entry signals on/off
🧠 Core Logic Overview
🔹 1. Swing Points Detection
Identifies swing highs/lows using a 3-bar pattern (pivot-based structure).
🔹 2. Break of Structure (BoS)
A bullish BoS happens when price closes above the last swing high.
A bearish BoS occurs when price closes below the last swing low.
🔹 3. Order Block Detection
Upon BoS, the script marks the previous candle as the Order Block.
Uses either:
Current TF OBs (based on price action)
HTF OBs (based on candle body direction)
🔹 4. Mitigation Entry Logic
A mitigation occurs when price returns to the OB and reacts with confirmation:
Bullish: price dips into OB and closes above
Bearish: price wicks into OB and closes below
Plots entry markers for these mitigations.
🔹 5. Liquidity Sweeps
Detects equal highs/lows (liquidity zones)
Marks Buy SL when price dips below an equal low then closes above
Marks Sell SL when price breaks above an equal high then closes below
🔹 6. Fair Value Gaps (FVGs)
FVG Up: Gap between candle 3 and candle 1 (low > high )
FVG Down: Gap between candle 3 and candle 1 (high < low )
Plots highlighted boxes on these gaps
📊 Visual Elements
Boxes: For OB zones and FVGs
Shapes:
Labels: OB Buy/Sell entries
Triangles: Buy SL / Sell SL liquidity sweeps
Lines: Equal Highs and Lows
🔔 Alerts
Built-in alerts to notify when:
OB entries are confirmed
Liquidity sweeps happen
Helps in automation or active monitoring
✅ Ideal For
Traders using SMC, ICT concepts, Wyckoff, or institutional trading models
Anyone wanting to automate detection of structural elements on their chart
Umair Volume-Based Buy/Sell SignalsA volume-based indicator is a technical analysis tool that utilizes trading volume data to assess market activity and predict potential price movements. By analyzing the number of shares or contracts traded over a specific period, these indicators help confirm trends, identify reversals, or spot divergence between volume and price. Examples include On-Balance Volume (OBV), Volume Weighted Average Price (VWAP), and Chaikin Money Flow. They provide insights into market strength, liquidity, and investor sentiment, aiding traders in validating whether price changes are supported by market participation or likely to reverse. High volume often reinforces trend legitimacy, while low volume may signal weak momentum.
PRO SMC Full Suite BY Mashrur“PRO SMC Full Suite BY Mashrur”
A Pine Script (v5) indicator for TradingView, focused on Smart Money Concepts (SMC). It overlays on price charts and provides visual tools for identifying key institutional trading behaviors.
🎯 Purpose
This script is designed to help traders analyze and trade using SMC principles by automatically detecting:
Order Blocks (OBs)
Fair Value Gaps (FVGs)
Breaks of Structure (BoS)
Liquidity Sweeps (Buy/Sell Side Liquidity Grabs)
Mitigation Entries
⚙️ Inputs / Settings
Show Fair Value Gaps: Toggle FVGs on/off
Higher Timeframe (HTF): Choose HTF for OB analysis
Use HTF OBs: Switch between current TF OBs and HTF OBs
Show Order Blocks: Toggle OBs on/off
Show OB Mitigation Entries: Toggle mitigation entry signals on/off
🧠 Core Logic Overview
🔹 1. Swing Points Detection
Identifies swing highs/lows using a 3-bar pattern (pivot-based structure).
🔹 2. Break of Structure (BoS)
A bullish BoS happens when price closes above the last swing high.
A bearish BoS occurs when price closes below the last swing low.
🔹 3. Order Block Detection
Upon BoS, the script marks the previous candle as the Order Block.
Uses either:
Current TF OBs (based on price action)
HTF OBs (based on candle body direction)
🔹 4. Mitigation Entry Logic
A mitigation occurs when price returns to the OB and reacts with confirmation:
Bullish: price dips into OB and closes above
Bearish: price wicks into OB and closes below
Plots entry markers for these mitigations.
🔹 5. Liquidity Sweeps
Detects equal highs/lows (liquidity zones)
Marks Buy SL when price dips below an equal low then closes above
Marks Sell SL when price breaks above an equal high then closes below
🔹 6. Fair Value Gaps (FVGs)
FVG Up: Gap between candle 3 and candle 1 (low > high )
FVG Down: Gap between candle 3 and candle 1 (high < low )
Plots highlighted boxes on these gaps
📊 Visual Elements
Boxes: For OB zones and FVGs
Shapes:
Labels: OB Buy/Sell entries
Triangles: Buy SL / Sell SL liquidity sweeps
Lines: Equal Highs and Lows
🔔 Alerts
Built-in alerts to notify when:
OB entries are confirmed
Liquidity sweeps happen
Helps in automation or active monitoring
✅ Ideal For
Traders using SMC, ICT concepts, Wyckoff, or institutional trading models
Anyone wanting to automate detection of structural elements on their chart
EMA Pullback & Trend Indicator MyraxesEMA Pullback & Trend Indicator by Max Retri
Plots five EMAs—9, 15, 30, 65 and 200—and draws clean, easy-to-interpret signals when the fast EMAs cross in the direction of the longer-term trend. No other indicators or overlays are required; simply add it to your chart and watch for the arrows and crosses.
⸻
What It Does & How It Works
1. EMAs & Colors
• Red (EMA 9) – Fast signal line
• Blue (EMA 15) – Confirmation line
• Orange (EMA 30) – Pullback zone 1
• Purple (EMA 65) – Pullback zone 2 & mid-term trend
• White (EMA 200) – Long-term trend
2. Trend Filter
• Bullish regime when price is above both EMA 65 and EMA 200.
• Bearish regime when price is below both EMA 65 and EMA 200.
3. Pullback Requirement
• Only consider a signal if price has retraced into the EMA 30 or EMA 65 zone.
4. Signal Logic
Long Entry ▲: EMA 9 (red) crosses above EMA 15 (blue) while in a bullish regime and after a pullback into EMA 30/65.
Short Entry ▼: EMA 9 crosses below EMA 15 while in a bearish regime and after a retracement up to EMA 30/65.
Exit ✖: Opposite EMA 9/15 crossover marks the close of the position.
⸻
How to Use
1. Add the indicator to any chart/timeframe.
2. Identify trend: make sure price is aligned above or below the 65 and 200 EMAs.
3. Watch for pullbacks into the orange or purple EMAs.
4. Enter on the black ▲ or ▼ arrow.
5. Exit when you see the gray ✖ cross.
Because it’s a pure‐EMA indicator (no heavy calculations), it runs quickly even on lower-end machines.