Hacim Analizli Destek-Direnç Stratejisi (Uyarılı)//@version=5
indicator("Hacim Analizli Destek-Direnç Stratejisi (Uyarılı)", overlay=true)
// Parametreler
var float entryPrice = na
var bool inTrade = false
var float takeProfitLevel = na
var float stopLossLevel = na
// Hacim ve Fiyat Hareketi
volumeThreshold = input.float(100000, title="Hacim Eşiği")
priceChangeThreshold = input.float(2.0, title="Fiyat Değişimi Eşiği (%)")
// Destek ve Direnç Seviyeleri
lookbackPeriod = input.int(14, title="Destek/Direnç Periyodu")
supportLevel = ta.lowest(low, lookbackPeriod)
resistanceLevel = ta.highest(high, lookbackPeriod)
// Destek ve Direnç Çizgilerini Çiz
plot(supportLevel, color=color.green, linewidth=2, title="Destek")
plot(resistanceLevel, color=color.red, linewidth=2, title="Direnç")
// Hacim Analizi
volumeDecreaseThreshold = input.float(0.7, title="Hacim Azalma Eşiği (%)")
volumeDecrease = volume < (volume * volumeDecreaseThreshold)
// Yükseliş Hacmi ve Kırılım Tespiti
volumeIncrease = volume > volumeThreshold
priceBreakout = close > resistanceLevel // Direnç seviyesini kırma
// Giriş Koşulu
if (volumeIncrease and priceBreakout and not inTrade)
entryPrice := close
takeProfitLevel := entryPrice * (1 + priceChangeThreshold / 100)
stopLossLevel := entryPrice * (0.98) // %2 stop loss
inTrade := true
label.new(bar_index, low, text="Giriş", style=label.style_circle, color=color.green, textcolor=color.white)
alert("Giriş Sinyali: " + str.tostring(close), alert.freq_once_per_bar)
// Çıkış Koşulu (Kar Alma veya Stop Loss)
if (inTrade)
if (close >= takeProfitLevel)
inTrade := false
label.new(bar_index, high, text="Kar Al", style=label.style_circle, color=color.blue, textcolor=color.white)
alert("Kar Alma Sinyali: " + str.tostring(close), alert.freq_once_per_bar)
else if (close <= stopLossLevel)
inTrade := false
label.new(bar_index, low, text="Stop Loss", style=label.style_circle, color=color.red, textcolor=color.white)
alert("Stop Loss Sinyali: " + str.tostring(close), alert.freq_once_per_bar)
// Hacim Azalma Uyarısı
if (volumeDecrease)
label.new(bar_index, high, text="Hacim Azalıyor", style=label.style_label_down, color=color.orange, textcolor=color.white)
alert("Hacim Azalıyor: " + str.tostring(close), alert.freq_once_per_bar)
// Grafikte Giriş ve Çıkışları Gösterme
plotshape(series=volumeIncrease and priceBreakout, location=location.belowbar, color=color.green, style=shape.labelup, text="Giriş")
plotshape(series=close >= takeProfitLevel, location=location.abovebar, color=color.blue, style=shape.labeldown, text="Kar Al")
plotshape(series=close <= stopLossLevel, location=location.belowbar, color=color.red, style=shape.labeldown, text="Stop Loss")
// Hacim Grafiği
plot(volume, title="Hacim", color=color.blue, style=plot.style_columns)
Wskaźniki i strategie
School Run Indicatorshows when to buy or sell using TaderToms school run strategy parameters. Enter on next candle
EMA and RSI StrategyUtilizing Openai I’ve created the TradingView Pine Script for the trading bot using the 50 EMA, 20 EMA, and RSI indicators. You can view and edit the code in the canvas. Let me know if you need any modifications!
Ortalama Gerçek Aralık % (Percentage ATR Display with MA)In addition to the average true range indicator, it also calculates percentages.(Ortalama gerçek aralık indikatörüne ilave olarak yüzdelik hesaplama'da yapıyor.)
ChoCh & BOS on XAU/USDsmc ICT MMXT
Explicação do código:
Definição de setores: Aqui, estamos dividindo o gráfico em três setores com base no preço de fechamento, low e high de velas passadas. Podemos modificar esses critérios dependendo do que exatamente o "setor" significa para sua estratégia.
Entradas: A estratégia entra no mercado quando o preço está dentro de cada um dos setores definidos. Usamos a função strategy.entry() para abrir a posição. Cada setor só tem uma entrada por vez.
Saídas (opcional): O código também tem algumas condições de fechamento para ilustrar como você pode encerrar uma posição, como quando o preço atinge certos níveis ou quando ele sai de um setor.
Gerenciamento de Risco:
Stop Loss e Take Profit: Você pode adicionar stop loss ou take profit no código, se necessário. Isso é importante para gerenciar riscos e garantir que a estratégia seja eficiente.
Pso Volume Profile # Volume Profile with Dynamic Support and Resistance
## Overview
This Pine Script indicator for TradingView creates a comprehensive volume profile display with automatic support and resistance levels based on significant volume nodes. The indicator analyzes price action and volume data to identify key levels where trading activity has been concentrated, helping traders identify potential reversal or continuation zones.
## Key Features
### Volume Profile Analysis
- Displays a horizontal volume profile on the right side of the chart
- Divides volume into bid (buying) and ask (selling) components
- Color-codes bid and ask volumes differently for easy identification
- Customizable profile width, opacity, and placement
### Dynamic Support and Resistance Detection
- Automatically identifies significant price levels based on volume concentration
- Uses an adjustable percentile threshold to filter for the most important levels
- Color-codes support/resistance lines based on bid/ask dominance:
- Red lines: Bid-dominant levels (more buying pressure)
- Green lines: Ask-dominant levels (more selling pressure)
- Extends lines across the chart for clear visualization
### Customization Options
- Adjustable lookback period for volume analysis
- Configurable number of price divisions (bars)
- User-selectable volume percentile threshold (50-100%)
- Customizable colors for all elements
- Adjustable line length and position
## How It Works
1. The indicator divides the price range into a specified number of horizontal zones
2. It analyzes historical price and volume data within the lookback period
3. For each price zone, it calculates the total volume and separates bid/ask components
4. It identifies zones with volume exceeding the user-defined percentile threshold
5. It draws color-coded horizontal lines at these significant levels, extending across the chart
6. Lines are colored based on whether buying or selling was dominant at each level
## Usage Guidelines
- Higher percentile values (80-95%) will show fewer, but more significant levels
- Lower values (50-70%) will show more potential support/resistance zones
- Red lines often represent potential support levels (buyer-dominated)
- Green lines often represent potential resistance levels (seller-dominated)
- Areas where multiple lines cluster indicate highly significant zones
## Applications
- Identifying key price levels for entry and exit points
- Recognizing potential reversal zones
- Setting strategic stop-loss and take-profit levels
- Confirming support/resistance levels from other technical analysis methods
- Understanding the volume distribution and market structure
This indicator combines volume profile analysis with automatic support/resistance detection, providing traders with a powerful tool to identify significant price levels based on actual trading activity rather than just price patterns.
MMXT - Smart Money Concept com Range de 5 MinutosO que o código faz:
Zonas de Liquidez: Identifica zonas de liquidez baseadas em níveis de preço específicos no gráfico de 5 minutos.
Gap de Valor Justo: Detecta gaps de preço e verifica se a diferença entre o preço de fechamento e o preço de abertura é maior que o valor definido em gapSize.
Suporte e Resistência: Calcula e plota os níveis de suporte e resistência.
Sinais de Compra/Venda: Gera sinais de compra (verde) e venda (vermelho) quando as condições de Smart Money Concept são atendidas.
Agora o código deve funcionar corretamente no TradingView sem gerar erros.
MACD and RSI Strategy//@version=6
indicator("MACD and RSI Strategy", shorttitle="MACD_RSI", overlay=true)
// Các tham số của MACD
macdFastLength = input.int(12, title="MACD Fast Length")
macdSlowLength = input.int(26, title="MACD Slow Length")
macdSignalSmoothing = input.int(9, title="MACD Signal Length")
// Các tham số của RSI
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
// Tính toán MACD
= ta.macd(close, macdFastLength, macdSlowLength, macdSignalSmoothing)
macdHist = macdLine - signalLine
// Tính toán RSI
rsiValue = ta.rsi(close, rsiLength)
// Điều kiện mua
longCondition = ta.crossover(macdLine, signalLine) and rsiValue < rsiOversold
// Điều kiện bán
shortCondition = ta.crossunder(macdLine, signalLine) and rsiValue > rsiOverbought
// Tín hiệu mua/bán
plotshape(series=longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Vẽ các đường MACD và RSI
plot(macdLine, color=color.blue, title="MACD Line")
plot(signalLine, color=color.orange, title="Signal Line")
hline(0, "Zero Line", color=color.gray)
plot(rsiValue, color=color.purple, title="RSI", style=plot.style_line)
hline(rsiOverbought, "RSI Overbought", color=color.red, linestyle=hline.style_dotted)
hline(rsiOversold, "RSI Oversold", color=color.green, linestyle=hline.style_dotted)
SPX Breakout Strategy [MAP]Here’s a breakdown of the color scheme used in the script:
1. Donchian Levels (Upper and Lower Levels)
Color: color.yellow
Purpose:
The upper and lower levels of the Donchian Channel are plotted as yellow solid lines.
These levels represent the highest high and lowest low over the lookback period.
Example:
Upper Level: 4500 (yellow)
Lower Level: 4400 (yellow)
2. Take-Profit Levels
Buy Take-Profit:
Color: color.green
Purpose:
The take-profit level for a buy position is plotted as a green dashed line.
This level is calculated as upper_level + (2 * risk).
Example: 4600 (green)
Sell Take-Profit:
Color: color.red
Purpose:
The take-profit level for a sell position is plotted as a red dashed line.
This level is calculated as lower_level - (2 * risk).
Example: 4300 (red)
3. Target Levels
Upper Targets:
Color: color.teal
Purpose:
The upper target levels are plotted as teal dashed lines.
These levels are calculated as upper_level + (i * target_distance), where i is the target number (1 to 5).
Example:
Target 1: 4700 (teal)
Target 2: 4800 (teal)
Lower Targets:
Color: color.orange
Purpose:
The lower target levels are plotted as orange dashed lines.
These levels are calculated as lower_level - (i * target_distance), where i is the target number (1 to 5).
Example:
Target 1: 4300 (orange)
Target 2: 4200 (orange)
4. Stop-Loss Levels
Buy Stop-Loss:
Color: color.red
Purpose:
The stop-loss level for a buy position is plotted as a red dashed line.
This level is calculated as upper_level - (atr * stop_loss_distance).
Example: 4450 (red)
Sell Stop-Loss:
Color: color.red
Purpose:
The stop-loss level for a sell position is plotted as a red dashed line.
This level is calculated as lower_level + (atr * stop_loss_distance).
Example: 4350 (red)
5. Entry Labels
Buy Entry:
Color: color.green
Purpose:
A green label is displayed on the chart when a buy condition is met.
The label says "BUY" and is placed at the high of the bar where the breakout occurs.
Example: A green "BUY" label appears on the chart.
Sell Entry:
Color: color.red
Purpose:
A red label is displayed on the chart when a sell condition is met.
The label says "SELL" and is placed at the low of the bar where the breakout occurs.
Example: A red "SELL" label appears on the chart.
6. Text Labels on the Right Side
Color:
The text labels on the right side of the chart use the same colors as the corresponding levels (e.g., yellow for Donchian levels, green for buy take-profit, red for sell take-profit, etc.).
Purpose:
These labels display the price values of the levels (e.g., 4500, 4600, etc.) on the right side of the chart.
They are placed at the corresponding price levels for easy reference.
Highlight Specific Weekdayshis Pine Script highlights Tuesday, Wednesday, and Thursday on your TradingView chart by changing the background color on those days. It uses the built-in dayofweek() function to check the weekday of each bar, then applies a different semi-transparent color for each targeted day.
Strategy SuperTrend SDI WebhookThis Pine Script™ strategy is designed for automated trading in TradingView. It combines the SuperTrend indicator and Smoothed Directional Indicator (SDI) to generate buy and sell signals, with additional risk management features like stop loss, take profit, and trailing stop. The script also includes settings for leverage trading, equity-based position sizing, and webhook integration.
Key Features
1. Date-based Trade Execution
The strategy is active only between the start and end dates set by the user.
times ensures that trades occur only within this predefined time range.
2. Position Sizing and Leverage
Uses leverage trading to adjust position size dynamically based on initial equity.
The user can set leverage (leverage) and percentage of equity (usdprcnt).
The position size is calculated dynamically (initial_capital) based on account performance.
3. Take Profit, Stop Loss, and Trailing Stop
Take Profit (tp): Defines the target profit percentage.
Stop Loss (sl): Defines the maximum allowable loss per trade.
Trailing Stop (tr): Adjusts dynamically based on trade performance to lock in profits.
4. SuperTrend Indicator
SuperTrend (ta.supertrend) is used to determine the market trend.
If the price is above the SuperTrend line, it indicates an uptrend (bullish).
If the price is below the SuperTrend line, it signals a downtrend (bearish).
Plots visual indicators (green/red lines and circles) to show trend changes.
5. Smoothed Directional Indicator (SDI)
SDI helps to identify trend strength and momentum.
It calculates +DI (bullish strength) and -DI (bearish strength).
If +DI is higher than -DI, the market is considered bullish.
If -DI is higher than +DI, the market is considered bearish.
The background color changes based on the SDI signal.
6. Buy & Sell Conditions
Long Entry (Buy) Conditions:
SDI confirms an uptrend (+DI > -DI).
SuperTrend confirms an uptrend (price crosses above the SuperTrend line).
Short Entry (Sell) Conditions:
SDI confirms a downtrend (+DI < -DI).
SuperTrend confirms a downtrend (price crosses below the SuperTrend line).
Optionally, trades can be filtered using crossovers (occrs option).
7. Trade Execution and Exits
Market entries:
Long (strategy.entry("Long")) when conditions match.
Short (strategy.entry("Short")) when bearish conditions are met.
Trade exits:
Uses predefined take profit, stop loss, and trailing stop levels.
Positions are closed if the strategy is out of the valid time range.
Usage
Automated Trading Strategy:
Can be integrated with webhooks for automated execution on supported trading platforms.
Trend-Following Strategy:
Uses SuperTrend & SDI to identify trend direction and strength.
Risk-Managed Leverage Trading:
Supports position sizing, stop losses, and trailing stops.
Backtesting & Optimization:
Can be used for historical performance analysis before deploying live.
Conclusion
This strategy is suitable for traders who want to automate their trading using SuperTrend and SDI indicators. It incorporates risk management tools like stop loss, take profit, and trailing stop, making it adaptable for leverage trading. Traders can customize settings, conduct backtests, and integrate it with webhooks for real-time trade execution. 🚀
Important Note:
This script is provided for educational and template purposes and does not constitute financial advice. Traders and investors should conduct their research and analysis before making any trading decisions.
Step 3: 10 Static Lines//@version=6
indicator("Step 3: 10 Static Lines", overlay=true)
// Manuell definierte Preislevel (Diese kannst du täglich ändern)
line_values = array.new_float()
array.push(line_values, 2805)
array.push(line_values, 2820)
array.push(line_values, 2840)
array.push(line_values, 2860)
array.push(line_values, 2880)
array.push(line_values, 2900)
array.push(line_values, 2920)
array.push(line_values, 2940)
array.push(line_values, 2960)
array.push(line_values, 2980)
// Linien-Array korrekt initialisieren
var myLines = array.new()
// Vorherige Linien löschen und neue zeichnen
for i = 0 to array.size(line_values) - 1
if bar_index > 1
// Falls die Linie existiert, löschen
if array.size(myLines) > i and not na(array.get(myLines, i))
line.delete(array.get(myLines, i))
// Neue Linie erstellen
newLine = line.new(x1 = bar_index - 500, y1 = array.get(line_values, i), x2 = bar_index + 500, y2 = array.get(line_values, i), width = 2, color = color.red, style = line.style_dashed)
// Linie im Array speichern (falls nicht genug Einträge, erweitern)
if array.size(myLines) > i
array.set(myLines, i, newLine)
else
array.push(myLines, newLine)
BIST Hisse Tarama//@version=5
indicator("BIST Hisse Tarama", overlay=true)
// EMA 50 ve EMA 200
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
// RSI
rsi = ta.rsi(close, 14)
// MACD
= ta.macd(close, 12, 26, 9)
// Ichimoku Bulutu Hesaplamaları
tenkan_period = 9
kijun_period = 26
senkou_span_b_period = 52
chikou_shift = 26
tenkan_sen = (ta.highest(high, tenkan_period) + ta.lowest(low, tenkan_period)) / 2
kijun_sen = (ta.highest(high, kijun_period) + ta.lowest(low, kijun_period)) / 2
senkou_span_a = (tenkan_sen + kijun_sen) / 2
senkou_span_b = (ta.highest(high, senkou_span_b_period) + ta.lowest(low, senkou_span_b_period)) / 2
// Alim Sinyali Kosullari
buy_signal = (ema50 > ema200) and (rsi < 30) and (macdLine > signalLine) and (close > senkou_span_a) and (close > senkou_span_b)
// Alim Sinyali Durumunda Ekrana "BUY" Yazisi Ekleme
if (buy_signal)
label.new(bar_index, low, text="BUY", style=label.style_label_up, color=color.green, textcolor=color.white, size=size.small)
// Uyari Olusturma
alertcondition(buy_signal, title="Buy Signal", message="EMA 50 > EMA 200, RSI < 30, MACD > Signal Line, Price > Ichimoku Cloud")
Ivan Gomes StrategyIG Signals+ - Ivan Gomes Strategy
This script is designed for scalping and binary options trading, generating buy and sell signals at the beginning of each candle. Although it is mainly optimized for short-term operations, it can also be used for medium and long-term strategies with appropriate adjustments.
How It Works
• The indicator provides buy or sell signals at the start of the candle, based on a statistical probability of candle patterns, depending on the timeframe.
• It is essential to enter the trade immediately after the signal appears and exit at the end of the same candle.
• If the first operation results in a loss (Loss), the script will send another trade signal at the start of the next candle. However, if the first trade results in a win (Gain), no new signal will be generated.
• The signals follow cycles of 3 candles, regardless of the timeframe. However, if a Doji candle appears, the cycle is interrupted, and no signals will be generated until the next valid cycle starts.
• The strategy consists of up to two trades per cycle: if the first trade is not successful, the second trade serves as an additional attempt to recover.
Key Points to Consider
1. Avoid trading in sideways markets – If price levels do not fluctuate significantly, the accuracy of the signals may decrease.
2. Trade in the direction of the trend – Using Ichimoku clouds or other trend indicators can help confirm trend direction and improve signal reliability. If the market is in an uptrend (bullish trend) and the indicator generates a sell signal, the most prudent decision would be to wait for a buy signal that aligns with the main trend. The same applies to downtrends, where buy signals may be riskier.
These decisions should be based on chart reading and supported by other technical analysis tools, such as support and resistance levels, which indicate zones where price might face obstacles or reverse direction. Additionally, Fibonacci retracement levels can help identify possible pullback points within a trend. Moving averages are also useful for visualizing the general market direction and confirming whether an indicator signal aligns with the overall price structure. Combining these tools can increase trade accuracy and prevent unnecessary trades against the main trend, reducing risks.
3. Works based on probability statistics – The algorithm analyzes candle formations and their statistical probabilities depending on the timeframe to optimize trade entries.
4. Best suited for scalping and binary options – This strategy performs best in 1-minute and 5-minute timeframes, allowing for multiple trades throughout the day.
Technical Details
• The script detects the candle cycle and assigns an index to each candle to identify patterns and possible reversals.
• It recognizes reference candles, stores their colors, and compares them with subsequent candles to determine if a signal should be triggered.
• Doji candle rules are implemented to avoid false signals in indecisive market conditions. When a Doji appears, the script does not generate signals for that cycle.
• The indicator displays visual alerts and notifications, ensuring fast execution of trades.
Disclaimer
The IG Signals+ indicator was created to assist traders who struggle to analyze the market by providing objective trade signals. However, no strategy is foolproof, and this script does not guarantee profits.
Trading involves significant financial risk, and users should test it in a demo account before trading with real money. Proper risk management is crucial for long-term success.
Sirilak Heikin Ashi + RSI Crossover Strategy (Chart)//@version=5
indicator("Sirilak Heikin Ashi + RSI Crossover Strategy (Chart)", overlay=true)
// Heikin Ashi Calculations
var float haClose = na
var float haOpen = na
var float haHigh = na
var float haLow = na
haClose := (open + high + low + close) / 4
haOpen := na(haOpen ) ? (open + close) / 2 : (haOpen + haClose ) / 2
haHigh := math.max(high, math.max(haOpen, haClose))
haLow := math.min(low, math.min(haOpen, haClose))
// Heikin Ashi Color Logic
isGreen = haClose > haOpen // Green candle
isRed = haClose < haOpen // Red candle
// RSI Calculations
rsiLength = input.int(5, title="RSI Length")
rsiSmaLength = input.int(21, title="RSI SMA Length")
rsiValue = ta.rsi(close, rsiLength)
rsiSma = ta.sma(rsiValue, rsiSmaLength)
// RSI Crossover Logic
rsiCrossAbove = ta.crossover(rsiValue, rsiSma) // RSI crosses above its SMA
rsiCrossBelow = ta.crossunder(rsiValue, rsiSma) // RSI crosses below its SMA
// Buy Signal (Entry) - After Candle Close
buySignal = isGreen and rsiCrossAbove and barstate.isconfirmed
// Buy Exit (Close) - After Candle Close
buyExit = isRed and rsiCrossBelow and barstate.isconfirmed
// Sell Signal (Entry) - After Candle Close
sellSignal = isRed and rsiCrossBelow and barstate.isconfirmed
// Sell Exit (Close) - After Candle Close
sellExit = isGreen and rsiCrossAbove and barstate.isconfirmed
// Plot Heikin Ashi Candles on the Main Chart
candleColor = isGreen ? color.green : color.red
plotcandle(haOpen, haHigh, haLow, haClose, color=candleColor)
// Plot Buy Entry Signal (Green Label Below Candle)
plotshape(series=buySignal, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", size=size.small, offset=0)
// Plot Buy Exit Signal (Yellow Label Above Candle)
plotshape(series=buyExit, location=location.abovebar, color=color.yellow, style=shape.labeldown, text="BUY EXIT", size=size.small, offset=0)
// Plot Sell Entry Signal (Red Label Above Candle)
plotshape(series=sellSignal, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", size=size.small, offset=0)
// Plot Sell Exit Signal (Black Label Below Candle)
plotshape(series=sellExit, location=location.belowbar, color=color.black, style=shape.labelup, text="SELL EXIT", size=size.small, offset=0)
// Alerts (Triggered Only After Candle Close)
if (buySignal)
alert("BUY: Heikin Ashi Green + RSI Cross Above SMA", alert.freq_once_per_bar_close)
if (buyExit)
alert("BUY EXIT: Heikin Ashi Red + RSI Cross Below SMA", alert.freq_once_per_bar_close)
if (sellSignal)
alert("SELL: Heikin Ashi Red + RSI Cross Below SMA", alert.freq_once_per_bar_close)
if (sellExit)
alert("SELL EXIT: Heikin Ashi Green + RSI Cross Above SMA", alert.freq_once_per_bar_close)
Supertrend with Trend Change Arrows//@version=6
indicator("Supertrend with Trend Change Arrows", overlay = true, timeframe = "", timeframe_gaps = true)
// Inputs
atrPeriod = input.int(10, "ATR Length", minval = 1)
factor = input.float(3.0, "Factor", minval = 0.01, step = 0.01)
// Calculate Supertrend
= ta.supertrend(factor, atrPeriod)
// Plot Supertrend
upTrend = plot(direction < 0 ? supertrend : na, "Up Trend", color = color.green, style = plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red, style = plot.style_linebr)
// Fill Backgrounds
bodyMiddle = plot((open + close) / 2, "Body Middle", display = display.none)
fill(bodyMiddle, upTrend, title = "Uptrend background", color = color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, title = "Downtrend background", color = color.new(color.red, 90), fillgaps = false)
// Detect Trend Changes
bullishFlip = direction < 0 and direction >= 0 // Trend flipped from bearish to bullish
bearishFlip = direction >= 0 and direction < 0 // Trend flipped from bullish to bearish
// Plot Arrows for Trend Changes
plotshape(bullishFlip, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, text="▲", offset=0)
plotshape(bearishFlip, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, text="▼", offset=0)
// Alert Conditions
alertcondition(bullishFlip, title='Downtrend to Uptrend', message='The Supertrend value switched from Downtrend to Uptrend')
alertcondition(bearishFlip, title='Uptrend to Downtrend', message='The Supertrend value switched from Uptrend to Downtrend')
alertcondition(bullishFlip or bearishFlip, title='Trend Change', message='The Supertrend value switched from Uptrend to Downtrend or vice versa')
Gioteen-Norm** Gioteen-Norm : A Versatile Normalization Indicator**
This indicator applies a normalization technique to closing prices, providing a standardized view of price action that can be helpful for identifying overbought and oversold conditions.
**Key Features: **
* **Normalization:** Transforms closing prices into a z-score by subtracting a moving average and dividing by the standard deviation. This creates a standardized scale where values above zero represent prices above the average, and values below zero represent prices below the average.
* **Customizable Moving Average:** Choose from four different moving average methods (SMA, EMA, WMA, VWMA) and adjust the period to suit your trading style.
* **Visual Clarity:** The indicator displays the normalized values as a red line, making it easy to identify potential turning points.
* **Optional Moving Average:** You can choose to display a moving average of the normalized values as a green dashed line, which can help to filter out noise and identify trends.
**Applications:**
* **Overbought/Oversold Identification:** Look for extreme values in the normalized data to identify potential overbought and oversold conditions.
* **Divergence Analysis:** Compare the price action with the normalized values to spot potential divergences, which can signal trend reversals.
* **Trading System Integration:** This indicator can be integrated into various trading systems as a building block for generating trading signals.
**This indicator was a popular tool on the MT4 platform, and now it's available on TradingView!**
**Contact:**
If you have any questions or feedback, feel free to reach out to me at admin@fxcorner.net .
Colored Super MAI went looking for a script like this one, but I couldn't find one...so I created it.
It's a simple script which allows the user to select different moving average options, then color the moving average depending on if it's rising (green) or falling (red) over a set "lookback". Optionally, the user can easily specify things like line-width. Also, if there is a new close above or below a moving average, the script draws green or red lights above or below the candles (like a traffic light). In addition, I've added an alert condition which allows the user to set an alert if there is a new close above or below a moving average. This way, you can just wait for the alert instead of looking at charts all day long.
Enjoy!
MainFX session indicatorScript Title: MainFX Session Indicator with Customizable Lines
Overview:
This script is designed to help traders visually identify key market sessions on their TradingView charts. It marks both the opening and closing of major sessions (Frankfurt, London, New York, Sydney, and Tokyo) by drawing lines and labels on the chart. The indicator is highly customizable, allowing you to define specific session times, choose your preferred time zone, and adjust the visual appearance of all lines.
Key Features:
Custom Session Times:
Each session’s start and end times are defined by user inputs in a simple HHMM-HHMM format. This means you can adjust the sessions to match the exact market hours you follow, making the indicator flexible for different trading strategies and markets.
Time Zone Flexibility:
The "Chart/Local Time Zone" input lets you override the default time zone of your chart. By setting a specific time zone (e.g., "Africa/Lagos" or "Africa/Accra"), the script calculates session start and end events relative to that zone. This ensures that, regardless of where you are trading from, the session markers accurately reflect the intended market hours and adjust automatically for Daylight Saving Time if applicable.
Open Range Levels (ORH/ORL):
When a session opens or closes, the script draws horizontal lines at the high and low of the candle immediately before the event. These levels act as the Open Range High (ORH) and Open Range Low (ORL) markers. They serve as key reference points for traders to gauge price levels established just before a session change.
Customizable Visuals:
Every visual element is customizable. You can adjust the color, width, and style (defaulting to a dotted line) of both the ORH/ORL lines and the combined session lines that label open and close events. This allows you to tailor the indicator to match your charting style and ensure that the lines stand out clearly.
Session Event Detection:
The script utilizes helper functions to check each bar on the chart. It compares the current bar’s session status with that of the previous bar to determine whether a session has just started or ended. When such a transition is detected, it triggers the drawing of the appropriate lines and labels.
Optimized for Intraday Trading:
Since the script’s functionality is based on minute-level bar changes, it is best used on 1-minute or lower timeframes. This ensures precision in marking the exact moments when sessions transition, which is critical for intraday trading strategies.
How It Works:
Session Timing:
The script calculates the session periods using the time() function with the user-defined session strings and time zone. This makes it independent of the chart’s inherent time settings.
Event Triggering:
When the current bar transitions into or out of a session (i.e., the session status changes between bars), the script detects this change. It then draws horizontal lines at the previous candle’s high and low (marking ORH and ORL) and adds session labels for clarity.
Visual Customization:
Users can easily change the appearance of the drawn lines and session labels via the script’s input options, ensuring that the indicators are both aesthetically pleasing and functionally clear.
Usage:
For Traders:
Use this indicator to keep track of critical market sessions and to spot participants in the session.
Customization:
Adjust session times and the time zone to suit your local market or the specific market you are analyzing.
Visual Clarity:
Customize line styles to ensure that your chart remains clear and that the session markers are easy to interpret even during overlapping sessions.
PA Dynamic Cycle ExplorerPA Dynamic Cycle Explorer
Very powerful tool to abserve when price cycle start or end its show us if price remains to much
time on same place so its may trend change if it was bullish move and price start consolidate
so it means may accour price losing demands and getting weaker in this way bearsh side too
try to understand do your own analysis and practice demo thnx !