Stock Booster 2.0// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © fluxchart
//@version=5
const bool DEBUG = false
const int maxDistanceToLastBar = 5000
const int labelCooldown = 8
const int KDELimit = 300
indicator("Stock Booster", overlay = true, max_labels_count = 500)
rsiLengthInput = input.int(14, minval = 1, title="RSI Length", group="RSI Settings")
rsiSourceInput = input.source(close, "Source", group="RSI Settings")
highPivotLen = input.int(21, "High Pivot Length", minval = 1, group = "Pivots", display = display.none)
lowPivotLen = input.int(21, "Low Pivot Length", minval = 1, group = "Pivots", display = display.none)
realPivotLabels = DEBUG ? input.bool(false, " Real Pivot Labels", group = "Pivots") : false
kdePivotLabels = DEBUG ? input.bool(false, " KDE Pivot Labels", group = "Pivots") : false
activationThresholdStr = input.string("Medium", "Activation Threshold", options = , group = "KDE", tooltip = "Determines the amount of arrows shown. Higher options will result in more arrows being rendered.")
string KDEKernel = input.string("Gaussian", "Kernel", options= , group = "KDE", tooltip = "The kernel function for KDE calculation. Gaussian is a commonly used kernel and is based on normal distribution.")
float KDEBandwidth = input.float(2.71828, "Bandwidth", group = "KDE", tooltip = "This setting sets the smoothness of the KDE function output.")
int KDEStep = input.int(100, "Nº Bins", minval = 1, group = "KDE", tooltip = "The number of elements the KDE Probability array will have. Higher settings will result in greater precision.")
activationThreshold = DEBUG ? input.float(0.25, " Activation Threshold", group = "KDE") : 0.25
if not DEBUG
activationThreshold := (activationThresholdStr == "High" ? 0.4 : activationThresholdStr == "Medium" ? 0.25 : 0.15)
probMode = DEBUG ? input.string("Sum", ' Probability Mode', options = , group = "KDE") : "Sum"
minPadding = DEBUG ? input.bool(false, ' KDE Min Padding', group = "KDE") : false
tableEnabled = input.bool(true, "Dashboard", group = "Dashboard", display = display.none)
tableLocation = input.string("Top Right", "Position", options = , group = "Dashboard", display = display.none)
screenerColor = input.color(#1B1F2B, 'Background', group = 'Dashboard', display = display.none)
frameColor = input.color(color.rgb(255, 255, 255), 'Frame', group = 'Dashboard', display = display.none)
borderColor = input.color(color.rgb(255, 255, 255), 'Border', group = 'Dashboard', display = display.none)
textColorDB = input.color(color.white, 'Text', group = 'Dashboard', display = display.none)
fillBackgrounds = input.bool(true, "Fill Backgrounds", group = "Dashboard", display = display.none)
bearishColor = input.color(#f23646, "High Pivots", group = "Style", inline = "col", display = display.none)
neutralColor = input.color(color.gray, "Neutral", group = "Style", inline = "col", display = display.none)
bullishColor = input.color(#089981, "Low Pivots", group = "Style", inline = "col", display = display.none)
textColor = input.color(color.white, 'Text', group = 'Style', inline = "col", display = display.none)
RSILabelsEnabled = input.bool(true, "RSI Labels", group = "Style")
KDELabelsEnabled = input.bool(true, "KDE Labels", group = "Style")
rsi = ta.rsi(rsiSourceInput, rsiLengthInput)
getPosition (positionText) =>
if positionText == "Top Right"
position.top_right
else if positionText == "Top Center"
position.top_center
else if positionText == "Right Center"
position.middle_right
else if positionText == "Left Center"
position.middle_left
else if positionText == "Bottom Center"
position.bottom_center
else if positionText == "Middle Center"
position.middle_center
//#region KDE
gaussian (float distance, float bandwidth = 1.0) => 1.0 / math.sqrt(2.0 * math.pi) * math.pow(math.e, -0.5 * math.pow(distance / bandwidth, 2.0))
uniform (float distance, float bandwidth = 1.0) => (math.abs(distance) > bandwidth) ? 0.0 : 0.5
sigmoid (float distance, float bandwidth = 1.0) => 2.0 / math.pi * (1.0 / (math.pow(math.e, (distance / bandwidth)) + math.pow(math.e, -(distance / bandwidth))))
kde (array arr, string kernel, float bandwidth, int steps) =>
arrSize = arr.size()
arrRange = arr.range()
arrMin = arr.min() - (minPadding ? (arrRange / 2.0) : 0)
stepCount = arrRange / steps
densityRange = array.new(steps * 2)
for i = 0 to (steps * 2) - 1
densityRange.set(i, arrMin + i * stepCount)
xArr = array.new()
yArr = array.new()
for i = 0 to densityRange.size() - 1
float temp = 0
for j = 0 to arr.size() - 1
switch KDEKernel
"Gaussian" => temp += gaussian(densityRange.get(i) - arr.get(j), 1.0 / bandwidth)
"Uniform" => temp += uniform(densityRange.get(i) - arr.get(j), 1.0 / bandwidth)
"Sigmoid" => temp += sigmoid(densityRange.get(i) - arr.get(j), 1.0 / bandwidth)
xArr.push(densityRange.get(i))
yArr.push(1.0 / arrSize * temp)
//#endregion
//#region Pivots
prefixSum (array arr, int l, int r) =>
arr.get(r) - (l == 0 ? 0 : arr.get(l - 1))
float MidKDEHigh = na
float MidKDELow = na
var array KDEHighX = na
var array KDEHighY = na
var array KDEHighYSum = array.new()
var array KDELowX = na
var array KDELowY = na
var array KDELowYSum = array.new()
highPivot = ta.pivothigh(highPivotLen, highPivotLen)
lowPivot = ta.pivotlow(lowPivotLen, lowPivotLen)
var highPivotRSIs = array.new()
var lowPivotRSIs = array.new()
if not na(highPivot)
if highPivotRSIs.size() > KDELimit
highPivotRSIs.remove(0)
highPivotRSIs.push(rsi )
= kde(highPivotRSIs, KDEKernel, KDEBandwidth, KDEStep)
KDEHighX := KDEHighX1
KDEHighY := KDEHighY1
KDEHighYSum.clear()
temp = 0.0
for i = 0 to KDEHighY.size() - 1
temp += KDEHighY.get(i)
KDEHighYSum.push(temp)
MidKDEHigh := array.get(KDEHighX, array.indexof(KDEHighY, array.max(KDEHighY)))
if not na(lowPivot)
if lowPivotRSIs.size() > KDELimit
lowPivotRSIs.remove(0)
lowPivotRSIs.push(rsi )
= kde(lowPivotRSIs, KDEKernel, KDEBandwidth, KDEStep)
KDELowX := KDELowX1
KDELowY := KDELowY1
KDELowYSum.clear()
temp = 0.0
for i = 0 to KDELowY.size() - 1
temp += KDELowY.get(i)
KDELowYSum.push(temp)
MidKDELow := array.get(KDELowX, array.indexof(KDELowY, array.max(KDELowY)))
//#endregion
//#region KDE Optimization
f_lin_interpolate(float x0, float x1, float y0, float y1, float x) =>
y0 + (x - x0) * (y1 - y0) / (x1 - x0)
float lowProb = na
float maxLowProb = na
float highProb = na
float maxHighProb = na
if last_bar_index - maxDistanceToLastBar < bar_index
if highPivotRSIs.size() > 0
highXIndexL = array.binary_search_leftmost(KDEHighX, rsi)
highXIndexR = math.min(array.binary_search_rightmost(KDEHighX, rsi), KDEHighX.size() - 1)
nearestIndex = (math.abs(rsi - KDEHighX.get(highXIndexL)) < math.abs(rsi - KDEHighX.get(highXIndexR))) ? highXIndexL : highXIndexR
if probMode == "Nearest"
highProb := KDEHighY.get(nearestIndex)
maxHighProb := array.max(KDEHighY)
else if probMode == "Sum"
highProb := prefixSum(KDEHighYSum, 0, nearestIndex)
if lowPivotRSIs.size() > 0
lowXIndexL = array.binary_search_leftmost(KDELowX, rsi)
lowXIndexR = math.min(array.binary_search_rightmost(KDELowX, rsi), KDELowX.size() - 1)
nearestIndex = (math.abs(rsi - KDELowX.get(lowXIndexL)) < math.abs(rsi - KDELowX.get(lowXIndexR))) ? lowXIndexL : lowXIndexR
if probMode == "Nearest"
lowProb := KDELowY.get(nearestIndex)
maxLowProb := array.max(KDELowY)
else if probMode == "Sum"
lowProb := prefixSum(KDELowYSum, nearestIndex, KDELowYSum.size() - 1)
if DEBUG and barstate.islastconfirmedhistory
for i = 0 to KDELowX.size() - 1
curX = KDELowX.get(i)
curY = KDELowY.get(i)
log.info(str.tostring(curX) + " = " + str.tostring(curY))
log.info("High Y Sum " + str.tostring(KDEHighY.sum()))
diffToHighKDE = math.abs(rsi - MidKDEHigh)
diffToLowKDE = math.abs(rsi - MidKDELow)
//#endregion
//#region Draw Pivots
color curColor = na
if (not na(KDELowY)) and (not na(KDEHighY))
if probMode == "Nearest"
if math.abs(lowProb - maxLowProb) < activationThreshold / 50.0
curColor := bullishColor
if math.abs(highProb - maxHighProb) < activationThreshold / 50.0
curColor := bearishColor
else if probMode == "Sum"
if lowProb > KDELowY.sum() * (1.0 - activationThreshold)
curColor := bullishColor
else if highProb > KDEHighY.sum() * (1.0 - activationThreshold)
curColor := bearishColor
//barcolor(curColor)
atr = ta.atr(50)
plotarrow(curColor == bullishColor and barstate.isconfirmed ? 1 : na, "Bullish Arrows", color.new(bullishColor, 70), color.new(bullishColor, 70), minheight = 20, maxheight = 20)
plotarrow(curColor == bearishColor and barstate.isconfirmed ? -1 : na, "Bearish Arrows", color.new(bearishColor, 70), color.new(bearishColor, 70), minheight = 20, maxheight = 20)
plotarrow((na(curColor) and curColor == bullishColor and barstate.isconfirmed) ? 1 : na, "Possible Bullish Pivot", bullishColor, bullishColor, minheight = 20, maxheight = 20)
plotarrow((na(curColor) and curColor == bearishColor and barstate.isconfirmed) ? -1 : na, "Possible Bearish Pivot", bearishColor, bearishColor, minheight = 20, maxheight = 20)
alertcondition(na(curColor) and curColor == bullishColor and barstate.isconfirmed, "Possible Bullish Pivot")
alertcondition(na(curColor) and curColor == bearishColor and barstate.isconfirmed, "Possible Bearish Pivot")
if KDELabelsEnabled or RSILabelsEnabled
var lastBullishLabel = 0
if (na(curColor) and curColor == bullishColor and barstate.isconfirmed) and (bar_index - lastBullishLabel) > labelCooldown
lastBullishLabel := bar_index
txt = ""
if RSILabelsEnabled and KDELabelsEnabled
txt := "RSI | " + str.tostring(rsi, "#") + " | " + str.tostring(lowProb * 100, "#.##") + "%"
else if RSILabelsEnabled
txt := "RSI | " + str.tostring(rsi, "#")
else
txt := str.tostring(rsi, "#") + "%"
label.new(bar_index, low, txt, yloc = yloc.belowbar, color = na, style = label.style_label_up, textcolor = textColor, force_overlay = true)
var lastBearishLabel = 0
if (na(curColor) and curColor == bearishColor and barstate.isconfirmed) and (bar_index - lastBearishLabel) > labelCooldown
lastBearishLabel := bar_index
txt = ""
if RSILabelsEnabled and KDELabelsEnabled
txt := "RSI | " + str.tostring(rsi, "#") + " | " + str.tostring(highProb * 100, "#.##") + "%"
else if RSILabelsEnabled
txt := "RSI | " + str.tostring(rsi, "#")
else
txt := str.tostring(rsi, "#") + "%"
label.new(bar_index, low, txt, yloc = yloc.abovebar, color = na, style = label.style_label_down, textcolor = textColor, force_overlay = true)
if kdePivotLabels
txt = str.tostring(rsi, "#.##") + " HP -> " + str.tostring(highProb, "#.##") + " LP -> " + str.tostring(lowProb, "#.##") + " MHP -> " + str.tostring(maxHighProb, "#.##") + " MLP -> " + str.tostring(maxLowProb, "#.##")
if math.abs(lowProb - maxLowProb) < activationThreshold
label.new(bar_index, high, txt, yloc = yloc.belowbar, color = textColor, style = label.style_label_up, textcolor = color.black, force_overlay = true)
if math.abs(highProb - maxHighProb) < activationThreshold
label.new(bar_index, high, txt, yloc = yloc.abovebar, color = textColor, style = label.style_label_down, textcolor = color.black, force_overlay = true)
if realPivotLabels
if not na(highPivot)
txt = str.tostring(rsi , "#.##") + " HP -> " + str.tostring(highProb , "#.##") + " LP -> " + str.tostring(lowProb , "#.##") + " MHP -> " + str.tostring(maxHighProb , "#.##") + " MLP -> " + str.tostring(maxLowProb , "#.##")
label.new(bar_index - highPivotLen, high, txt, yloc = yloc.abovebar, color = textColor, style = label.style_label_down, textcolor = color.black, force_overlay = true)
if not na(lowPivot)
txt = str.tostring(rsi , "#.##") + " HP -> " + str.tostring(highProb , "#.##") + " LP -> " + str.tostring(lowProb , "#.##") + " MHP -> " + str.tostring(maxHighProb , "#.##") + " MLP -> " + str.tostring(maxLowProb , "#.##")
label.new(bar_index - lowPivotLen, high, txt, yloc = yloc.belowbar, color = textColor, style = label.style_label_up, textcolor = color.black, force_overlay = true)
//#endregion
if tableEnabled
var table realtimeTable = table.new(getPosition(tableLocation), 2, 10, bgcolor = screenerColor, frame_width = 2, frame_color = frameColor, border_width = 1, border_color = borderColor)
// Header
table.merge_cells(realtimeTable, 0, 0, 1, 0)
table.cell(realtimeTable, 0, 0, "KDE Optimized RSI", text_color = textColorDB, bgcolor = screenerColor)
// RSI
table.cell(realtimeTable, 0, 1, "RSI", text_color = textColorDB, bgcolor = screenerColor)
table.cell(realtimeTable, 1, 1, str.tostring(rsi, "#"), text_color = textColorDB, bgcolor = screenerColor)
// KDE
table.cell(realtimeTable, 0, 2, (lowProb > highProb) ? "Bullish KDE" : "Bearish KDE", text_color = (lowProb > highProb) ? bullishColor : bearishColor, bgcolor = screenerColor)
table.cell(realtimeTable, 1, 2, str.tostring(nz(math.max(highProb, lowProb), 0) * 100, "#.##") + "%", text_color = textColorDB, bgcolor = screenerColor)
Циклический анализ
PropFX SMCIndicador de Estrutura de Mercado SMC para TradingView
Descrição: Este indicador identifica automaticamente a estrutura de mercado (Market Structure) com base nos Smart Money Concepts (SMC). Ele marca pontos de Higher Highs (HH), Higher Lows (HL), Lower Highs (LH) e Lower Lows (LL), facilitando a leitura de tendências. A lógica principal é auxiliar na identificação de fases de alta e baixa de maneira visual, ideal para traders de SMC que buscam entradas precisas.
Funcionalidades:
Detecção de Estrutura de Mercado: O indicador traça as principais zonas de reversão com base nos últimos pontos altos e baixos.
Identificação Automática de Mudanças de Estrutura: Quando uma nova alta ou baixa significativa é formada, o indicador ajusta automaticamente a estrutura, destacando uma possível mudança de tendência (exemplo: quando um HH é rompido e forma um LH, indicando possível reversão de alta para baixa).
Alertas Customizáveis: Configuração para alertas que notificam o trader quando a estrutura muda, sinalizando oportunidades de entrada ou saída de acordo com a lógica SMC.
Coloração Visual: Linhas e rótulos coloridos para destacar cada tipo de estrutura (alta, baixa) e fase da tendência (bullish, bearish), tornando a análise intuitiva.
Parâmetros de Configuração:
Tamanho de pivô para definição de pontos altos e baixos.
Sensibilidade para identificar rompimentos estruturais.
Opções de personalização de cores e visibilidade dos rótulos.
Aplicação: O indicador é ideal para traders que aplicam conceitos de Smart Money, permitindo rápida identificação da estrutura de mercado e suas mudanças, ajudando a planejar operações baseadas em fases de acumulação, distribuição e reversão de tendências.
Este indicador facilita a análise de SMC, permitindo que os traders identifiquem oportunidades de entrada e saída de forma rápida, com uma visão clara da estrutura de mercado atual.
Globex Trap ZoneGlobex Trap Indicator
A powerful tool designed to identify potential trading opportunities by analyzing the relationship between Globex session ranges and Supply & Demand zones during regular trading hours.
Key Features
Tracks and visualizes Globex session price ranges
Identifies key Supply & Demand zones during regular trading hours
Highlights potential trap areas where price might experience significant reactions
Fully customizable time ranges and visual settings
Clear labeling of Globex highs and lows
How It Works
The indicator tracks two key periods:
Globex Session (Default: 6:00 PM - 9:30 AM)
Monitors overnight price action
Marks session high and low
Helps identify potential range breakouts
Supply & Demand Zone (Default: 8:00 AM - 11:00 AM)
Tracks price action during key market hours
Identifies potential reaction zones
Helps spot institutional trading areas
Best Practices for Using This Indicator
Use on 1-hour timeframe or lower for optimal visualization
Best suited for futures and other instruments traded during Globex sessions
Pay attention to areas where Globex range and Supply/Demand zones overlap
Use in conjunction with your existing trading strategy for confirmation
Recommended minimum of 10 days of historical data for context
Settings Explanation
Globex Session: Customizable time range for overnight trading session
Supply & Demand Zone: Adjustable time range for regular trading hours
Days to Look Back: Number of historical days to display (default: 10)
Visual Settings: Customizable colors and transparency for both zones
Important Notes
All times are based on exchange timezone
The indicator respects overnight sessions and properly handles timezone transitions
Historical data requirements: Minimum 10 days recommended
Performance impact: Optimized for smooth operation with minimal resource usage
Disclaimer
Past performance is not indicative of future results. This indicator is designed to be used as part of a comprehensive trading strategy and should not be relied upon as the sole basis for trading decisions.
Updates and Support
I actively maintain this indicator and welcome feedback from the trading community. Please feel free to leave comments or suggestions for improvements.
Global OECD CLI Diffusion Index YoY vs MoMThe Global OECD Composite Leading Indicators (CLI) Diffusion Index is used to gauge the health and directional momentum of the global economy and anticipate changes in economic conditions. It usually leads turning points in the economy by 6 - 9 months.
How to read: Above 50% signals economic expansion across the included countries. Below 50% signals economic contraction.
The diffusion index component specifically shows the proportion of countries with positive economic growth signals compared to those with negative or neutral signals.
The OECD CLI aggregates data from several leading economic indicators including order books, building permits, and consumer and business sentiment. It tracks the economic momentum and turning points in the business cycle across 38 OECD member countries and several other Non-OECD member countries.
Turnaround Tuesday IndikatorTurnaround Tuesday Indikator für den Einstieg am Montag Morgen nach Freitag
Average Up and Down Candles Streak with Predicted Next CandleThis indicator is designed to analyze price trends by examining the patterns of up and down streaks (consecutive bullish or bearish candles) over a defined period. It uses this data to provide insights on whether the next candle is likely to be bullish or bearish, and it visually displays relevant information on the chart.
Here’s a breakdown of what the indicator does:
1. Inputs and Parameters
Period (Candles): Defines the number of candles used to calculate the average length of bullish and bearish streaks. For example, if the period is set to 20, the indicator will analyze the past 20 candles to determine average up and down streak lengths.
Bullish/Bearish Bias Signal Toggle: These options allow users to show or hide visual signals (green or red circles) when there’s a bullish or bearish bias in the trend based on the indicator’s calculations.
2. Streak Calculation
The indicator looks at each candle within the period to identify if it closed up (bullish) or down (bearish).
Up Streak: The indicator counts consecutive bullish candles. When there’s a bearish candle, it resets the up streak count.
Down Streak: Similarly, it counts consecutive bearish candles and resets when a bullish candle appears.
Averages: Over the defined period, the indicator calculates the average length of up streaks and average length of down streaks. This provides a baseline to assess whether the current streak is typical or extended.
3. Current and Average Streak Display
The indicator displays the current up and down streak lengths alongside the average streak lengths for comparison. This data appears in a table on the chart, allowing you to see at a glance:
The current streak length (for both up and down trends)
The average streak length for up and down trends over the chosen period
4. Trend Prediction for the Next Candle
Next Candle Prediction: Based on the current streak and its comparison to the average, the indicator predicts the likely direction of the next candle:
Bullish: If the current up streak is shorter than the average up streak, suggesting that the bullish trend could continue.
Bearish: If the current down streak is shorter than the average down streak, indicating that the bearish trend may continue.
Neutral: If the current streak length is near the average, which could signal an upcoming reversal.
This prediction appears in a table on the chart, labeled as “Next Candle.”
5. Previous Candle Analysis
The Previous Candle entry in the table reflects the last completed candle (directly before the current candle) to show whether it was bullish, bearish, or neutral.
This data gives a reference point for recent price action and helps validate the next candle prediction.
6. Visual Signals and Reversal Zones
Bullish/Bearish Bias Signals: The indicator can plot green circles on bullish bias and red circles on bearish bias to highlight points where the trend is likely to continue.
Reversal Zones: If the current streak length reaches or exceeds the average, it suggests the trend may be overextended, indicating a potential reversal zone. The indicator highlights these zones with shaded backgrounds (green for possible bullish reversal, red for bearish) on the chart.
Summary of What You See on the Chart
Bullish and Bearish Bias Signals: Green or red circles mark areas of expected continuation in the trend.
Reversal Zones: Shaded areas in red or green suggest that the trend might be about to reverse.
Tables:
The Next Candle prediction table displays the trend direction of the previous candle and the likely trend of the next candle.
The Streak Information table shows the current up and down streak lengths, along with their averages for easy comparison.
Practical Use
This indicator is helpful for traders aiming to understand trend momentum and potential reversals based on historical patterns. It’s particularly useful for swing trading, where knowing the typical length of bullish or bearish trends can help in timing entries and exits.
Multi-Timeframe Trend Strategy//@version=5
indicator("Multi-Timeframe Trend Strategy", overlay=true)
// Inputs for EMA
ema50_length = input(50, title="50 EMA Length")
ema200_length = input(200, title="200 EMA Length")
// Inputs for RSI
rsi_length = input(14, title="RSI Length")
rsi_overbought = input(70, title="RSI Overbought Level")
rsi_oversold = input(30, title="RSI Oversold Level")
// EMA calculations
ema50 = ta.ema(close, ema50_length)
ema200 = ta.ema(close, ema200_length)
// RSI calculation
rsi = ta.rsi(close, rsi_length)
// MACD calculations
= ta.macd(close, 12, 26, 9)
// Plot EMAs
plot(ema50, color=color.blue, linewidth=2, title="50 EMA")
plot(ema200, color=color.red, linewidth=2, title="200 EMA")
// Conditions for Long Entry
long_condition = (close > ema200) and (ta.crossover(close, ema50)) and (rsi > 50 and rsi < rsi_overbought) and (macdLine > signalLine)
// Conditions for Short Entry
short_condition = (close < ema200) and (ta.crossunder(close, ema50)) and (rsi < 50 and rsi > rsi_oversold) and (macdLine < signalLine)
// Plot Buy/Sell Signals
plotshape(long_condition, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", title="Buy Signal")
plotshape(short_condition, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", title="Sell Signal")
// Alerts
alertcondition(long_condition, title="Long Alert", message="Buy Signal Detected!")
alertcondition(short_condition, title="Short Alert", message="Sell Signal Detected!")
Price Move Exceed % Threshold & BE Evaluation1Handy to see history or quick back test of moves. Enter a decimal for percentage wanted and choose the time frame wanted . The occurrences of the up or down threshold are plotted in the panel as maroon or green squares and can be read as red or green text in the panel data and on the right hand scale . The last number in the panel is the average move for the chosen period.
My usage is mostly to see what % has been exceeded for break even prices of option trades. Example: in SPY a spread has a break even of 567 when the price is 570; I get the percentage of the $3 move by dividing 3/570 to get 0.0526 ; the results show as described above.
Low Price VolatilityI highlighted periods of low price volatility in the Nikkei 225 futures trading.
2 dây EMA (Đường trung bình động theo cấp số mũ) với các thông số bạn đã yêu cầu. Chiến lược này sẽ thực hiện mua khi EMA 22 cắt lên EMA 250 và bán khi EMA 22 cắt xuống EMA 250, với điểm dừng lỗ (SL) được xác định dựa trên giá trung bình của 4 phiên gần nhất. Tỷ lệ R
là 1:2 và có khả năng dời SL lên tới tỷ lệ R
1:10.
Ido strategy RSI Oversold with MACD Buy Signal Indicator
This indicator combines the Relative Strength Index (RSI) and the Moving Average Convergence Divergence (MACD) to help identify potential buy signals based on oversold conditions and trend reversals. This script is designed for traders looking to identify entry points when an asset is likely undervalued (oversold) and showing bullish momentum.
How It Works
RSI Oversold Detection: The RSI measures the speed and change of price movements. This indicator flags when the RSI falls below 30, signaling that the asset may be oversold. The user can customize the RSI lookback period and the timeframe within which oversold conditions are considered relevant.
MACD Crossover: The MACD line crossing above the Signal line often indicates a shift to bullish momentum. In this script, a buy signal is generated when a MACD bullish crossover occurs after an RSI oversold condition has been met within a user-defined lookback window.
Buy Signal: A green triangle appears below the price chart each time both conditions are met—when the RSI has recently been in oversold territory and the MACD line crosses above the Signal line. This signal suggests that the asset may be positioned for a potential upward trend, providing a visual cue for entry points.
Customizable Settings
RSI Settings: Adjust the RSI source and period length.
MACD Settings: Customize the fast, slow, and signal lengths of the MACD to suit different market conditions.
Lookback Period: Define how many bars back to check for an RSI oversold condition before confirming a MACD crossover.
Visual Elements
Oversold Background Color: The background on the price chart is shaded red whenever the RSI is below 30.
Buy Signal: A green triangle is displayed on the chart to indicate a potential entry point when both conditions are met.
Alerts
This indicator includes optional alerts, allowing traders to receive notifications whenever the conditions for a buy signal are met, making it easier to monitor multiple assets and stay informed of trading opportunities.
This indicator is ideal for traders using a combination of momentum and trend reversal strategies, especially in volatile markets where oversold conditions often precede a trend change.
Williams %R - Multi TimeframeThis indicator implements the William %R multi-timeframe. On the 1H chart, the curves for 1H (with signal), 4H, and 1D are displayed. On the 4H chart, the curves for 4H (with signal) and 1D are shown. On all other timeframes, only the %R and signal are displayed. The indicator is useful to use on 1H and 4H charts to find confluence among the different curves and identify better entries based on their alignment across all timeframes. Signals above 80 often indicate a potential bearish reversal in price, while signals below 20 often suggest a bullish price reversal.
Tendência de Alta Completa com Sinal de Fim [SystemAlpha]Este indicador é um sinalizador simples para identificar e acompanhar quando um ativo está em uma tendência de alta (ou seja, um movimento de valorização) e também para alertar quando essa tendência de alta chega ao fim.
Como o indicador funciona
Tendência de Alta:
O indicador analisa duas condições principais para identificar uma tendência de alta:
Uma média móvel rápida (EMA de 20 períodos) deve estar acima de uma média móvel mais lenta (EMA de 50 períodos). Esse cruzamento sugere que o ativo está subindo no curto prazo mais rápido do que no médio prazo.
O índice de força relativa (RSI), que mede o momento do mercado, precisa estar acima de 50. Isso indica que a pressão compradora está prevalecendo, outro sinal de alta.
Quando essas condições são atendidas, o indicador mostra um sinal verde abaixo da barra de preço, indicando que o ativo está em tendência de alta.
Fim da Tendência de Alta:
O indicador também avisa quando essas condições deixam de ser atendidas, sinalizando um possível fim do movimento de alta.
Quando a tendência de alta termina (ou seja, se a média móvel rápida cai abaixo da média lenta ou o RSI fica abaixo de 50), o indicador exibe um sinal vermelho acima da barra de preço, indicando que a força da alta enfraqueceu e pode haver uma reversão ou uma pausa no movimento ascendente.
Alertas:
Se você usa o TradingView, o indicador também envia alertas para que você seja notificado automaticamente quando uma tendência de alta começa ou termina, ajudando a acompanhar o ativo sem precisar estar sempre de olho no gráfico.
Resumo
Sinal verde abaixo do preço: o ativo está em tendência de alta.
Sinal vermelho acima do preço: o ativo terminou sua tendência de alta e pode começar a corrigir ou cair.
Este indicador é útil para quem quer identificar e seguir tendências no mercado, ajudando a saber quando um ativo está ganhando ou perdendo força no movimento de alta.
Geçmiş Fibonacci SeviyeleriFibonacci seviyeleri ticaretin olmazsa olmazıdır.Sizlere kullanımı kolay ve anlaşılır bır kod yazdım.Umarım işinize yarar ve size kazandırır.
Pulse DPO: Major Cycle Tops and Bottoms█ OVERVIEW
Pulse DPO is an oscillator designed to highlight Major Cycle Tops and Bottoms .
It works on any market driven by cycles. It operates by removing the short-term noise from the price action and focuses on the market's cyclical nature.
This indicator uses a Normalized version of the Detrended Price Oscillator (DPO) on a 0-100 scale, making it easier to identify major tops and bottoms.
Credit: The DPO was first developed by William Blau in 1991.
█ HOW TO READ IT
Pulse DPO oscillates in the range between 0 and 100. A value in the upper section signals an OverBought (OB) condition, while a value in the lower section signals an OverSold (OS) condition.
Generally, the triggering of OB and OS conditions don't necessarily translate into swing tops and bottoms, but rather suggest caution on approaching a market that might be overextended.
Nevertheless, this indicator has been customized to trigger the signal only during remarkable top and bottom events.
I suggest using it on the Daily Time Frame , but you're free to experiment with this indicator on other time frames.
The indicator has Built-in Alerts to signal the crossing of the Thresholds. Please don't act on an isolated signal, but rather integrate it to work in conjunction with the indicators present in your Trading Plan.
█ OB SIGNAL ON: ENTERING OVERBOUGHT CONDITION
When Pulse DPO crosses Above the Top Threshold it Triggers ON the OB signal. At this point the oscillator line shifts to OB color.
When Pulse DPO enters the OB Zone, please beware! In this Area the Major Players usually become Active Sellers to the Public. While the OB signal is On, it might be wise to Consider Selling a portion or the whole Long Position.
Please note that even though this indicator aims to focus on major tops and bottoms, a strong trending market might trigger the OB signal and stay with it for a long time. That's especially true on young markets and on bubble-mode markets.
█ OB SIGNAL OFF: EXITING OVERBOUGHT CONDITION
When Pulse DPO crosses Below the Top Threshold it Triggers OFF the OB signal. At this point the oscillator line shifts to its normal color.
When Pulse DPO exits the OB Zone, please beware because a Major Top might just have occurred. In this Area the Major Players usually become Aggressive Sellers. They might wind up any remaining Long Positions and Open new Short Positions.
This might be a good area to Open Shorts or to Close/Reverse any remaining Long Position. Whatever you choose to do, it's usually best to act quickly because the market is prone to enter into panic mode.
█ OS SIGNAL ON: ENTERING OVERSOLD CONDITION
When Pulse DPO crosses Below the Bottom Threshold it Triggers ON the OS signal. At this point the oscillator line shifts to OS color.
When Pulse DPO enters the OS Zone, please beware because in this Area the Major Players usually become Active Buyers accumulating Long Positions from the desperate Public.
While the OS signal is On, it might be wise to Consider becoming a Buyer or to implement a Dollar-Cost Averaging (DCA) Strategy to build a Long Position towards the next Cycle. In contrast to the tops, the OS state usually takes longer to resolve a major bottom.
█ OS SIGNAL OFF: EXITING OVERSOLD CONDITION
When Pulse DPO crosses Above the Bottom Threshold it Triggers OFF the OS signal. At this point the oscillator line shifts to its normal color.
When Pulse DPO exits the OS Zone, please beware because a Major Bottom might already be in place. In this Area the Major Players become Aggresive Buyers. They might wind up any remaining Short Positions and Open new Long Positions.
This might be a good area to Open Longs or to Close/Reverse any remaining Short Positions.
█ WHY WOULD YOU BE INTERESTED IN THIS INDICATOR?
This indicator is built over a solid foundation capable of signaling Major Cycle Tops and Bottoms across many markets. Let's see some examples:
Early Bitcoin Years: From 0 to 1242
This chart is in logarithmic mode in order to properly display various exponential cycles. Pulse DPO is properly signaling the major early highs from 9-Jun-2011 at 31.50, to the next one on 9-Apr-2013 at 240 and the epic top from 29-Nov-2013 at 1242.
Due to the massive price movements, the OB condition stays pinned during most of the exponential price action. But as you can see, the OB condition quickly vanishes once the Cycle Top has been reached. As the market matures, the OB condition becomes more exceptional and triggers much closer from the Cycle Top.
With regards to Cycle Bottoms, the early bottom of 2 after having peaked at 31.50 doesn’t get captured by the indicator. That is the only cycle bottom that escapes the Pulse DPO when the bottom threshold is set at a value of 5. In that event, the oscillator low reached 6.95.
Bitcoin Adoption Spreading: From 257 to 73k
This chart is in logarithmic mode in order to properly display various exponential cycles. Pulse DPO is properly signaling all the major highs from 17-Dec-2017 at 19k, to the next one on 14-Apr-2021 at 64k and the most recent top from 9-Nov-2021 at 68k.
During the massive run of 2017, the OB condition still stayed triggered for a few weeks on each swing top. But on the next cycles it started to signal only for a few days before each swing top actually happened. The OB condition during the last cycle top triggered only for 3 days. Therefore the signal grows in focus as the market matures.
At the time of publishing this indicator, Bitcoin printed a new All Time High (ATH) on 13-Mar-2024 at 73k. That run didn’t trigger the OB condition. Therefore, if the indicator is correct the Bitcoin market still has some way to grow during the next months.
With regards to Cycle Bottoms, the bottom of 3k after having peaked at19k got captured within the wide OS zone. The bottom of 15k after having peaked at 68k got captured too within the OS accumulation area.
Gold
Pulse DPO behaves surprisingly well on a long standing market such as Gold. Moving back to the 197x years it’s been signaling most Cycle Tops and Bottoms with precision. During the last cycle, it shows topping at 2k and bottoming at 1.6k.
The current price action is signaling OB condition in the range of 2.5k to 2.7k. Looking at past cycles, it tends to trigger on and off at multiple swing tops until reaching the final cycle top. Therefore this might indicate the first wave within a potential gold run.
Oil
On the Oil market, we can see that most of the cycle tops and bottoms since the 80s got signaled. The only exception being the low from 2020 which didn’t trigger.
EURUSD
On Forex markets the Pulse DPO also behaves as expected. Looking back at EURUSD we can see the marketing triggering OB and OS conditions during major cycle tops and bottoms from recent times until the 80s.
S&P 500
On the S&P 500 the Pulse DPO catched the lows from 2016 and 2020. Looking at present price action, the recent ATH didn’t trigger the OB condition. Therefore, the indicator is allowing room for another leg up during the next months.
Amazon
On the Amazon chart the Pulse DPO is mirroring pretty accurately the major swings. Scrolling back to the early 2000s, this chart resembles early exponential swings in the crypto space.
Tesla
Moving onto a younger tech stock, Pulse DPO captures pretty accurately the major tops and bottoms. The chart is shown in logarithmic scale to better display the magnitude of the moves.
█ SETTINGS
This indicator is ideal for identifying major market turning points while filtering out short-term noise. You are free to adjust the parameters to align with your preferred trading style.
Parameters : This section allows you to customize any of the Parameters that shape the Oscillator.
Oscillator Length: Defines the period for calculating the Oscillator.
Offset: Shifts the oscillator calculation by a certain number of periods, which is typically half the Oscillator Length.
Lookback Period: Specifies how many bars to look back to find tops and bottoms for normalization.
Smoothing Length: Determines the length of the moving average used to smooth the oscillator.
Thresholds : This section allows you to customize the Thresholds that trigger the OB and OS conditions.
Top: Defines the value of the Top Threshold.
Bottom: Defines the value of the Bottom Threshold.
EMA 5 ve EMA 20 Kesişim Stratejisiema 5 ve ema 20 kesişimlerinde sinyal üretir.tek başına kullanılması hatalı işlem almamıza sebep verebilir.Bu yüzden yanında ek indikatörler ve teknik analiz gerekir.
2024 - Median High-Low % Change - Monthly, Weekly, DailyDescription:
This indicator provides a statistical overview of Bitcoin's volatility by displaying the median high-to-low percentage changes for monthly, weekly, and daily timeframes. It allows traders to visualize typical price fluctuations within each period, supporting range and volatility-based trading strategies.
How It Works:
Calculation of High-Low % Change: For each selected timeframe (monthly, weekly, and daily), the script calculates the percentage change from the high to the low price within the period.
Median Calculation: The median of these high-to-low changes is determined for each timeframe, offering a robust central measure that minimizes the impact of extreme price swings.
Table Display: At the end of the chart, the script displays a table in the top-right corner with the median values for each selected timeframe. This table is updated dynamically to show the latest data.
Usage Notes:
This script includes input options to toggle the visibility of each timeframe (monthly, weekly, and daily) in the table.
Designed to be used with Bitcoin on daily and higher timeframes for accurate statistical insights.
Ideal for traders looking to understand Bitcoin's typical volatility and adjust their strategies accordingly.
This indicator does not provide specific buy or sell signals but serves as an analytical tool for understanding volatility patterns.
2024_V2 - ComLucro - Candle CounterElevate your trading game with this advanced Candle Counter, designed to provide precise candlestick counts across your preferred timeframes! Whether you’re tracking yearly, monthly, weekly, daily, or hourly candles, this script gives you the edge by presenting easy-to-read labels directly on your chart. It’s perfect for traders who want an accurate view of candle formations over time to enhance their trading strategies.
Script Name: 2024_V2 - ComLucro - Candle Counter
✨ Features:
Adjustable timeframes: yearly, monthly, weekly, daily, or hourly.
Customizable label color and position for seamless chart integration.
Effortlessly track candle count without altering your chart style!
🔗 Stay updated! Subscribe to our YouTube channel ComLucro Trader for more tips, tutorials, and tools to maximize your trading potential!
🌐 Visit us at comlucro.com.br for more exclusive scripts, insights, and strategies.
Trend Continuation RatioThis TradingView indicator calculates the likelihood of consecutive bullish or bearish days over a specified period, giving insights into day-to-day continuation patterns within the market.
How It Works
Period Length Input:
The user sets the period length (e.g., 20 days) to analyze.
After each period, the counts reset, allowing fresh data for each new interval.
Bullish and Bearish Day Definitions:
A day is considered bullish if the closing price is higher than the opening price.
A day is considered bearish if the closing price is lower than the opening price.
Count Tracking:
Within each specified period, the indicator tracks:
Total Bullish Days: The number of days where the close is greater than the open.
Total Bearish Days: The number of days where the close is less than the open.
Bullish to Bullish Continuations: Counts each instance where a bullish day is followed by another bullish day.
Bearish to Bearish Continuations: Counts each instance where a bearish day is followed by another bearish day.
Calculating Continuation Ratios:
The Bullish Continuation Ratio is calculated as the percentage of bullish days that were followed by another bullish day:
Bullish Continuation Ratio = (Bullish to Bullish Continuations /Total Bullish Days)×100
Bullish Continuation Ratio=( Total Bullish Days/Bullish to Bullish Continuations )×100
The Bearish Continuation Ratio is the percentage of bearish days followed by another bearish day:
Bearish Continuation Ratio = (Bearish to Bearish Continuations/Total Bearish Days)×100
Bearish Continuation Ratio=( Total Bearish Days/Bearish to Bearish Continuations )×100
Display on Chart:
The indicator displays a table in the top-right corner of the chart with:
Bullish Continuation Ratio (%): Percentage of bullish days that led to another bullish day within the period.
Bearish Continuation Ratio (%): Percentage of bearish days that led to another bearish day within the period.
Usage Insights
High Ratios: If the bullish or bearish continuation ratio is high, it suggests a trend where bullish/bearish days often lead to similar days, indicating possible momentum.
Low Ratios: Low continuation ratios indicate frequent reversals, which could suggest a range-bound or volatile market.
This indicator is helpful for assessing short-term trend continuation tendencies, allowing traders to gauge whether they are more likely to see follow-through on bullish or bearish days within a chosen timeframe.
Monday Friday breakoutĐiều kiện Mua: Khi giá đóng cửa phá vỡ đỉnh của ngày thứ Hai hoặc thứ Sáu, chiến lược sẽ vào lệnh mua.
Điều kiện Bán: Khi giá đóng cửa phá vỡ đáy của ngày thứ Hai hoặc thứ Sáu, chiến lược sẽ vào lệnh bán.
Cắt lỗ và Chốt lời: Mức cắt lỗ được đặt dưới đáy đối với lệnh mua và trên đỉnh đối với lệnh bán. Mức chốt lời được tính với tỷ lệ R
là 1:1.
Zig Zag with Adaptive ProjectionThe "Zig Zag with Adaptive Projection" is an advanced technical analysis tool designed for TradingView's Pine Script platform. This indicator builds upon the traditional ZigZag concept by incorporating adaptive projection capabilities, offering traders a more sophisticated approach to identifying significant price movements and forecasting potential future price levels.
At its core, the indicator utilizes a user-defined period to calculate and display the ZigZag pattern on the chart. This pattern connects significant highs and lows, effectively filtering out minor price fluctuations and highlighting the overall trend structure. Users can customize the appearance of the ZigZag lines, including their color, style (solid, dashed, or dotted), and width, allowing for easy visual integration with other chart elements.
What sets this indicator apart is its adaptive projection feature. By analyzing historical ZigZag patterns, the indicator calculates average lengths and slopes of both bullish and bearish trends. This data is then used to project potential future price movements, adapting to the current market context. The projection lines extend from the most recent ZigZag point, offering traders a visual representation of possible price targets based on historical behavior.
The adaptive nature of the projections is particularly noteworthy. The indicator considers the current trend direction, the length of the most recent ZigZag segment, and compares it to historical averages. This approach allows for more nuanced projections that account for recent market dynamics. If the current trend is stronger than average, the projection will extend further, and vice versa.
From a technical standpoint, the indicator leverages Pine Script v5's capabilities, utilizing arrays for efficient data management and implementing dynamic line drawing for both the ZigZag and projection lines. This ensures smooth performance even when analyzing large datasets.
Traders can fine-tune the indicator to their preferences with several customization options. The ZigZag period can be adjusted from 10 to 100, allowing for sensitivity adjustments to match different trading timeframes. The projection lines can be toggled on or off and their appearance customized, providing flexibility in how the forecast is displayed.
In essence, the "Zig Zag with Adaptive Projection" indicator combines traditional trend analysis with forward-looking projections. It offers traders a tool to not only identify significant price levels but also to anticipate potential future movements based on historical patterns. This blend of retrospective analysis and adaptive forecasting makes it a valuable addition to a trader's technical analysis toolkit, particularly for those interested in trend-following strategies or looking for potential reversal points.
Polygonal Pivot Bands [FXSMARTLAB]The Polygonal Pivot Bands highlights key price pivots, dynamic support and resistance levels, and recent price action on a trading chart. This indicator connects pivot highs and lows with a zigzag line, extends a real-time dashed line to the latest price point, and plots diagonal support/resistance levels that adapt to price movement. These elements together provide traders with a view of significant price zones and potential trend shifts.
Key Components of the Indicator
Pivots are calculated based on user-defined lengths, specifying how many bars on either side of a high or low are required to validate it as a pivot.
Adjustable left and right pivot lengths allow traders to control the sensitivity of pivot detection, with higher values resulting in fewer, more prominent pivots, and lower values increasing sensitivity to price changes.
Zigzag Line
The zigzag line connects consecutive pivot points, filtering out smaller fluctuations and emphasizing the broader direction of price movement.
Users can customize the line's color and thickness to match their preferences, helping them focus on larger trends and potential reversal points.
By linking pivot highs and lows, the zigzag pattern highlights the overall trend and potential points of reversal.
Real-Time Connector Line
A dashed line extends from the last confirmed pivot to the latest price point, providing a real-time, bar-by-bar update of the current price relative to the previous pivot.
This line does not project future price direction but maintains an up-to-date connection with the current price, showing the distance from the last pivot.
Its color and thickness are customizable for improved visibility on the chart.
Dynamic Support and Resistance Levels
The indicator plots dynamic support and resistanc e levels by connecting recent pivot highs and lows, resulting in lines that may appear diagonal rather than strictly horizontal.
These levels move in line with price action, adapting to the natural direction of trends, and offer visual cues where price may encounter support or resistance.
Colors and thickness of these lines can be set individually, allowing traders to adjust visibility according to their preferences.
Enabling these lines gives traders an ongoing reference for critical price boundaries that align more closely with the overall trend.