swarRSI Calculation
Uses ta.rsi(close, 14) to calculate the Relative Strength Index (RSI).
Buy Condition
A buy signal is triggered when RSI crosses above 60.
Sell Condition
A sell signal is triggered when RSI crosses below 40.
Entry Orders
strategy.entry("Buy", strategy.long) enters a long trade.
strategy.entry("Sell", strategy.short) enters a short trade.
RSI Plot
The RSI line is plotted in blue.
Overbought (60) and Oversold (40) levels are drawn in red and green.
Candlestick analysis
EMA Crossover Signal 20 || 50 VKThe EMA Crossover Signal is a simple yet effective trend-following indicator designed to help traders identify potential buy and sell opportunities based on Exponential Moving Average (EMA) crossovers.
🔹 Features:
✔️ 20 EMA & 50 EMA: Identifies trend direction using fast and slow EMAs.
✔️ 9 EMA: Additional short-term EMA for refined analysis.
✔️ Buy & Sell Signals:
Buy Signal (Green Arrow): When the 20 EMA crosses above the 50 EMA (bullish crossover).
Sell Signal (Red Arrow): When the 20 EMA crosses below the 50 EMA (bearish crossover).
✔️ Dynamic Candle Coloring:
Green Candles on a bullish crossover.
Red Candles on a bearish crossover.
✔️ Customizable Parameters: Adjust EMA lengths as per your trading strategy.
🔹 Perfect for trend traders and swing traders looking for clear, rule-based entry and exit signals.
🔸 How to Use?
Uptrend: Look for a bullish crossover (20 EMA > 50 EMA).
Downtrend: Watch for a bearish crossover (20 EMA < 50 EMA).
Can be used in combination with RSI (commented in the script) for additional confirmation.
🚀 Enhance your trading strategy with this simple yet powerful EMA crossover system!
Signal against the trendThe script tries to capture the top or bottom. It gives a sell signal if a long red candle immediatly follows a long green candle after the stock as risen up atleast 100 points and viceversa
Profit path Moving Average Strategy*Strategy Logic*:
- The strategy.entry() function is used to enter a long position when a buy signal is generated.
- The strategy.close() function is used to close the position when a sell signal is generated
MACD RSI EMA Strategy//@version=5
indicator("MACD RSI EMA Strategy", overlay=true)
// MACD Calculation
= ta.macd(close, 12, 26, 9)
macdCrossUp = ta.crossover(macdLine, signalLine)
macdCrossDown = ta.crossunder(macdLine, signalLine)
// RSI Calculation
rsiValue = ta.rsi(close, 14)
rsiAbove50 = rsiValue > 50
rsiBelow50 = rsiValue < 50
// EMA Calculation
ema9 = ta.ema(close, 9)
priceBelowEma9 = close < ema9
priceAboveEma9 = close > ema9
// Buy and Sell Conditions
buySignal = macdCrossUp and rsiAbove50 and priceAboveEma9
sellSignal = macdCrossDown and rsiBelow50 and priceBelowEma9
// Plot Buy/Sell Signals
plotshape(buySignal, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal")
plotshape(sellSignal, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal")
// Plot EMA
plot(ema9, title="EMA 9", color=color.blue)
Inverted FVG Strategy with Trend Check and Trailing Stops..this is an ai grok script
Explanation:
FVG Detection: This function looks for a Fair Value Gap based on price movements where the current candle's high or low does not overlap with the previous candle's range.
IFVG Detection: After detecting an FVG, we look for price movements that invalidate it (price moving beyond the FVG's high or low), which we define as an IFVG.
4H Power of 3 Strategyokay here is everything. So this is the 4 hour power of 3 strategy with my twist on it. So the first step is it has to be the 10AM candle so right when that opens you can take a trade if it meets the following conditions. So step on is it needs to manipulate to either a 15 minute or 1 hour fair value gap. If it doesn't then don't take a trade. if it goes in a 15 minute fair value gap then you would wait for a reaction on the 2 minute time frame and that could be an inverse fair value gap/ CISD. and it is the same thing for the hourly fair value gap but just on the 5 minute instead of the 2 minute. If it does not reverse off the fair value gaps then don't trade. If it does then enter and put your stop loss on the swing low or high depending if you are selling or buying And take profits at a 2 risk to reward ratio. To help you understand let's say the 10AM candle just opened and it starts to manipulate down to a 15 minute fair value gap. On it's way down to that 15 minute fair value gap it creates a 2 minute bearish fair value gap. once it hits that 15 minute fair value gap you see it start to come back up and it closes above the 2 minute bearish fair value gap so it disrespects it. Then you would enter and put your stop at the nearest swing low and aim for a 2 risk to reward and take your profits.
ICT Balanced Price Range - Double FVG with VolumeThis is an FVG indicator combined with volume to identify moments when a sudden volume spike creates a price gap.
Additionally, I've added the ICT Balanced Price Range, which occurs when two opposing FVGs form a connected gap. This gap has a high probability of reversal and is one of the key signs of liquidity sweeps.
Unlike other FVG indicators that filter FVGs based on ATR, average price, or range, I believe such methods lead to overfitting and may not work across multiple pairs with a single setting. Instead, I only filter FVGs when there are consecutive overlapping FVGs.
The indicator includes full functionality:
Candle color customization
FVG line color customization
FVG fill color customization
BPR color customization
Adjustable average volume and volume threshold
Highlighting candles with abnormal volume
Enjoy and make sure to backtest thoroughly before using!
Timeframe Display Table with CustomizationsPlaces a single cell table in the top right of the chart to display the currently viewed timeframe at all times on the chart.
The Master TrendIndicador que combina momentum y volatilidad. Cuando el histograma verde se expande la tendencia alcista se fortalece, y en rojo ocurre lo contrario, acaba la alcista y empieza la bajista. Histograma y bandas envolventes se combinan en este indicador.
Smart Money Breakout Signals [AlgoAlpha]Apply the indicator to your NASDAQ chart (e.g., NAS100 or NQ futures).
Look for:
BUY/SELL signals.
Take-Profit Level (green line).
Trailing Stop Level (red line).
Consolidation zones (blue background).
Uptrend/Downtrend patterns (labeled on the chart).
beanBean's Multi-Instrument Pattern Scanner.
This indicator scans H1 timeframe for specific technical patterns. Here's how each pattern is detected:
PATTERN DETECTION CRITERIA:
1. Hammer
- Body Size: ≤ 30% of total candle length
- Lower Wick: > 50% of total candle length
- Upper Wick: < 20% of total candle length
- Formula:
* bodySize = |close - open|
* upperWick = high - max(open, close)
* lowerWick = min(open, close) - low
* totalLength = high - low
2. Shooting Star
- Body Size: ≤ 30% of total candle length
- Upper Wick: > 50% of total candle length
- Lower Wick: < 20% of total candle length
- Uses same measurements as Hammer but inverted
3. Outside/Inside (OI)
Checks three consecutive bars:
- Outside Bar: Bar2 high ≥ Bar3 high AND Bar2 low ≤ Bar3 low
- Inside Bar: Bar1 high ≤ Bar2 high AND Bar1 low ≥ Bar2 low
Pattern confirms when both conditions are met
4. Bullish/Bearish Umbrella
Checks two consecutive bars:
Bullish:
- Current bar's high ≤ previous bar's high
- Current body high ≤ previous bar's high
- Current body low ≥ previous body high
Bearish:
- Current bar's low ≥ previous bar's low
- Current body low ≥ previous bar's low
- Current body high ≤ previous body low
5. Three Bar Triangle (3BT)
Checks three consecutive bars:
- Current bar's high ≤ max(previous two highs)
- Current bar's low ≥ min(previous two lows)
- Indicates price compression
DISPLAY AND ALERTS:
- Patterns are displayed in real-time in the table
- Multiple patterns can be detected simultaneously
- Pattern detection resets each new H1 candle
CONFIGURATION:
- Each row can be independently configured
- Patterns are checked on H1 timeframe close
- Alert frequency: Once per H1 bar close
Note: All measurements use standard OHLC values from only completed H1 candles.
Market Shift Strategy//@version=5
strategy("Market Shift Strategy", overlay=true, margin_long=100, margin_short=100)
// Inputs
htfTimeframe = input.timeframe("4H", title="Higher Timeframe")
obLookback = input.int(50, title="Order Block Lookback Period")
// 1. Check HTF Market Structure (Bullish)
htfHigh = request.security(syminfo.tickerid, htfTimeframe, high)
htfLow = request.security(syminfo.tickerid, htfTimeframe, low)
htfBullish = htfHigh < htfHigh and htfHigh < htfHigh and
htfLow < htfLow and htfLow < htfLow
// 2. Find HTF Support (Recent Swing Low)
var float htfSupport = na
htfSwingLow = ta.pivotlow(htfLow, 2, 2)
if not na(htfSwingLow)
htfSupport := htfSwingLow
// 3. Detect Order Blocks on LTF
var float obHighs = array.new_float()
var float obLows = array.new_float()
detectOB() =>
bearishCandle = close < open
bullishBreak = close > high
nearSupport = math.abs(low - htfSupport) <= htfSupport * 0.005
if bearishCandle and bullishBreak and nearSupport and htfBullish
array.unshift(obHighs, high )
array.unshift(obLows, low )
// Keep only recent OBs
if array.size(obHighs) > obLookback
array.pop(obHighs)
array.pop(obLows)
detectOB()
// 4. Entry Conditions
var bool entrySignal = false
var float entryPrice = na
var float stopLoss = na
var float takeProfit = na
for i = 0 to array.size(obHighs)-1
obH = array.get(obHighs, i)
obL = array.get(obLows, i)
// Check price return to OB zone
if low <= obH and high >= obL and not entrySignal
entrySignal := true
entryPrice := obL
stopLoss := obL - (obL * 0.001)
takeProfit := htfHigh
break
// 5. Execute Strategy
if entrySignal
strategy.entry("Long", strategy.long)
strategy.exit("Exit", "Long", stop=stopLoss, limit=takeProfit)
entrySignal := false
// Plotting
plotshape(entrySignal, style=shape.triangleup, color=color.green, location=location.belowbar)
plot(stopLoss, "Stop Loss", color=color.red, linewidth=2)
plot(takeProfit, "Take Profit", color=color.green, linewidth=2)
Higher Time Frame Fair Value Gap [ZeroHeroTrading]A fair value gap (FVG) highlights an imbalance area between market participants, and has become popular for technical analysis among price action traders.
A bullish (respectively bearish) fair value gap appears in a triple-candle pattern when there is a large candle whose previous candle’s high (respectively low) and subsequent candle’s low (respectively high) do not fully overlap the large candle. The space between these wicks is known as the fair value gap.
The following script aims at identifying higher timeframe FVG's within a lower timeframe chart. As such, it offers a unique perspective on the formation of FVG's by combining the multiple timeframe data points in the same context.
You can change the indicator settings as you see fit to achieve the best results for your use case.
Features
It draws higher timeframe bullish and bearish FVG's on the chart.
For bullish (respectively bearish) higher timeframe FVG's, it adds the buying (respectively selling) pressure as a percentage ratio of the up (respectively down) volume of the second higher timeframe bar out of the total up (respectively down) volume of the first two higher timeframe bars.
It adds a right extended trendline from the most recent lowest low (respectively highest high) to the top (respectively bottom) of the higher timeframe bullish (respectively bearish) FVG.
It detects and displays higher timeframe FVG's as early as one starts forming.
It detects and displays lower timeframe (i.e. chart's timeframe) FVG's upon confirmation.
It allows for skipping inside first bars when evaluating FVG's.
It allows for dismissing higher timeframe FVG's if there is no update for any period of the chart's timeframe. For instance, this can occur at lower timeframes during low trading activity periods such as extended hours.
Settings
Higher Time Frame FVG dropdown: Selects the higher timeframe to run the FVG detection on. Default is 15 minutes. It must be higher than, and a multiple of, the chart's timeframe.
Higher Time Frame FVG color select: Selects the color of the text to display for higher timeframe FVG's. Default is black.
Show Trend Line checkbox: Turns on/off trendline display. Default is on.
Show Lower Time Frame FVG checkbox: Turns on/off lower timeframe (i.e. chart's timeframe) FVG detection. Default is on.
Show Lower Time Frame FVG color select: Selects the color of the border for lower timeframe (i.e. chart's timeframe) FVG's. Default is white.
Include Inside Bars checkbox: Turns on/off the inclusion of inside first bars when evaluating FVG's. Default is on.
With Consistent Updates checkbox: Turns on/off consistent updates requirement. Default is on.
Heikin-Ashi Buy Signal on uptrending RSI.Heikin-Ashi Buy Signal on uptrending RSI, no signals on RSI below 50 and above 70
Timeframe automatically adjusted EMAs and SMAs
@SweetFanyFXproDescripción del Indicador Personalizado
Rango Asiático: Este indicador marca el rango del mercado asiático en el gráfico, lo que puede ser útil para identificar niveles de soporte y resistencia creados durante la sesión asiática.
PDL (Previous Day Low): Muestra el nivel más bajo del día anterior.
PDH (Previous Day High): Indica el nivel más alto del día anterior.
PWL (Previous Week Low): Muestra el nivel más bajo de la semana anterior.
PWH (Previous Week High): Indica el nivel más alto de la semana anterior.
Fecha y Gráfico: Coloca la fecha y el gráfico en la posición deseada dentro del gráfico de trading. Esto es útil para mantener un contexto visual claro mientras se analizan los movimientos del mercado.
Franja Horaria: Permite cambiar la franja horaria de tres rangos adicionales, como el rango de Londres y el de Nueva York, para adaptarse a diferentes sesiones de mercado y estrategias de trading.
Este tipo de indicador es valioso porque permite a los traders visualizar niveles clave de precios y franjas horarias directamente en sus gráficos, lo que facilita la toma de decisiones informadas. Además, al poder cambiar las franjas horarias, puedes adaptarlo a diferentes sesiones de trading y obtener una perspectiva más completa del comportamiento del mercado.
Si necesitas ayuda adicional con este indicador o quieres agregarle alguna funcionalidad extra, estaré encantado de asistirte. ¡Buena suerte con tus operaciones! 🚀📈
Custom Indicator Description
Asian Range: This indicator marks the range of the Asian market on the chart, which can be helpful for identifying support and resistance levels created during the Asian session.
PDL (Previous Day Low): Displays the lowest level from the previous day.
PDH (Previous Day High): Indicates the highest level from the previous day.
PWL (Previous Week Low): Shows the lowest level from the previous week.
PWH (Previous Week High): Indicates the highest level from the previous week.
Date and Chart: Places the date and chart at the desired position within the trading chart. This is useful for maintaining a clear visual context while analyzing market movements.
Time Zone: Allows you to change the time zone for three additional ranges, such as the London and New York ranges, to adapt to different market sessions and trading strategies.
This type of indicator is valuable because it allows traders to visualize key price levels and time zones directly on their charts, making it easier to make informed decisions. Additionally, being able to change the time zones allows you to adapt to different trading sessions and get a more comprehensive view of market behavior.
If you need further assistance with this indicator or want to add any extra functionality, I'm here to help. Happy trading! 🚀📈
Candle Above or Below 21 EMA (BLACKJACK)
This indicator shows a bar color change to red or green after the first candle closes fully above or fully below the 21 EMA and white when the candle is in between or touching the 21 EMA. Trends tend to ride the 21 EMA, also known as the 21 Club.
How to use: (You must turn off your bar, wick and border colors on the chart symbol settings for the candle colors on this indicator to work. You can change all of these colors within the indicator)
This indicator should be used as your final confirmation to enter or exit a trade and I would not use it on it's own. All other confluences with other indicators should happen before this final confirmation. Wait for a bullish or bearish engulfing candle to print after color change to red or green, or after alert to confirm. I use this indicator with Trendilo, STOCH RSI MTF, and ADX trendlines with chart and higher time frames with good results but let me know in the comments of anything else that works well.
You can set alerts for when the first candle prints fully above or below the 21 EMA. (BULL 21 BLACKJACK and BEAR 21 BLACKJACK).
I've also added 3 other EMAs that you can change the lengths and colors for so you don't have to use a separate EMA indicator.
Hope you enjoy!
Candle Bias ForecastCandle Bias Forecast Indicator
Description:
The Candle Bias Forecast Indicator is an original multi‐timeframe analysis tool that generates price forecast levels based on the difference between candle biases on two different timeframes. It uses innovative calculations to provide potential forecast levels that align with current price action.
How It Works:
1. Candle Bias Calculation:
For each candle, the indicator computes a “candle bias” using the formula:
candleBias = (((open + close)/2 - (high + low)/2) + ((close - open)/(high - low)))/2
This measure captures both the positioning of the candle’s body within its range and the normalized move from open to close.
2. Multi-Timeframe Analysis:
The script uses multiple timeframe pairs (e.g., 5-minute vs. 30-minute, 10-minute vs. 60-minute, etc.). For each pair, the bias is computed on the lower timeframe and on the higher timeframe.
3. Normalization with ATR:
To translate the dimensionless bias difference into price terms, the indicator multiplies the difference by the lower timeframe’s Average True Range (ATR). This scales the forecast adjustment to current market volatility.
4. Forecast Computation:
The forecast level for each pair is then calculated as:
forecast = close + (lowerTF_ATR * (lowerTF_bias - higherTF_bias))
This yields forecast levels that are plotted on the chart and connected by lines for a visual guide.
How to Use:
- Visual Confirmation: Add the indicator to your 1 to 15 minute chart to see forecast levels overlaid on the price.
- Supplementary Analysis: Use these forecast levels as an additional tool alongside your other analysis methods. They can help indicate potential support/resistance areas or directional bias.
Important Notes:
- Not a Standalone Signal: This indicator is intended to supplement your analysis. Always combine it with other tools and sound risk management practices.
- For Educational & Research Use: The indicator is provided “as is” without any guarantee of performance. It is designed to illustrate an innovative approach to multi-timeframe analysis.
- Disclaimer: Past performance is not indicative of future results. Use this tool at your own risk.
By combining candle bias with ATR-based normalization and multi-timeframe analysis, this indicator offers a unique perspective on market dynamics that can enrich your trading strategy.
---
*This is an original script designed to add value to the TradingView community. Please test and validate its outputs thoroughly before using it in live trading.*
Multi-Timeframe Open LinesThe Multi-Timeframe Open Lines indicator is designed to help traders visualize key price levels at the open of specific time intervals. It draws horizontal lines at the open of 5-minute, 15-minute, 30-minute, and hourly candles, extending these lines to the start of the next respective interval. Traders can now control which timeframes are displayed and how many past opening lines are shown, ensuring a clean and organized chart.
Key Features:
Customizable Lines:
5-Minute Lines: Highlight the open of every 5-minute candle, ending at the start of the next 5-minute candle.
15-Minute Lines: Highlight the open of every 15-minute candle, ending at the start of the next 15-minute candle.
30-Minute Lines: Highlight the open of every 30-minute candle, ending at the start of the next 30-minute candle.
Hourly Lines: Highlight the open of every hourly candle, ending at the start of the next hourly candle.
Each timeframe's lines can be customized in terms of color, line style, and thickness.
Toggle Options:
Easily turn on or off the display of lines for each timeframe (5m, 15m, 30m, 1h) using checkboxes in the settings.
User-Defined Limits:
Control the number of past opening lines displayed for each timeframe (5m, 15m, 30m, 1h).
Prevents chart clutter by limiting the number of visible lines.
Multi-Timeframe Analysis:
Enables traders to analyze price action across multiple timeframes simultaneously, providing a clearer picture of market structure and key levels.
User-Friendly Inputs:
Easy-to-use settings for customizing line appearance and behavior, ensuring the indicator fits seamlessly into any trading strategy.
How to Use:
Apply the indicator to your chart to visualize the open price levels for 5-minute, 15-minute, 30-minute, and hourly candles.
Use the lines as dynamic support/resistance levels or to identify potential breakout/breakdown points.
Customize the colors, styles, and the number of visible lines to match your chart theme or trading preferences.
Toggle specific timeframes on or off to focus on the most relevant price levels.
Ideal For:
Traders who use multi-timeframe analysis.
Those who rely on key price levels for decision-making.
Anyone looking to enhance their chart with clear, customizable reference lines while avoiding clutter.
9/11/45 EMA Buy Sell SignalThe High Accuracy EMA Strategy is a real-time indicator that uses a 9 EMA, 11 EMA, and 45 EMA crossover system to generate high-probability buy and sell signals. The script ensures minimal lag and provides clear visual labels for entries and exits. It includes alerts for instant notifications and is ideal for crypto and forex traders looking for trend-based confirmation.
ATR & CCIThe **ATR % & 14-Day CCI Indicator** displays the **ATR as a percentage** of the closing price and a **14-day CCI** to identify overbought/oversold conditions. ATR % is shown as a number, while CCI highlights momentum shifts.