Last 4-Hour High and Low//@version=5
indicator("Last 4-Hour High and Low", overlay=true)
// Get the high and low values for the last 4 hours (240 minutes)
high_4h = request.security(syminfo.tickerid, "240", high)
low_4h = request.security(syminfo.tickerid, "240", low)
// Plot the high and low values for the last 4 hours
plot(high_4h, color=color.green, linewidth=2, title="Last 4-Hour High")
plot(low_4h, color=color.red, linewidth=2, title="Last 4-Hour Low")
Indicators and strategies
BAML Strategy (SPXL) - testbacktest of strategy based on BAML credit spread
330d ema
180 days horizon to define local top/highs
all major parameters could be adjusted
NOT finalized and polish - could contain some errors
RM EMA/SMA Crossover IndicatorOffers a simple indicator above the relevant candle when your chosen EMAs or SMAs cross.
LibraryDivergenceV6LibraryDivergenceV6
Enhance your trading strategies with LibraryDivergenceV6, a comprehensive Pine Script library designed to simplify and optimize the detection of bullish and bearish divergences across multiple technical indicators. Whether you're developing your own indicators or seeking to incorporate robust divergence analysis into your trading systems, this library provides the essential tools and functions to accurately identify potential market reversals and continuations.
Overview
LibraryDivergenceV6 offers a suite of functions that detect divergences between price movements and key technical indicators such as the Relative Strength Index (RSI) and On-Balance Volume (OBV). By automating the complex calculations involved in divergence detection, this library enables traders and developers to implement reliable and customizable divergence strategies with ease.
Key Features
Comprehensive Divergence Detection
Bullish Divergence: Identifies instances where the indicator forms higher lows while the price forms lower lows, signaling potential upward reversals.
Bearish Divergence: Detects situations where the indicator creates lower highs while the price forms higher highs, indicating possible downward reversals.
Overbought and Oversold Conditions: Differentiates between standard and strong divergences by considering overbought and oversold levels, enhancing signal reliability.
Multi-Indicator Support
RSI (Relative Strength Index): Analyze momentum-based divergences to spot potential trend reversals.
OBV (On-Balance Volume): Incorporate volume flow into divergence analysis for a more comprehensive market perspective.
Customizable Parameters
Pivot Points Configuration: Adjust the number of bars to the left and right for pivot detection, allowing fine-tuning based on different timeframes and trading styles.
Range Settings: Define minimum and maximum bar ranges to control the sensitivity of divergence detection, reducing false signals.
Noise Cancellation: Enable or disable noise filtering to focus on significant divergences and minimize minor fluctuations.
Flexible Usage
Exported Functions: Easily integrate divergence detection into your custom indicators or trading strategies with exported functions such as DivergenceBull, DivergenceBear, DivergenceBullOversold, and DivergenceBearOverbought.
Occurrence Handling: Specify which occurrence of a divergence to consider (e.g., most recent, previous) for precise analysis.
Optimized Performance
Efficient Calculations: Designed to handle multiple occurrences and pivot points without compromising script performance.
Line Management: Automatically creates and deletes trend lines based on divergence conditions, ensuring a clean and uncluttered chart display.
Candle Prediction//@version=5
indicator("Candle Prediction", overlay=true)
// تنظیمات اندیکاتورها
lengthRSI = input(14, title="RSI Length")
lengthEMA = input(9, title="EMA Length")
// محاسبه اندیکاتورها
rsi = ta.rsi(close, lengthRSI)
ema = ta.ema(close, lengthEMA)
// شرایط پیشبینی کندل بعدی
bullishSignal = close > ema and rsi < 30
bearishSignal = close < ema and rsi > 70
// رسم سیگنالها روی چارت
plotshape(bullishSignal, style=shape.labelup, location=location.belowbar, color=color.green, size=size.small, title="Bullish Signal", text="Bullish")
plotshape(bearishSignal, style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small, title="Bearish Signal", text="Bearish")
Buy/Sell Signals with Multi-Indicator Trend ConfirmationTrend-Filtered Buy/Sell Signals with Multiple Indicators
This strategy combines multiple technical indicators to generate buy and sell signals, while also filtering the signals based on the prevailing market trend. The core idea is to provide more reliable trading signals by confirming them with trend direction and using several popular indicators.
Key Components:
MACD (Moving Average Convergence Divergence):
Purpose: The MACD is used to detect changes in momentum. When the MACD line crosses above the signal line, it is a bullish signal (buy). Conversely, when the MACD line crosses below the signal line, it is a bearish signal (sell).
RSI (Relative Strength Index):
Purpose: The RSI helps identify whether a market is overbought or oversold. An RSI below 30 suggests an oversold condition (potential buy), and an RSI above 70 suggests an overbought condition (potential sell).
Stochastic Oscillator:
Purpose: The stochastic oscillator is another momentum indicator that compares the closing price to its price range over a specified period. It generates signals when the %K line crosses above or below the %D line. A reading above 80 suggests overbought conditions, while a reading below 20 suggests oversold conditions.
SMA (Simple Moving Average):
Purpose: The SMA is used to determine the general market trend. If the price is above the SMA, the market is considered to be in an uptrend (bullish), and if the price is below the SMA, the market is in a downtrend (bearish). The SMA acts as a filter for the signals — buy signals are only considered valid when the price is above the SMA (bullish trend), and sell signals are considered only when the price is below the SMA (bearish trend).
How It Works:
Buy Signal:
The strategy generates a buy signal when:
The MACD line crosses above the signal line (bullish crossover).
The RSI is below 70, indicating the market is not overbought.
The stochastic %K line is below 70, suggesting there is still room for upward movement.
The price is above the SMA, confirming the market is in an uptrend (when trend filtering is enabled).
Sell Signal:
The strategy generates a sell signal when:
The MACD line crosses below the signal line (bearish crossover).
The RSI is above 30, indicating the market is not oversold.
The stochastic %K line is above 30, suggesting there is still room for downward movement.
The price is below the SMA, confirming the market is in a downtrend (when trend filtering is enabled).
Trend Filtering (Optional):
An optional feature of the strategy is the trend filter, which ensures that buy signals only appear when the market is in an uptrend (price above the SMA) and sell signals only appear when the market is in a downtrend (price below the SMA). This filter can be toggled on or off based on user preference.
Stop Loss:
The strategy includes a stop-loss feature where the user can define a percentage to determine where to exit the trade if the market moves against the position. This is designed to limit losses if the market moves in the opposite direction.
Benefits of This Strategy:
Reduced False Signals: By combining multiple indicators, the strategy filters out false signals, especially during sideways market conditions.
Trend Confirmation: The trend filter ensures that trades align with the overall market trend, improving the probability of success.
Customizable: Users can adjust parameters such as the length of indicators, stop-loss percentage, and trend filter settings according to their trading preferences.
Conclusion:
This strategy is suitable for traders looking for a robust approach to generate buy and sell signals based on a combination of momentum and trend indicators. The trend filter adds an extra layer of confirmation, making the strategy more reliable and reducing the chances of entering trades against the market direction.
Open = Low Buy Signalits a bullish signal. When open price and low price is same at the opening then there is sign to go up for that stock.
A.C Signals & OverlaysA.C Signals & Overlays Indicator
Beschreibung
Der A.C Signals & Overlays Indikator ist ein vielseitiges Trading-Tool, das verschiedene Signale und Overlays auf dem Chart anzeigt, um Tradern dabei zu helfen, Trends und potenzielle Umkehrpunkte zu identifizieren. Das Skript bietet Funktionen wie Kerzenfärbung, Reversal Zones, gleitende Durchschnitte und eine Trendlinie, die die allgemeine Marktrichtung anzeigt.
Funktionen
Kerzenfärbung:
Färbt die Kerzen basierend auf ihrer Position relativ zu einem gleitenden Durchschnitt (SMA).
Grün: Der Schlusskurs liegt über dem SMA.
Rot: Der Schlusskurs liegt unter dem SMA.
Lila: Der Schlusskurs liegt nahe dem SMA.
Reversal Zones:
Zeigt potenzielle Umkehrzonen basierend auf einem gleitenden Durchschnitt mit einer längeren Periode.
Diese Zonen können als Unterstützungs- und Widerstandsniveaus dienen.
Gleitender Durchschnitt (SMA):
Zeigt einen einfachen gleitenden Durchschnitt, der die allgemeine Marktrichtung anzeigt.
Die Länge des gleitenden Durchschnitts kann angepasst werden.
Trendlinie:
Berechnet eine Trendlinie basierend auf den letzten 100 Balken.
Die Farbe der Trendlinie ändert sich basierend auf der Trendrichtung (grün für bullisch, rot für bärisch).
Dashboard:
Zeigt die aktuelle Trendrichtung in einem Kästchen an.
Die Schriftgröße und die Größe des Kästchens können angepasst werden.
Alarme:
Erstellt eine Alarmbedingung, wenn der Preis die Signallinie kreuzt.
Eingabeparameter
Show Candle Coloring: Schaltet die Kerzenfärbung ein oder aus.
Show Reversal Zones: Schaltet die Anzeige der Reversal Zones ein oder aus.
Sensitivity: Legt die Empfindlichkeit der Signale fest.
Moving Average Length: Legt die Länge des gleitenden Durchschnitts fest.
Font Size: Wählt die Schriftgröße für das Dashboard (Optionen: "tiny", "small", "normal", "large", "huge").
Box Width: Legt die Breite des Kästchens im Dashboard fest.
Box Height: Legt die Höhe des Kästchens im Dashboard fest.
Verwendung
Kerzenfärbung:
Aktivieren Sie die Kerzenfärbung, um visuelle Hinweise auf die Marktrichtung zu erhalten.
Reversal Zones:
Aktivieren Sie die Reversal Zones, um potenzielle Umkehrpunkte zu identifizieren.
Gleitender Durchschnitt:
Passen Sie die Länge des gleitenden Durchschnitts an, um die Empfindlichkeit der Trendanzeige zu steuern.
Trendlinie:
Verwenden Sie die Trendlinie, um die allgemeine Marktrichtung zu visualisieren.
Dashboard:
Passen Sie die Schriftgröße und die Größe des Kästchens an, um die Trendrichtung klar und deutlich anzuzeigen.
Alarme:
Nutzen Sie die Alarmbedingung, um benachrichtigt zu werden, wenn der Preis die Signallinie kreuzt.
A.C Signals & OverlaysA.C Signals & Overlays Indicator
Beschreibung
Der A.C Signals & Overlays Indikator ist ein vielseitiges Trading-Tool, das verschiedene Signale und Overlays auf dem Chart anzeigt, um Tradern dabei zu helfen, Trends und potenzielle Umkehrpunkte zu identifizieren. Das Skript bietet Funktionen wie Kerzenfärbung, Reversal Zones, gleitende Durchschnitte und eine Trendlinie, die die allgemeine Marktrichtung anzeigt.
Funktionen
Kerzenfärbung:
Färbt die Kerzen basierend auf ihrer Position relativ zu einem gleitenden Durchschnitt (SMA).
Grün: Der Schlusskurs liegt über dem SMA.
Rot: Der Schlusskurs liegt unter dem SMA.
Lila: Der Schlusskurs liegt nahe dem SMA.
Reversal Zones:
Zeigt potenzielle Umkehrzonen basierend auf einem gleitenden Durchschnitt mit einer längeren Periode.
Diese Zonen können als Unterstützungs- und Widerstandsniveaus dienen.
Gleitender Durchschnitt (SMA):
Zeigt einen einfachen gleitenden Durchschnitt, der die allgemeine Marktrichtung anzeigt.
Die Länge des gleitenden Durchschnitts kann angepasst werden.
Trendlinie:
Berechnet eine Trendlinie basierend auf den letzten 100 Balken.
Die Farbe der Trendlinie ändert sich basierend auf der Trendrichtung (grün für bullisch, rot für bärisch).
Dashboard:
Zeigt die aktuelle Trendrichtung in einem Kästchen an.
Die Schriftgröße und die Größe des Kästchens können angepasst werden.
Alarme:
Erstellt eine Alarmbedingung, wenn der Preis die Signallinie kreuzt.
Eingabeparameter
Show Candle Coloring: Schaltet die Kerzenfärbung ein oder aus.
Show Reversal Zones: Schaltet die Anzeige der Reversal Zones ein oder aus.
Sensitivity: Legt die Empfindlichkeit der Signale fest.
Moving Average Length: Legt die Länge des gleitenden Durchschnitts fest.
Font Size: Wählt die Schriftgröße für das Dashboard (Optionen: "tiny", "small", "normal", "large", "huge").
Box Width: Legt die Breite des Kästchens im Dashboard fest.
Box Height: Legt die Höhe des Kästchens im Dashboard fest.
Verwendung
Kerzenfärbung:
Aktivieren Sie die Kerzenfärbung, um visuelle Hinweise auf die Marktrichtung zu erhalten.
Reversal Zones:
Aktivieren Sie die Reversal Zones, um potenzielle Umkehrpunkte zu identifizieren.
Gleitender Durchschnitt:
Passen Sie die Länge des gleitenden Durchschnitts an, um die Empfindlichkeit der Trendanzeige zu steuern.
Trendlinie:
Verwenden Sie die Trendlinie, um die allgemeine Marktrichtung zu visualisieren.
Dashboard:
Passen Sie die Schriftgröße und die Größe des Kästchens an, um die Trendrichtung klar und deutlich anzuzeigen.
Alarme:
Nutzen Sie die Alarmbedingung, um benachrichtigt zu werden, wenn der Preis die Signallinie kreuzt.
OHLC MeansNote: This indicator works only on daily timeframes.
The indicator calculates the OHLC averages for days corresponding to the day of the last displayed candlestick. For instance, if the last candlestick displayed is Monday, it calculates the OHLC average for all Mondays; if Tuesday, it does the same for all Tuesdays.
Customizable period: The indicator allows you to select the number of candlesticks to analyze, with a default value of 1000. This means it will consider the last 1000 candlesticks before the final displayed one. Assuming there are only five trading days per week, this corresponds to about 200 days. (not true for cryptos, you need to devide by 7)
Example scenario:
Today is Tuesday and we analyse NQ
By default, the indicator analyzes the last 1000 candlesticks (modifiable parameter).
Since there are five trading days in a week,
1000 ÷ 5 = 200
The indicator calculates the OHLC averages for the last 200 Tuesdays, corresponding to the past seven years. Of course it is not exactly 200 becauses the may be one tuesday where the market is closed (if christmas is on tuesday for instance)
Output:
Displays four daily averages as four lines with their levels as labels :
High and Low averages are displayed at the extremes.
Open and Close averages are displayed at the center.
Color coding:
Red indicates bearish movement.
Green indicates bullish movement.
Usage recommendations:
Best suited for assets with a significant historical dataset.
Only functional on daily timeframes.
Dominan Break Detector barathis dominan break
Dominan Candle Stick
-Dominan CS merupakan pengantara CS samada untuk meneruskan trend atau membuat reversal
-Ianya merupakan penentu untuk retracement didalam trend
-Dominan CS juga amat berkait rapat dengan hidden engulfing
Zona Horaria MaxMinEste script marca la zona horaria en la cual se deben de marcar los maximos y minimos del dia anterior
Dashed DMI by Cryptos RocketThe Directional Movement Index (DMI) is a well-known indicator in technical analysis, created by J. Welles Wilder. It is designed to identify the strength of a trend in a given market, providing traders with insights into both the direction and momentum of price movements. This script is a custom implementation of the DMI that plots the ADX (Average Directional Index), +DI (Positive Directional Indicator), and -DI (Negative Directional Indicator).
Dashed DMI Key Features:
1. Directional Movement Indicators:
- The ADX line, shown in orange, helps determine the strength of the trend without indicating its direction. Values above 25 suggest a strong trend, while values below 20 indicate a weak trend.
- The +DI line, shown in green, measures the strength of upward movement in the price. It identifies if the market is experiencing a strong uptrend.
- The -DI line, shown in red, measures the strength of downward price movement. It signals when there is a strong downtrend.
2. Customizable Dashed Line:
- The script includes a customizable dashed line, which represents a critical level on the chart that traders can use as a reference. The dashed line is adjustable through the script’s settings, allowing the trader to set a desired level, color, style, and thickness. The default level is set to 30, a common threshold in trend-following systems, but users can change it according to their preferences.
- The dashed line’s transparency and visibility can be toggled using the input settings, making it adaptable to different trading strategies or visual preferences.
3. Alerts:
- The script provides customizable alert conditions based on the relationship between the ADX, +DI, and -DI lines with the dashed line. These alerts include:
- When ADX crosses above or below the dashed line, signaling a shift in trend strength.
- When +DI or -DI cross the dashed line, indicating a change in the trend's directionality (bullish or bearish).
- Alerts for crossovers (when one line crosses another) and crossunders (when one line falls below another), which provide key entry or exit signals for traders.
4. Customizable Visual Parameters:
- The script is designed with flexibility in mind. The user can modify the line styles, thickness, and colors. The ADX is plotted in orange with a thickness of 2, the +DI is plotted in green, and the -DI is plotted in red. These lines’ thicknesses can be customized, ensuring that they remain visible regardless of the timeframe or chart zoom level.
- The script also provides options to adjust the dashed line’s color and style (solid, dotted, or dashed), enabling a fully customized charting experience that suits individual preferences.
Understanding the Components of the DMI
1. ADX (Average Directional Index):
The ADX is a smoothed version of the difference between the +DI and -DI lines, used to measure the strength of a trend. It does not provide any directional indication but simply quantifies whether the trend is strong or weak.
- Strength Indicators: A rising ADX indicates a strengthening trend, while a falling ADX signals weakening trend strength. Traders often consider an ADX reading above 25 as an indication of a strong trend, either up or down, and readings below 20 as suggesting a lack of trend or a sideways market.
- The ADX is plotted in the script using an orange color, making it easy for traders to distinguish it from the directional lines.
2. +DI (Positive Directional Indicator):
The +DI line measures the strength of upward price movement. It rises when the market’s upward movement is stronger than its downward movement.
- A rising +DI is a signal that the market is moving in a bullish direction. When +DI crosses above the -DI, it can indicate the start of an uptrend.
- The +DI is plotted in green, representing bullish momentum.
3. -DI (Negative Directional Indicator):
The -DI line tracks the strength of downward price movement. It rises when the market’s downward movement is stronger than its upward movement.
- A rising -DI suggests bearish momentum, and when the -DI crosses above the +DI, it can signal the beginning of a downtrend.
- The -DI is plotted in red, symbolizing bearish momentum.
Customizable Inputs and Settings
This DMI script allows traders to adjust several parameters based on their preferences:
- ADX Smoothing (lensig): This setting controls the smoothing of the ADX line, with values ranging from 1 to 50. A larger smoothing value can help reduce noise in the ADX and make trends clearer, while a smaller value reacts more quickly to price changes.
- DI Length (len): This input controls the period used for calculating the +DI and -DI lines. A shorter period results in a more sensitive indicator, whereas a longer period produces smoother, more stable signals.
- Dashed Line Settings: Traders can choose to show or hide the dashed line and can adjust its level, color, thickness, and style. This customization allows traders to adapt the indicator to their specific strategies and charting preferences.
Alerts and Signals
With the alert conditions set up in the script, traders can receive notifications when critical events occur, such as:
- ADX Crossing Above/Below the Dashed Line: This is typically a signal of an emerging trend.
- +DI and -DI Crossovers and Crossunders: These are valuable signals for identifying potential entry and exit points in trending markets.
Conclusion
This custom DMI Pine Script provides traders with a powerful tool to analyze market trends in real-time. By visualizing the ADX, +DI, and -DI indicators with customizable inputs, this script enables traders to gauge the strength and direction of a trend and make informed decisions about their trading strategies. The ability to set alerts based on specific conditions adds another layer of automation, ensuring that traders never miss an important signal. The script’s flexibility allows it to be adapted for various trading styles and market conditions, making it an invaluable addition to any trader’s toolkit.
BOS with Order Flow, EMA Trend Filter, and High Win Ratecreated hans hoolash to improve on HTF used chat gpt
Ahtep 11
Here’s a brief description for your indicator:
Custom FCPO Indicator with Buy/Sell Signals
This custom indicator combines multiple technical analysis tools to generate buy and sell signals for FCPO trading. It uses two exponential moving averages (EMA) to identify market trends, Stochastic RSI for momentum analysis, and volume thresholds to filter signals. When the short EMA crosses above the long EMA with oversold conditions on the Stochastic RSI and high volume, a buy signal is triggered. Conversely, a sell signal is generated when the short EMA crosses below the long EMA with overbought conditions on the Stochastic RSI and high volume. The indicator also provides entry, stop loss, and target levels based on the market conditions.
Feel free to modify or expand this description based on your needs! Let me know if you'd like to make any adjustments.
BELIKENOOTHER34 UNLIMITEDEs un script basado en varios cci en diferentes temporalidades, el que tiene el color determina la tendencia y el otro que soplo es una linea indica la mayor probabilidad de entrada después del retroceso o corrección.
TEMA Strategy for GoldThis strategy attempts to apply a trendfollowing style to trading the gold instrument on a 5-minute timeframe. I used CHATGPT to write the script and made the necessary adjustments and fine-tuning to my prompts. I want to use the Triple EMA indicator (TEMA) on trading view but I can't seem to find the source code for the indicator. If you find it, and want to develop the strategy more, feel free to leave a message for me in my inbox. Thanks. I hope you enjoy using this!
Moving Average Distance between MA coloredThe distance between short and long moving average of prices MAD
Momentum
Predictor of equity returns
MA Distance with StdDev BandsThis Pine Script indicator calculates and visualizes the percentage deviation from a moving average with dynamic standard deviation bands. Here's what it does:
Key Features
Calculates the percentage difference between current price and a user-selected moving average (SMA, EMA, or VWMA)
Computes standard deviation bands using the entire historical dataset
Displays dynamic color changes based on price movement and band positions
Visual Components
Main line: Shows percentage deviation from the moving average
Dashed bands: Upper and lower standard deviation boundaries
Zero line: Reference for neutral position
Color signals:
Red: Price outside standard deviation bands
Green: Above MA and rising
Orange: Below MA but rising
Blue: Other conditions