Bias TableOverview
The Bias Table Indicator is a multi-timeframe analysis tool designed to provide a quick sentiment overview across multiple timeframes. It combines signals from Moving Averages (MAs) and Oscillators to determine market bias, helping traders make more informed decisions.
Key Features
✔ Multi-Timeframe Analysis (MTF) – Displays market bias across up to five timeframes.
✔ Customizable Signals – Choose whether bias is based on Moving Averages (MAs), Oscillators, or a combination of both.
✔ Visual Table Format – The indicator presents the bias as a color-coded table in the bottom-right corner of the chart for quick reference.
✔ Adjustable Colors & Display Settings – Users can customize colors for different sentiment states (Strong Buy, Buy, Neutral, Sell, Strong Sell).
How It Works
Bias Calculation: The indicator evaluates market conditions using preset values (which can be replaced with actual logic) to determine sentiment for each timeframe.
Multi-Timeframe Support: The table can display bias from hourly to monthly timeframes, giving traders a broader view of market conditions.
Customizable Signals: Users can filter the table to show bias based only on MAs, Oscillators, or a combination of both.
Interpreting the Table
📊 Timeframes: The leftmost column shows selected timeframes (e.g., 1H, 4H, 1D, 1W, 1M).
📈 Signal Columns:
MAs – Bias based on Moving Averages.
Oscillators – Bias based on momentum indicators like RSI, Stochastics, etc.
All – A combined bias based on both MAs & Oscillators.
🚦 Color-Coded Ratings:
🔵 Strong Buy – High bullish strength.
🔹 Buy – Moderate bullish sentiment.
⚪ Neutral – No clear trend.
🔸 Sell – Moderate bearish sentiment.
🔴 Strong Sell – High bearish strength.
Best Used For:
📈 Trend Confirmation: Validate signals from your primary strategy.
⏳ Multi-Timeframe Analysis: See whether short-term and long-term trends align.
⚡ Quick Sentiment Check: Get a high-level view of market conditions without analyzing multiple indicators separately.
Customization Options:
Select which timeframes to include in the table.
Choose whether to base bias on MAs, Oscillators, or both.
Adjust colors for each signal type.
週期
PO3 + SMC + X0.45//@version=6
indicator('SMC + x0,45', shorttitle = 'SMC+x0,45', overlay = true, max_lines_count = 500)
//-----Input-------
GroupSMC = 'SMC'
showSMC = input.bool(true, 'Show SMC/Style', group = GroupSMC, inline = 'SMC/Style')
lineSMC = input.string(title = '', options = , defval = '(─)', group = GroupSMC, inline = 'SMC/Style', display = display.none)
lineStyleSMC = lineSMC == '(┈)' ? line.style_dotted : lineSMC == '(╌)' ? line.style_dashed : line.style_solid
colorSMC = input.color(color.rgb(4, 205, 255), 'Color/Width', group = GroupSMC, inline = 'Color/Width')
widthSMC = input.int(defval = 1, title = '', minval = 1, step = 1, group = GroupSMC, inline = 'Color/Width', display = display.none)
//Break
showBreak = input.bool(true, 'SMC break', group = GroupSMC, inline = 'SMC/break')
lineBreak = input.string(title = '', options = , defval = '(╌)', group = GroupSMC, inline = 'SMC/break', display = display.none)
lineStyleBreak = lineBreak == '(╌)' ? line.style_dashed : lineBreak == '(┈)' ? line.style_dotted : line.style_solid
colorBreak = input.color(#137ef8, 'Color/Width', group = GroupSMC, inline = 'SMC/Color/Width')
widthBreak = input.int(defval = 1, title = '', minval = 1, step = 1, group = GroupSMC, inline = 'SMC/Color/Width', display = display.none)
//choch
showChoch = input.bool(true, 'CHOCH', group = GroupSMC, inline = 'SMC/CHOCH')
lineChoch = input.string(title = '', options = , defval = '(─)', group = GroupSMC, inline = 'SMC/CHOCH', display = display.none)
lineStyleChoch = lineChoch == '(─)' ? line.style_solid : lineChoch == '(╌)' ? line.style_dashed : line.style_dotted
colorChoch = input.color(color.red, 'Color/Width', group = GroupSMC, inline = 'SMC/CHOCH/Color/Width')
widthChoch = input.int(defval = 1, title = '', minval = 1, step = 1, group = GroupSMC, inline = 'SMC/CHOCH/Color/Width', display = display.none)
//CHOCH
var arrayLineChoCh = array.new_line()
var arrayX_CHOCH_Up = array.new_int(1, time)
var arrayY_CHOCH_Up = array.new_float(1, close)
var arrayX_CHOCH_Dow = array.new_int(1, time)
var arrayY_CHOCH_Dow = array.new_float(1, close)
//alertChoch = 1: CHoCH/BOS up, 2: CHoCH/BOS dow
int alertChoch = 0
//Imbalance
showImbalance = input.bool(false, 'Show/Color', group = 'Imbalance', inline = 'Imbalance')
colorImbalance = input.color(color.blue, '', group = 'Imbalance', inline = 'Imbalance')
//Orderblock
showOrderblock = input.bool(true, 'Show/Color', group = 'Orderblock', inline = 'Orderblock')
colorOrderblock = input.color(color.rgb(0, 252, 63, 76), '', group = 'Orderblock', inline = 'Orderblock')
//Global
var arrayXSMC = array.new_int(5, time)
var arrayYSMC = array.new_float(5, close)
var arrayLineSMC = array.new_line()
int drawLineSMC = 0
var arrayLineBreak = array.new_line()
var arrayX_Break_Up = array.new_int(1, time)
var arrayY_Break_Up = array.new_float(1, close)
var arrayX_Break_Dow = array.new_int(1, time)
var arrayY_Break_Dow = array.new_float(1, close)
var arrayBos_Type = array.new_int(1, 0)
var bool runStart = true
var arrayBreakType = array.new_int(1, 0)
drawLineSMC := 0
bodyHigh = close > open ? close : open
bodyLow = close > open ? open : close
highPrev = high
lowPrev = low
var float highWick_Prev = high
var float lowWick_Prev = low
//alert = 1:create high, 2: create low
int alertType = 0
//sweepType = 1: sweep high, 2: sweep low
int sweepType = 0
if runStart
if open < close
array.unshift(arrayYSMC, low)
array.unshift(arrayXSMC, time)
array.unshift(arrayYSMC, high)
array.unshift(arrayXSMC, time)
array.unshift(arrayY_Break_Dow, low)
array.unshift(arrayX_Break_Dow, time)
else
array.unshift(arrayYSMC, high)
array.unshift(arrayXSMC, time)
array.unshift(arrayYSMC, low)
array.unshift(arrayXSMC, time)
array.unshift(arrayY_Break_Up, high)
array.unshift(arrayX_Break_Up, time)
runStart := false
runStart
//up trend
if array.get(arrayYSMC, 0) > array.get(arrayYSMC, 1)
//Bos / Impulse
if array.get(arrayBos_Type, 0) == 1
//brearish reversal
if low < lowPrev
if high > array.get(arrayYSMC, 0)
array.set(arrayYSMC, 0, high)
array.set(arrayXSMC, 0, time)
array.unshift(arrayYSMC, low)
array.unshift(arrayXSMC, time)
drawLineSMC := 3
drawLineSMC
else
array.unshift(arrayYSMC, low)
array.unshift(arrayXSMC, time)
drawLineSMC := 1
drawLineSMC
//create high
array.unshift(arrayBreakType, 4)
arrayBos_Type.set(0, 4)
//continue up
else
if high > array.get(arrayYSMC, 0)
array.set(arrayYSMC, 0, high)
array.set(arrayXSMC, 0, time)
drawLineSMC := 2
drawLineSMC
//No bos / xu huong tang phu correction / pullback
else //bearish reversal
if low < array.get(arrayYSMC, 1)
if high > array.get(arrayYSMC, 0)
array.set(arrayYSMC, 0, high)
array.set(arrayXSMC, 0, time)
array.unshift(arrayYSMC, low)
array.unshift(arrayXSMC, time)
drawLineSMC := 3
drawLineSMC
else
array.unshift(arrayYSMC, low)
array.unshift(arrayXSMC, time)
drawLineSMC := 1
drawLineSMC
//continue up
else
if high > array.get(arrayYSMC, 0)
array.set(arrayXSMC, 0, time)
array.set(arrayYSMC, 0, high)
drawLineSMC := 2
drawLineSMC
//end up trend
//dow trend
else //Bos / impulse
if array.get(arrayBos_Type, 0) == 2
//bullish reversal
if high > highPrev
if low < array.get(arrayYSMC, 0)
array.set(arrayYSMC, 0, low)
array.set(arrayXSMC, 0, time)
array.unshift(arrayYSMC, high)
array.unshift(arrayXSMC, time)
drawLineSMC := 3
drawLineSMC
else
array.unshift(arrayYSMC, high)
array.unshift(arrayXSMC, time)
drawLineSMC := 1
drawLineSMC
//create low
array.unshift(arrayBreakType, 3)
arrayBos_Type.set(0, 3)
//continue dow
else
if low < array.get(arrayYSMC, 0)
array.set(arrayYSMC, 0, low)
array.set(arrayXSMC, 0, time)
drawLineSMC := 2
drawLineSMC
//No bos /correction, pullback
else //bullish reversal
if high > array.get(arrayYSMC, 1)
if low < array.get(arrayYSMC, 0)
array.set(arrayXSMC, 0, time)
array.set(arrayYSMC, 0, low)
array.unshift(arrayXSMC, time)
array.unshift(arrayYSMC, high)
drawLineSMC := 3
drawLineSMC
else
array.unshift(arrayXSMC, time)
array.unshift(arrayYSMC, high)
drawLineSMC := 1
drawLineSMC
//continue dow
else
if low <= array.get(arrayYSMC, 0)
array.set(arrayXSMC, 0, time)
array.set(arrayYSMC, 0, low)
drawLineSMC := 2
drawLineSMC
//break
//get point beak dow
if barstate.isconfirmed and array.get(arrayYSMC, 0) > array.get(arrayYSMC, 1)
array.unshift(arrayX_Break_Dow, array.get(arrayXSMC, 1))
array.unshift(arrayY_Break_Dow, array.get(arrayYSMC, 1))
//bear up
if array.get(arrayYSMC, 0) > array.get(arrayYSMC, 2) and array.get(arrayY_Break_Up, 0) != array.get(arrayYSMC, 2)
array.unshift(arrayX_Break_Up, array.get(arrayXSMC, 2))
array.unshift(arrayY_Break_Up, array.get(arrayYSMC, 2))
alertType := 2
alertType
//get point break up
if barstate.isconfirmed and array.get(arrayYSMC, 0) < array.get(arrayYSMC, 1)
array.unshift(arrayX_Break_Up, array.get(arrayXSMC, 1))
array.unshift(arrayY_Break_Up, array.get(arrayYSMC, 1))
if array.get(arrayYSMC, 0) < array.get(arrayYSMC, 2) and array.get(arrayY_Break_Dow, 0) != array.get(arrayYSMC, 2)
array.unshift(arrayX_Break_Dow, array.get(arrayXSMC, 2))
array.unshift(arrayY_Break_Dow, array.get(arrayYSMC, 2))
alertType := 1
alertType
//break dow
if bodyLow < array.get(arrayY_Break_Dow, 0) and bodyLow <= lowWick_Prev and low == arrayYSMC.get(0) and array.size(arrayY_Break_Dow) > 1
float lineY_Break = 0
int lineX_Break = 0
if array.size(arrayLineBreak) > 0
lineY_Break := line.get_y1(array.get(arrayLineBreak, 0))
lineX_Break := line.get_x1(array.get(arrayLineBreak, 0))
lineX_Break
if lineY_Break != array.get(arrayY_Break_Dow, 0) or lineX_Break != array.get(arrayX_Break_Dow, 0)
if showBreak == false
colorBreak := color.rgb(0, 0, 0, 100)
colorBreak
array.unshift(arrayLineBreak, line.new(x1 = array.get(arrayX_Break_Dow, 0), y1 = array.get(arrayY_Break_Dow, 0), x2 = time, y2 = array.get(arrayY_Break_Dow, 0), color = colorBreak, xloc = xloc.bar_time, style = lineStyleBreak, width = widthBreak))
//set break type
array.unshift(arrayBreakType, 2)
//set bos type Dow
array.unshift(arrayBos_Type, 2)
//break up
if bodyHigh > array.get(arrayY_Break_Up, 0) and bodyHigh >= highWick_Prev and high == arrayYSMC.get(0) and array.size(arrayY_Break_Up) > 1
float lineY_Break = 0
int lineX_Break = 0
if array.size(arrayLineBreak) > 0
lineY_Break := line.get_y1(array.get(arrayLineBreak, 0))
lineX_Break := line.get_x1(array.get(arrayLineBreak, 0))
lineX_Break
if lineY_Break != array.get(arrayY_Break_Dow, 0) or lineX_Break != array.get(arrayX_Break_Dow, 0)
if showBreak == false
colorBreak := color.rgb(0, 0, 0, 100)
colorBreak
array.unshift(arrayLineBreak, line.new(x1 = array.get(arrayX_Break_Up, 0), y1 = array.get(arrayY_Break_Up, 0), x2 = time, y2 = array.get(arrayY_Break_Up, 0), color = colorBreak, xloc = xloc.bar_time, style = lineStyleBreak, width = widthBreak))
//set break type
array.unshift(arrayBreakType, 1)
//set bos type up
array.unshift(arrayBos_Type, 1)
//end break
//Insider bar
if high <= highPrev and low >= lowPrev
highPrev := highPrev
lowPrev := lowPrev
lowPrev
//xu huong tang
if array.get(arrayYSMC, 0) > array.get(arrayYSMC, 1)
highWick_Prev := array.get(arrayYSMC, 0)
highWick_Prev
else
lowWick_Prev := array.get(arrayYSMC, 0)
lowWick_Prev
//end
//draw line
if showSMC
if drawLineSMC == 2
if array.size(arrayLineSMC) > 0
line.set_xy2(array.get(arrayLineSMC, 0), array.get(arrayXSMC, 0), array.get(arrayYSMC, 0))
else
array.unshift(arrayLineSMC, line.new(array.get(arrayXSMC, 1), array.get(arrayYSMC, 1), array.get(arrayXSMC, 0), array.get(arrayYSMC, 0), color = colorSMC, xloc = xloc.bar_time, width = widthSMC, style = lineStyleSMC))
else if drawLineSMC == 1
array.unshift(arrayLineSMC, line.new(array.get(arrayXSMC, 1), array.get(arrayYSMC, 1), array.get(arrayXSMC, 0), array.get(arrayYSMC, 0), color = colorSMC, xloc = xloc.bar_time, width = widthSMC, style = lineStyleSMC))
else if drawLineSMC == 3
if array.size(arrayLineSMC) > 0
line.set_xy2(array.get(arrayLineSMC, 0), array.get(arrayXSMC, 1), array.get(arrayYSMC, 1))
array.unshift(arrayLineSMC, line.new(array.get(arrayXSMC, 1), array.get(arrayYSMC, 1), array.get(arrayXSMC, 0), array.get(arrayYSMC, 0), color = colorSMC, xloc = xloc.bar_time, width = widthSMC, style = lineStyleSMC))
else if drawLineSMC == 4
array.unshift(arrayLineSMC, line.new(array.get(arrayXSMC, 2), array.get(arrayYSMC, 2), array.get(arrayXSMC, 1), array.get(arrayYSMC, 1), color = colorSMC, xloc = xloc.bar_time, width = widthSMC, style = lineStyleSMC))
array.unshift(arrayLineSMC, line.new(array.get(arrayXSMC, 1), array.get(arrayYSMC, 1), array.get(arrayXSMC, 0), array.get(arrayYSMC, 0), color = colorSMC, xloc = xloc.bar_time, width = widthSMC, style = lineStyleSMC))
else if drawLineSMC == 5
if array.size(arrayLineSMC) > 0
line.set_xy2(array.get(arrayLineSMC, 0), array.get(arrayXSMC, 2), array.get(arrayYSMC, 2))
array.unshift(arrayLineSMC, line.new(array.get(arrayXSMC, 2), array.get(arrayYSMC, 2), array.get(arrayXSMC, 1), array.get(arrayYSMC, 1), color = colorSMC, xloc = xloc.bar_time, width = widthSMC, style = lineStyleSMC))
array.unshift(arrayLineSMC, line.new(array.get(arrayXSMC, 1), array.get(arrayYSMC, 1), array.get(arrayXSMC, 0), array.get(arrayYSMC, 0), color = colorSMC, xloc = xloc.bar_time, width = widthSMC, style = lineStyleSMC))
//end line
//Imbalance
if showImbalance
bearishImb = high < low and close < open
bullishImb = low > high and close > open
//Bullish
if bullishImb
box.new(left = bar_index , top = low, right = bar_index, bottom = high , bgcolor = colorImbalance, border_color = colorImbalance)
//Bearish
if bearishImb
box.new(left = bar_index , top = high, right = bar_index, bottom = low , bgcolor = colorImbalance, border_color = colorImbalance)
//end Imbalance
//CHOCH
if showChoch
//get choch up
if array.get(arrayYSMC, 0) < array.get(arrayYSMC, 2) and array.get(arrayYSMC, 1) > array.get(arrayYSMC, 3)
//label.new(x=bar_index, y=low, text=str.tostring(array.get(arrayYSMC, 1)) , color=color.rgb(255, 255, 255, 30), style=label.style_label_up, textalign=text.align_center, size = size.normal)
array.unshift(arrayY_CHOCH_Up, array.get(arrayYSMC, 1))
array.unshift(arrayX_CHOCH_Up, array.get(arrayXSMC, 1))
//point choch dow
if array.get(arrayYSMC, 0) > array.get(arrayYSMC, 2) and array.get(arrayYSMC, 1) < array.get(arrayYSMC, 3)
array.unshift(arrayY_CHOCH_Dow, array.get(arrayYSMC, 1))
array.unshift(arrayX_CHOCH_Dow, array.get(arrayXSMC, 1))
//xu huong tang
if array.get(arrayYSMC, 0) > array.get(arrayYSMC, 1)
float pointYChochUp = array.get(arrayY_CHOCH_Up, 0)
int pointXChochUp = array.get(arrayX_CHOCH_Up, 0)
//lấy vị trí line choch
float pointY_Line_choch = 0
int pointX_Line_choch = 0
if array.size(arrayLineChoCh) > 0
//pointY_Line_choch := line.get_y1(array.get(arrayLineChoCh,0))
pointX_Line_choch := line.get_x1(array.get(arrayLineChoCh, 0))
pointX_Line_choch
//cay nen dau tien pha qua
if bodyHigh > pointYChochUp
//label.new(x=bar_index, y=high, text= str.tostring(pointX_Line_choch) + ' ' +str.tostring(pointXChochUp) , color=color.rgb(255, 255, 255, 30), style=label.style_label_down, textalign=text.align_center, size = size.normal)
//line choch up
if pointX_Line_choch != pointXChochUp
array.unshift(arrayLineChoCh, line.new(x1 = pointXChochUp, y1 = pointYChochUp, x2 = time, y2 = pointYChochUp, color = colorChoch, xloc = xloc.bar_time, style = lineStyleChoch, width = widthChoch))
alertChoch := 1
alertChoch
//label.new(x=bar_index, y=high, text="U" , color=color.rgb(255, 255, 255, 30), style=label.style_label_down, textalign=text.align_center, size = size.tiny)
//xu huong giam
if array.get(arrayYSMC, 0) < array.get(arrayYSMC, 1)
float pointYChochDow = array.get(arrayY_CHOCH_Dow, 0)
int pointXChochDow = array.get(arrayX_CHOCH_Dow, 0)
//lấy vị trí line choch
float pointY_Line_choch = 0
int pointX_Line_choch = 0
if array.size(arrayLineChoCh) > 0
//pointY_Line_choch := line.get_y1(array.get(arrayLineChoCh,0))
pointX_Line_choch := line.get_x1(array.get(arrayLineChoCh, 0))
pointX_Line_choch
if bodyLow < pointYChochDow
//line choch dow
if pointX_Line_choch != pointXChochDow
array.unshift(arrayLineChoCh, line.new(x1 = pointXChochDow, y1 = pointYChochDow, x2 = time, y2 = pointYChochDow, color = colorChoch, xloc = xloc.bar_time, style = lineStyleChoch, width = widthChoch))
alertChoch := 2
alertChoch
//end CHOCH
//label.new(x=bar_index, y=low, text= str.tostring(arrayBreakType.get(0)) , color=color.rgb(255, 255, 255, 30), style=label.style_label_up, textalign=text.align_center, size = size.tiny)
//order block
if showOrderblock
if low > high
if low > high
box.new(left = bar_index , top = high , right = bar_index, bottom = low , bgcolor = colorOrderblock, border_color = colorOrderblock)
else
if low <= low
box.new(left = bar_index , top = high , right = bar_index, bottom = low , bgcolor = colorOrderblock, border_color = colorOrderblock)
else
box.new(left = bar_index , top = high , right = bar_index, bottom = low , bgcolor = colorOrderblock, border_color = colorOrderblock)
//OB UP
if high < low
if high < low
box.new(left = bar_index , top = low , right = bar_index, bottom = high , bgcolor = colorOrderblock, border_color = colorOrderblock)
else
if high <= high
box.new(left = bar_index , top = low , right = bar_index, bottom = high , bgcolor = colorOrderblock, border_color = colorOrderblock)
else
box.new(left = bar_index , top = low , right = bar_index, bottom = high , bgcolor = colorOrderblock, border_color = colorOrderblock)
//insider/outside bar
insideBar = high < high and low > low
outsideBar = high > high and low < low
color = insideBar ? color.rgb(211, 212, 102) : outsideBar ? color.rgb(245, 169, 6) : na
barcolor(color = color, title = 'Inside/Outside Bar')
//Alert
//create high, low
alertcondition(alertType == 1 and barstate.isconfirmed, title = 'Create High ', message = 'Create High')
alertcondition(alertType == 2 and barstate.isconfirmed, title = 'Create Low ', message = 'Create Low')
//sweep
alertcondition(sweepType == 1 and barstate.isconfirmed, title = 'Sweep High ', message = 'Sweep High')
alertcondition(sweepType == 2 and barstate.isconfirmed, title = 'Sweep Low ', message = 'Sweep Low')
//Choch
alertcondition(alertChoch == 1, title = 'CHoCH Up ', message = 'CHoCH Up')
alertcondition(alertChoch == 2, title = 'CHoCH Dow ', message = 'CHoCH Dow')
PinbarRatio = input(0.45, 'Pin bar body over whole candle')
// return 1 if bullish pinbar, -1 if bearish pinbar
isPinBar(ratio) =>
range_1 = high - low
upper = high - range_1 * ratio
lower = low + range_1 * ratio
bullish = open >= lower and close >= lower
bearish = open <= upper and close <= upper
bullish ? 1 : bearish ? -1 : 0
insidebar = high < high and low > low
pinbar = isPinBar(PinbarRatio)
plotchar(pinbar == 1, 'Pin bar', '●', color = color.new(#000000, 0), location = location.belowbar, size = size.tiny)
plotchar(pinbar == -1, 'Pin bar', '●', color = color.new(#000000, 0), location = location.abovebar, size = size.tiny)
alertcondition(insidebar, 'Pin bar', 'Pin bar')
II Tech - UtilityII Tech - Utility Indicator
The II Tech - Utility is a powerful, multi-functional indicator designed for traders who want better insights into market structure and key price levels. It overlays essential price data on your charts, providing a clear view of custom timeframes, session highs/lows, and open/close prices.
🔹 Features:
✅ Custom Timeframe Levels – Plot open, high, low, and close prices from a user-defined timeframe for better trend analysis.
✅ Session Tracking – Highlight key trading sessions (New York, London, Asia, etc.) with customizable colors and styles.
✅ Midnight Open Price – Track the NY Midnight Open level, a critical reference point for price action traders.
✅ Customizable Visuals – Modify colors, line styles, and transparency to suit your trading style.
✅ Box & Deviation Zones – Display price ranges with optional deviation calculations for better risk management.
✅ Vertical & Horizontal Levels – Draw session separators, session mids, and key levels with precision.
This indicator is ideal for forex, stocks, and crypto traders looking to enhance their market structure analysis and trading execution. 🚀
👉 How to Use:
1. Adjust the Custom TF to overlay price levels from different timeframes.
2. Enable session highlights to track London, New York, and Asia trading hours.
3. Use NY Midnight Open as a reference for potential reversals or continuation setups.
4. Fine-tune the settings to match your strategy!
💡 Works best on intraday timeframes and can be combined with other confluence tools.
#Trading #Forex #MarketStructure #PriceAction #TradingView
CCT Pi Cycle Top/BottomPi Cycle Top/bottom: The Ultimate Market Cycle Indicator
Introduction
The Pi Cycle Top/bottom Indicator is one of the most reliable tools for identifying Bitcoin market cycle peaks and bottoms. Its effectiveness lies in the strategic combination of moving averages that historically align with major market cycle reversals. Unlike traditional moving average crossovers, this indicator applies an advanced iterative approach to pinpoint price extremes with higher accuracy.
This version, built entirely with Pine Script™ v6, introduces unprecedented precision in detecting both the Pi Cycle Top and Pi Cycle Bottom, eliminating redundant labels, optimizing visual clarity, and ensuring the indicator adapts dynamically to evolving market conditions.
What is the Pi Cycle Theory?
The Pi Cycle Top and Pi Cycle Bottom were originally introduced based on a simple yet profound discovery: key moving average crossovers consistently align with macro market tops and bottoms.
Pi Cycle Top: The crossover of the 111-day Simple Moving Average (SMA) and the 350-day SMA multiplied by 2 has historically signaled market tops with astonishing accuracy.
Pi Cycle Bottom: The intersection of the 150-day Exponential Moving Average (EMA) and the 471-day SMA has repeatedly marked significant market bottoms.
While traditional moving average strategies often suffer from lag and false signals, the Pi Cycle Indicator enhances accuracy by applying a range-based scanning methodology, ensuring that only the most critical reversals are detected.
How This Indicator Works
Unlike basic moving average crossovers, this script introduces a unique iteration process to refine the detection of Pi Cycle points. Here’s how it works:
Detecting Crossovers:
Identifies the Golden Cross (bullish crossover) and Death Cross (bearish crossover) for both the Pi Cycle Top and Pi Cycle Bottom.
Iterating Through the Cycle:
Instead of plotting a simple crossover point, this script scans the range between each Golden and Death Cross to identify the absolute lowest price (Pi Cycle Bottom) and highest price (Pi Cycle Top) within that cycle.
Precision Labeling:
The indicator dynamically adjusts label positioning:
If the price at the crossover is below the fast moving average → the label is placed on the moving average with a downward pointer.
If the price is above the fast moving average → the label is placed below the candle with an upward pointer.
This ensures optimal visibility and prevents misleading signal placement.
Advanced Pine Script v6 Features:
Labels and moving average names are only shown on the last candle, reducing chart noise while maintaining clarity.
Offers full user customization, allowing traders to toggle:
Pi Cycle Top & Bottom visibility
Moving average labels
Crossover labels
Why This Indicator is Superior
This script is not just another moving average crossover tool—it is a market cycle tracker designed for long-term investors and analysts who seek:
✔ High-accuracy macro cycle identification
✔ Elimination of false signals using an iterative range-based scan
✔ Automatic detection of market extremes without manual adjustments
✔ Optimized visuals with smart label positioning
✔ First-of-its-kind implementation using Pine Script™ v6 capabilities
How to Use It?
Bull Market Tops:
When the Pi Cycle Top indicator flashes, consider the potential for a market cycle peak.
Historically, Bitcoin has corrected significantly after these signals.
Bear Market Bottoms:
When the Pi Cycle Bottom appears, it suggests a macro accumulation phase.
These signals have aligned perfectly with historical cycle bottoms.
Final Thoughts
The Pi Cycle Top/bottom Indicator is a must-have tool for traders, investors, and analysts looking to anticipate long-term trend reversals with precision. With its refined methodology, superior label positioning, and cutting-edge Pine Script™ v6 optimizations, this is the most reliable version ever created.
SMA Crossover Strategy//@version=5
indicator("SMA Crossover Strategy", overlay = true)
// SMA Indicators
sma50 = ta.sma(close, 50)
sma200 = ta.sma(close, 200)
// Buy & Sell Conditions
buyCondition = ta.crossover(sma50, sma200) // BUY Signal
sellCondition = ta.crossunder(sma50, sma200) // SELL Signal
// Plotting SMA Lines
plot(sma50, color = color.green, linewidth = 2, title = "SMA 50")
plot(sma200, color = color.red, linewidth = 2, title = "SMA 200")
// Entry & Exit Signals
plotshape(buyCondition, style = shape.labelup, location = location.belowbar, color = color.green, size = size.large, title = "BUY Signal")
plotshape(sellCondition, style = shape.labeldown, location = location.abovebar, color = color.red, size = size.large, title = "SELL Signal")
TOM PRO 1 (MTF) [TOM]ZERO LAG CUSTOM TOM PRO
Chỉ báo để xác định xu hướng giá trong khung thời gian chỉ định
EMA Trend TableShows Trend of each fib ema using ema high/low. There is also a consecutive close threshold to filter out fake-out trend flips
Orbital SMI Oscillatorthis is a quick little project, I understand its pretty cluttered but looking for some feedback.cheers
1. Core SMI Calculation
Purpose: Foundation oscillator using Stochastic Momentum Index
Inputs:
smilength: Period for high/low range
ema1length/ema2length: Double EMA smoothing periods
Calculates:
Distance from price to midpoint of recent range
Smoothed numerator (price deviation) and denominator (range volatility)
Final SMI = 100 * (smoothed numerator / (denominator/2))
2. Orbital Mechanics Layer
Purpose: Frame price action as celestial mechanics
Components:
orbital_high/low: Recent SMI extremes (20-period default)
orbital_phase: Normalized position between extremes (-1 to +1)
distance_to_high/low: Proximity to orbital bounds
mass: Volatility ratio (14-period vs 50-period ATR)
3. KNN Prediction Engine
Purpose: Forecast SMI using pattern matching
Mechanics:
Stores historical triplets
Compares current pattern (last 5 values) to history
Finds k most similar patterns (weighted Euclidean distance)
Predicts next SMI as average of neighbors' outcomes
4. Escape Velocity System
Purpose: Detect trend breakouts
Key Elements:
escape_velocity_threshold: sqrt(2 * gravitational_pull)
gravitational_pull: Function of volatility (mass) and orbital range
Triggers when momentum + acceleration exceed threshold near extremes
Elliptic bands
Why Elliptic?
Unlike traditional indicators (e.g., Bollinger Bands with constant standard deviation multiples), the elliptic model introduces a cyclical, non-linear variation in band width. This reflects the idea that price movements often follow rhythmic patterns, widening and narrowing in a predictable yet dynamic way, akin to natural market cycles.
Buy: When the price enters from below (green triangle).
Sell: When the price enters from above (red triangle).
Inputs
MA Length: 50 (This is the period for the central Simple Moving Average (SMA).)
Cycle Period: 50 (This is the elliptic cycle length.)
Volatility Multiplier: 2.0 (This value scales the band width.)
Mathematical Foundation
The indicator is based on the ellipse equation. The basic formula is:
Ellipse Equation:
(x^2) / (a^2) + (y^2) / (b^2) = 1
Solving for y:
y = b * sqrt(1 - (x^2) / (a^2))
Parameters Explained:
a: Set to 1 (normalized).
x: Varies from -1 to 1 over the period.
b: Calculated as:
ta.stdev(close, MA Length) * Volatility Multiplier
(This represents the standard deviation of the close prices over the MA period, scaled by the volatility multiplier.)
y (offset): Represents the band distance from the moving average, forming the elliptic cycle.
Behavior
Bands:
The bands are narrow at the cycle edges (when the offset is 0) and become widest at the midpoint (when the offset equals b).
Trend:
The central moving average (MA) shows the overall trend direction, while the bands adjust according to the volatility.
Signals:
Standard buy and sell signals are generated when the price interacts with the bands.
Practical Use
Trend Identification:
If the price is above the MA, it indicates an uptrend; if below, a downtrend.
Support and Resistance:
The elliptic bands act as dynamic support and resistance levels.
Narrowing bands may signal potential trend reversals.
Breakouts:
ACCUMULATION DOT CombinéA simple indicator to accumulate some Polkadot, but works fine with any asset. GL!
Session Vertical Lines with LabelsDieser Indikator markiert den Beginn der verschiedenen Handelssitzungen in der Mitteleuropäischen Zeit (MEZ). Um 18:00 Uhr wird die letzte Linie des Tages gezogen, da zu diesem Zeitpunkt das Handelsvolumen typischerweise stark zurückgeht und die Marktaktivität für eine effiziente Handelsstrategie nicht mehr ausreicht. Die optimalen Handelszeiten für die Nutzung dieses Indikators liegen zwischen 08:00 Uhr und 18:00 Uhr (MEZ).
Momentum IndicatorThe "Momentum Indicator" is a powerful tool designed to visualize bullish and bearish momentum on the chart using two Simple Moving Averages (SMAs).
🔍 How It Works:
SMA 1 (Default: 3) – A fast-moving average to capture short-term momentum.
SMA 2 (Default: 14) – A slower-moving average for identifying the broader trend.
Green Shading: When SMA 1 is above SMA 2, indicating bullish momentum.
Red Shading: When SMA 1 is below SMA 2, indicating bearish momentum
Madrid Ribbon Strategy with Backtestingupdated to include automatic trading
running based on Madrid EMA bands and RSI
Global M2 Money Supply // Days Offset =Global M2 Money Supply index. This script tracks global M2 money supply and allows you to forecast future moves based on changes in global liqudity.
1 Hour Open vs Close Buy Strategy//@version=5
strategy("1 Hour Open vs Close Buy Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// Define the buy condition: current open is higher than the previous close
buyCondition = open > close and strategy.position_size == 0 // Only buy if there is no active position
// Execute the buy order and plot buy price
if (buyCondition)
strategy.entry("Buy", strategy.long)
label.new(x=bar_index, y=low, text="Buy at: " + str.tostring(open), style=label.style_label_up, color=color.green, size=size.normal, textcolor=color.white)
// Define the sell condition based on 3% profit target from the buy price
targetPrice = strategy.position_avg_price * 1.03
// Check if the current price has reached the target price and close the position
if (strategy.position_size > 0 and close >= targetPrice)
strategy.close("Buy")
label.new(x=bar_index, y=high, text="Sell at: " + str.tostring(close), style=label.style_label_down, color=color.red, size=size.normal, textcolor=color.white)
// Plotting to visualize entries and exits on the chart
plotshape(series=buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, text="Buy")
plotshape(series=(strategy.position_size > 0 and close >= targetPrice), location=location.abovebar, color=color.red, style=shape.labeldown, text="Sell")
Two-Wick PinBar DetectorEasily Spot Pin Bar institutional Candles.
This indicator will help you identify pinbar Candles by Changing their colours to be or whatever colour you pick in the settings.
pmrplots lines off your desired times.. 3am-9am pre market... 6am-9am pre market or the opening range between 9:30am-9:45am
Renz-GPT StrategyThis is the result of asking chatGPT to create pinescript for trading crypto currency. It is not tested yet in real trading
New York, London, TokyoEl indicador resalta y marca en el gráfico las sesiones de Forex de diferentes mercados (Asia, Sydney, Tokyo, Shanghai, Europa, Londres, Nueva York y NYSE). Para cada sesión, define periodos horarios y colores, y dibuja cajas y etiquetas que muestran los niveles máximos y mínimos alcanzados durante ese periodo. Además, crea una tabla informativa en la parte superior derecha del gráfico, donde se muestra el nombre de cada sesión, su estado (abierta o cerrada) y los horarios de inicio y fin en UTC.
SAFLNЭто индикатор, который выделяет на графике зоны четырёх торговых сессий. Для каждой сессии он рассчитывает и отображает области от минимальной до максимальной цены, зафиксированной в рамках соответствующего временного диапазона.