P T Supertrend CustomPT Supertrend Custom Indicator Description
The PT Supertrend Custom indicator is a dual Supertrend-based tool designed to help traders identify market trends and potential reversals with enhanced accuracy. This custom indicator plots two Supertrend lines with different ATR (Average True Range) lengths and multipliers, providing a broader perspective on price movements across varying market conditions.
Key Features:
1. Dual Supertrend Lines:
- The indicator calculates two separate Supertrend values using customizable ATR lengths (default: 7 and 21) and factors (default: 3.0 for both).
- This dual-layered approach helps identify both short-term and long-term trends for better decision-making.
2. Customizable Parameters:
- ATR Length (ATR Length & ATR Length2): Determines the lookback period for volatility calculation.
- Factor (Factor & Factor2): Defines the multiplier for the ATR, controlling the sensitivity of the Supertrend lines.
3. Visual Trend Representation:
- Green and red line plots represent uptrends and downtrends, respectively.
- The indicator overlays on the price chart, offering a clear visual representation of trend direction.
- Trend fill areas provide additional clarity, with green shading for uptrends and red shading for downtrends.
4. Dynamic Trend Shifts:
- The indicator adapts dynamically based on price action, switching from an uptrend to a downtrend and vice versa when conditions change.
- Two independent trend signals allow traders to compare short-term and long-term trend confirmations.
5. Overlay on Price Chart:
- The indicator is plotted directly on the price chart for easy visualization without cluttering the workspace.
How to Use:
- Trend Identification:
- A green Supertrend line below price indicates an uptrend.
- A red Supertrend line above price signals a downtrend.
- When both Supertrends align, it indicates a strong trend; divergence may signal potential reversals.
- Entry & Exit Signals:
- Consider long positions when both Supertrend lines turn green.
- Consider short positions when both Supertrend lines turn red.
- Use the shorter ATR period for quicker entries and exits, while the longer ATR period provides confirmation.
- Risk Management:
- The Supertrend lines can serve as dynamic support/resistance levels for placing stop-loss orders.
Best Used In:
- Trend-following strategies
- Swing trading and day trading
- Volatile markets where ATR-based signals are effective
This indicator provides a comprehensive view of market trends by combining short- and long-term trend filters, making it a valuable tool for traders seeking precision and clarity in their trading decisions.
Created by Prince Thomas
Educational
PT Least Squares Moving AveragePT LSMA Multi-Period Indicator
The PT Least Squares Moving Average (LSMA) Multi-Period Indicator is a powerful tool designed for investors who want to track market trends across multiple time horizons in a single, convenient indicator. This indicator calculates the LSMA for four different periods— 25 bars, 50 bars, 450 bars, and 500 bars providing a comprehensive view of short-term and long-term market movements.
Key Features:
- Multi-Timeframe Trend Analysis: Tracks both short-term (25 & 50 bars) and long-term (450 & 500 bars) market trends, helping investors make informed decisions.
- Smoothing Capability: The LSMA reduces noise by fitting a linear regression line to past price data, offering a clearer trend direction compared to traditional moving averages.
- One-Indicator Solution: Combines multiple LSMA periods into a single chart, reducing clutter and enhancing visual clarity.
- Versatile Applications: Suitable for trend identification, market timing, and spotting potential reversals across different timeframes.
- Customizable Styling: Allows users to customize colors and line styles for each period to suit their preferences.
How to Use:
1. Short-Term Trends (25 & 50 bars):Ideal for identifying recent price movements and short-term trade opportunities.
2. Long-Term Trends (450 & 500 bars): Helps investors gauge broader market sentiment and position themselves accordingly for longer holding periods.
3. Trend Confirmation: When shorter LSMA periods cross above longer ones, it may signal bullish momentum, whereas the opposite may indicate bearish sentiment.
4. Support and Resistance: The LSMA lines can act as dynamic support and resistance levels during trending markets.
Best For:
- Long-term investors looking to align their positions with dominant market trends.
- Swing traders seeking confirmation from multiple time horizons.
- Portfolio managers tracking price momentum across various investment durations.
This LSMA Multi-Period Indicator equips investors with a well-rounded perspective on price movements, offering a strategic edge in navigating market cycles with confidence.
Created by Prince Thomas
Vertical & Open Lines - Yearly [MsF]Yearly Vertical & Open Lines Indicator
This indicator helps traders visualize yearly boundaries and track previous year's price levels. It draws:
- Vertical lines at the start of each year
- Horizontal lines showing previous year's open and close prices
- Optional labels with price information
Features:
- Customizable line colors and styles
- Toggle yearly vertical lines
- Show/hide previous year's price levels
- Optional price labels
- Next year line preview
Usage:
1. Add indicator to your chart
2. Adjust Base Time to match your market's yearly reset time
3. Customize colors and styles using input options
4. Toggle features as needed
Dragon Harmonic Pattern [TradingFinder] Dragon Detector🔵 Introduction
The Dragon Harmonic Pattern is one of the technical analysis tools that assists traders in identifying Potential Reversal Zones (PRZ). Resembling an "M" or "W" shape, this pattern is recognized in financial markets as a method for predicting bullish and bearish trends. By leveraging precise Fibonacci ratios and measuring price movements, traders can use this pattern to forecast market trends with high accuracy.
The Dragon Harmonic Pattern is built on the XABCD structure, where each point plays a significant role in shaping and forecasting price movements. Point X marks the beginning of the trend, representing the initial price movement. Point A indicates the first retracement, usually falling within the 0.380 to 0.620 range of the XA wave.
Next, point B signals the second retracement, which lies within 0.200 to 0.400 of the AB wave. Point C, acting as the hump of the pattern, is generally located within 0.800 to 1.100 of the XA wave. Finally, point D represents the endpoint of the pattern and the Potential Reversal Zone (PRZ), where the primary price reversal occurs.
In bullish scenarios, the Dragon Pattern indicates a reversal from a downtrend to an uptrend, where prices move upward from point D. Conversely, in bearish scenarios, prices decline after reaching point D. Accurate identification of this pattern through Fibonacci ratio analysis and PRZ examination can significantly increase the success rate of trades, enabling traders to adjust their strategies based on key market levels such as 0.618 or 1.100.
Due to its high accuracy in identifying Potential Reversal Zones (PRZ) and its alignment with Fibonacci ratios, the Dragon Harmonic Pattern is considered one of the most popular tools in technical analysis. Traders can use this pattern to pinpoint entry and exit points with greater confidence while minimizing trading risks.
Bullish :
Bearish :
🔵 How to Use
The Dragon Harmonic Pattern indicator helps traders identify bullish and bearish patterns in the market, allowing them to capitalize on available trading opportunities. By analyzing Fibonacci ratios and the XABCD structure, the indicator highlights Potential Reversal Zones (PRZ).
🟣 Bullish Dragon Pattern
In the Bullish Dragon Pattern, the price transitions from a downtrend to an uptrend after reaching point D. At this stage, points X, A, B, C, and D must be carefully identified.
Fibonacci ratios for these points are as follows: Point A should fall within 0.380 to 0.620 of the XA wave, point B within 0.200 to 0.400 of the AB wave, and point C within 0.800 to 1.100 of the XA wave.
When the price reaches point D, traders should look for bullish signals such as reversal candlesticks or increased trading volume to enter a buy position. The take-profit level can be set near the previous price high or based on the 1.272 Fibonacci ratio of the XA wave, while the stop-loss should be placed slightly below point D.
🟣 Bearish Dragon Pattern
In the Bearish Dragon Pattern, the price shifts from an uptrend to a downtrend after reaching point D. In this pattern, points X, A, B, C, and D must also be identified. Fibonacci ratios for these points are as follows: Point A should fall within 0.380 to 0.620 of the XA wave, point B within 0.200 to 0.400 of the AB wave, and point C within 0.800 to 1.100 of the XA wave.
Upon reaching point D, bearish signals such as reversal candlesticks or decreasing trading volume indicate the opportunity to enter a sell position. The take-profit level can be set near the previous price low or based on the 1.272 Fibonacci ratio of the XA wave, while the stop-loss should be placed slightly above point D.
By combining the Dragon Harmonic Pattern indicator with precise Fibonacci ratio analysis, traders can identify key opportunities while minimizing risks and improving their decision-making in both bullish and bearish market conditions.
🔵 Setting
🟣 Logical Setting
ZigZag Pivot Period : You can adjust the period so that the harmonic patterns are adjusted according to the pivot period you want. This factor is the most important parameter in pattern recognition.
Show Valid Forma t: If this parameter is on "On" mode, only patterns will be displayed that they have exact format and no noise can be seen in them. If "Off" is, the patterns displayed that maybe are noisy and do not exactly correspond to the original pattern.
Show Formation Last Pivot Confirm : if Turned on, you can see this ability of patterns when their last pivot is formed. If this feature is off, it will see the patterns as soon as they are formed. The advantage of this option being clear is less formation of fielded patterns, and it is accompanied by the latest pattern seeing and a sharp reduction in reward to risk.
Period of Formation Last Pivot : Using this parameter you can determine that the last pivot is based on Pivot period.
🟣 Genaral Setting
Show : Enter "On" to display the template and "Off" to not display the template.
Color : Enter the desired color to draw the pattern in this parameter.
LineWidth : You can enter the number 1 or numbers higher than one to adjust the thickness of the drawing lines. This number must be an integer and increases with increasing thickness.
LabelSize : You can adjust the size of the labels by using the "size.auto", "size.tiny", "size.smal", "size.normal", "size.large" or "size.huge" entries.
🟣 Alert Setting
Alert : On / Off
Message Frequency : This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Show Alert Time by Time Zone : The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default.
🔵 Conclusion
The Dragon Harmonic Pattern is an advanced and practical technical analysis tool that aids traders in accurately predicting bullish and bearish trends by identifying Potential Reversal Zones (PRZ) and utilizing Fibonacci ratios. Built on the XABCD structure, this pattern stands out for its flexibility and precision in identifying price movements, making it a valuable resource among technical analysts. One of its key advantages is its compatibility with other technical tools such as trendlines, support and resistance levels, and Fibonacci retracements.
By using the Dragon Harmonic Pattern indicator, traders can accurately determine entry and exit points for their trades. The indicator analyzes key Fibonacci ratios—0.380 to 0.620, 0.200 to 0.400, and 0.800 to 1.100—to identify critical levels such as price highs and lows, offering precise trading strategies. In bullish scenarios, traders can profit from rising prices, while in bearish scenarios, they can capitalize on price declines.
In conclusion, the Dragon Harmonic Pattern is a highly reliable tool for identifying trading opportunities with exceptional accuracy. However, for optimal results, it is recommended to combine this pattern with other analytical tools and thoroughly assess market conditions. By utilizing this indicator, traders can reduce their trading risks while achieving higher profitability and confidence in their trading strategies.
One Shot One Kill ICT [TradingFinder] Liquidity MMXM + CISD OTE🔵 Introduction
The One Shot One Kill trading setup is one of the most advanced methods in the field of Smart Money Concept (SMC) and ICT. Designed with a focus on concepts such as Liquidity Hunt, Discount Market, and Premium Market, this strategy emphasizes precise Price Action analysis and market structure shifts. It enables traders to identify key entry and exit points using a structured Trading Model.
The core process of this setup begins with a Liquidity Hunt. Initially, the price targets areas like the Previous Day High and Previous Day Low to absorb liquidity. Once the Change in State of Delivery(CISD)is broken, the market structure shifts, signaling readiness for trade entry. At this stage, Fibonacci retracement levels are drawn, and the trader enters a position as the price retraces to the 0.618 Fibonacci level.
Part of the Smart Money approach, this setup combines liquidity analysis with technical tools, creating an opportunity for traders to enter high-accuracy trades. By following this setup, traders can identify critical market moves and capitalize on reversal points effectively.
Bullish :
Bearish :
🔵 How to Use
The One Shot One Kill setup is a structured and advanced trading strategy based on Liquidity Hunt, Fibonacci retracement, and market structure shifts (CISD). With a focus on precise Price Action analysis, this setup helps traders identify key market movements and plan optimal trade entries and exits. It operates in two scenarios: Bullish and Bearish, each with distinct steps.
🟣 Bullish One Shot One Kill
In the Bullish scenario, the process starts with the price moving toward the Previous Day Low, where liquidity is absorbed. At this stage, retail sellers are trapped as they enter short trades at lower levels. Following this, the market reverses upward and breaks the CISD, signaling a shift in market structure toward bullishness.
Once this shift is identified, traders draw Fibonacci levels from the lowest point to the highest point of the move. When the price retraces to the 0.618 Fibonacci level, conditions for a buy position are met. The target for this trade is typically the Previous Day High or other significant liquidity zones where major buyers are positioned, offering a high probability of price reversal.
🟣 Bearish One Shot One Kill
In the Bearish scenario, the price initially moves toward the Previous Day High to absorb liquidity. Retail buyers are trapped as they enter long trades near the highs. After the liquidity hunt, the market reverses downward, breaking the CISD, which signals a bearish shift in market structure. Following this confirmation, Fibonacci levels are drawn from the highest point to the lowest point of the move.
When the price retraces to the 0.618 Fibonacci level, a sell position is initiated. The target for this trade is usually the Previous Day Low or other key liquidity zones where major sellers are active.
This setup provides a precise and logical framework for traders to identify market movements and enter trades at critical reversal points.
🔵 Settings
🟣 CISD Logical settings
Bar Back Check : Determining the return of candles to identify the CISD level.
CISD Level Validity : CISD level validity period based on the number of candles.
🟣 LIQUIDITY Logical settings
Swing period : You can set the swing detection period.
Max Swing Back Method : It is in two modes "All" and "Custom". If it is in "All" mode, it will check all swings, and if it is in "Custom" mode, it will check the swings to the extent you determine.
Max Swing Back : You can set the number of swings that will go back for checking.
🟣 CISD Display settings
Displaying or not displaying swings and setting the color of labels and lines.
🟣 LIQUIDITY Display settings
Displaying or not displaying swings and setting the color of labels and lines.
🔵 Conclusion
The One Shot One Kill setup is one of the most effective and well-structured trading strategies for identifying and capitalizing on key market movements. By incorporating concepts such as Liquidity Hunt, CISD, and Fibonacci retracement, this setup allows traders to enter trades with high precision at optimal points.
The strategy emphasizes detailed Price Action analysis and the identification of Smart Money behavior, helping traders to execute successful trades against the general market trend.
With a focus on identifying liquidity in the Previous Day High and Low and aligning it with Fibonacci retracement levels, this setup provides a robust framework for entering both bullish and bearish trades.
The combination of liquidity analysis and Fibonacci retracement at the 0.618 level enables traders to minimize risk and exploit major market moves effectively.
Ultimately, success with the One Shot One Kill setup requires practice, patience, and strict adherence to its rules. By mastering its concepts and focusing on high-probability setups, traders can enhance their decision-making skills and build a sustainable and professional trading approach.
Professional GBP/JPY Analysis ToolThe foundation of professional trading begins with analyzing individual currencies first, not just currency pairs. By understanding the relative strength of each currency in the pair, traders can anticipate potential market moves with greater accuracy.
This indicator simplifies that process by:
Analyzing Individual Currency Strength:
The strength of GBP is calculated by averaging its performance across seven major GBP currency pairs:
GBP/EUR
GBP/USD
GBP/CAD
GBP/CHF
GBP/AUD
GBP/NZD
GBP/JPY
The strength of JPY is calculated by averaging its performance across seven major JPY currency pairs:
JPY/USD
JPY/CAD
JPY/EUR
JPY/GBP
JPY/AUD
JPY/NZD
JPY/CHF
The values are normalized to allow direct comparison on the same scale.
Identifying Correlation Between GBP and JPY:
The histogram displays the correlation between GBP and JPY strength:
Positive Correlation (Green): Both GBP and JPY are trending up or down together, indicating a less strong trend. This is a market condition to avoid, as both currencies are strengthening or weakening simultaneously.
Negative Correlation (Red): One currency is strong while the other is weak, indicating a stronger trend in GBP/JPY. This scenario presents a better trading opportunity, as you are trading one strong currency against one weak currency, amplifying the potential for a clearer price movement in GBP/JPY.
Visualizing Long/Short Bias:
GBP Strength > JPY Strength: Bullish bias for GBP/JPY (green background).
JPY Strength > GBP Strength: Bearish bias for GBP/JPY (red background).
This indicator equips traders with a deeper understanding of GBP/JPY dynamics by first breaking down the individual currencies. With insights into currency strength, their correlation, and the optimal conditions for trading, it provides a solid foundation for making informed trading decisions.
How to Use:
Check the Histogram for Correlation:
Wait for the histogram to be red. This indicates that GBP and JPY are moving in opposite directions, signaling a stronger trend where you're trading a strong currency against a weak one—a more favorable setup.
Align with Background Color for Confirmation:
Wait for the background color to match your trade plan:
Green Background: Confirms a bullish bias, supporting long positions on the GBP/JPY pair.
Red Background: Confirms a bearish bias, supporting short positions on the GBP/JPY pair.
By following these steps, you can identify stronger trade opportunities and align them with your strategy.
Demand and Supply Zones Intraday Strategy(SAMARESH PANDA)Explanation:
Input Parameters:
length: Determines the number of bars to look back for identifying the highest and lowest prices to mark demand and supply zones.
zoneBuffer: A buffer in pips to place the stop and limit orders near the identified demand and supply zones.
Demand and Supply Zones:
The script identifies demand zones as the lowest low over the past length bars and supply zones as the highest high over the same period.
Buy (Long) Condition:
A buy signal is generated when the price crosses above the demand zone from below and the price closes above the demand zone.
Sell (Short) Condition:
A sell signal is generated when the price crosses below the supply zone from above and the price closes below the supply zone.
Stop and Limit Orders:
For long trades, the stop is placed just below the demand zone (zoneBuffer), and the limit is placed just above the demand zone.
For short trades, the stop is placed just above the supply zone (zoneBuffer), and the limit is placed just below the supply zone.
Exit Conditions:
The long position is closed when the price moves above the supply zone.
The short position is closed when the price moves below the demand zone.
Additional Notes:
Customization: You can modify the length and zoneBuffer values to adjust how sensitive the strategy is to price action and the zone buffers.
Risk Management: You may want to add additional filters for volume, indicators like RSI/MACD, or other market conditions to filter out false signals.
Testing & Optimization: As with any strategy, it's important to backtest and optimize it according to your preferred market conditions and risk tolerance.
Using the Strategy:
Apply the script to a 1-hour or 30-minute chart for identifying the demand and supply zones.
For better precision in entry, you can switch to a lower timeframe (like 5-minute or 15-minute) to execute your trades more accurately when the price reaches a demand or supply zone.
The buy and sell signals will appear on the chart as green (BUY) and red (SELL) labels.
Example of Execution:
Long Entry: The price closes above the demand zone and crosses up. A long position is opened with a stop below the demand zone and a limit near it.
Short Entry: The price closes below the supply zone and crosses down. A short position is opened with a stop above the supply zone and a limit near it.
This strategy works best in trending markets where price tends to respect these zones. Make sure to monitor the strategy closely and adjust it based on market volatility or changes in the broader trend.
You said:
create a pine script pivot point standard for buy sell
ChatGPT said:
ChatGPT
Sure! Below is a Pine Script that implements the Pivot Point Standard for intraday trading, with buy and sell signals based on the pivot point strategy.
Pivot points are calculated based on the previous day’s high, low, and close prices, and they are widely used in intraday trading to determine potential support and resistance levels.
Intraday Chaos FilterIntraday trading requires precise tools and strategies to navigate the chaotic fluctuations of the market. The "Intraday Chaos Filter" indicator is designed to provide traders with a systematic approach to managing market noise. This Pine Script™ indicator helps identify potential trend shifts and provides a visual representation of price action, aiding in making informed trading decisions. By focusing on reducing market chaos, it aims to provide a clearer picture of the underlying trend, regardless of the volatility.
At the heart of the indicator lies the multiplier input, a customizable setting that adjusts the sensitivity of the filter. The multiplier directly influences the chaos threshold by determining the percentage deviation allowed before signaling a trend reversal. A higher multiplier results in a less sensitive filter, reducing the number of signals during minor price fluctuations. This flexibility allows traders to adapt the indicator to different trading styles and market conditions, making it versatile for a range of intraday strategies.
The "Intraday Chaos Filter" operates by tracking two key price levels: src1 and src2, representing the highest and lowest prices during a trend. These levels are dynamically adjusted based on the closing price, ensuring that the indicator adapts in real time. The trend direction is determined by comparing the current price against a calculated filter level. When the price crosses the threshold in either direction, it signals a potential trend reversal, marked by a change in candle colors on the chart. Green represents an upward trend, while red signifies a downward trend, making it visually intuitive for traders.
This indicator's simplicity and clarity make it a valuable addition to any trader's toolkit. By focusing on trend direction and filtering out minor fluctuations, it helps traders stay focused on significant market movements. The integration of customizable settings ensures adaptability to various trading preferences, providing both novice and experienced traders with a reliable tool for intraday decision-making. The "Intraday Chaos Filter" offers an effective way to navigate market noise, enabling traders to identify opportunities with confidence.
Dynamic EMA CrossoverThe Dynamic EMA Crossover indicator is designed to help traders identify trend transitions, visually understand market direction, and detect sideways consolidation zones. It simplifies decision-making by dynamically changing colors and highlighting areas of interest.
Key Features:
1. Dynamic EMA Crossovers:
• Uses two EMAs (default: 9 and 26 ) to identify bullish and bearish trends.
• EMAs and the area between them turn green during bullish trends and red during bearish trends for easy visualization.
2. Sideways Market Detection:
• Automatically detects periods of market consolidation when EMAs overlap for 10 consecutive candles and the price movement remains narrow.
• Sideways zones are highlighted with grey background, helping traders avoid false breakouts and trendless markets.
3. Customizable Inputs:
• Adjust the lengths of the two EMAs and the sensitivity of the overlap detection to match your trading style and market conditions.
How It Works:
• Trend Identification:
• When the shorter EMA crosses above the longer EMA, a bullish trend is indicated.
• When the shorter EMA crosses below the longer EMA, a bearish trend is indicated.
• The indicator dynamically adjusts the colors of the EMAs and fills the area between them for clear trend visibility.
• Sideways Market Detection:
• When the shorter EMA and longer EMA stay close (within a customizable sensitivity) for a fixed period (hardcoded to 10 candles), the indicator identifies a sideways market.
• This feature helps traders avoid entering trades during choppy or indecisive market conditions.
Who Is This For?
This indicator is ideal for:
• Trend traders looking for clear signals of trend direction.
• Swing traders who want to avoid trading in sideways markets.
• Scalpers who need quick and reliable visual cues for short-term market behavior.
Use Cases:
1. Bullish/Bearish Trends:
• Enter trades in the direction of the trend as the crossover occurs and colors change.
2. Sideways Zones:
• Avoid trades during periods of consolidation and wait for a clear breakout.
Mashup Logic:
This indicator combines:
1. EMA Crossovers:
• A tried-and-tested method for trend detection using two moving averages.
• Dynamic visual cues for bullish and bearish market phases.
2. Sideways Market Detection:
• Innovative logic to highlight sideways zones based on EMA overlap and price range analysis.
• Helps reduce noise and avoid trading during trendless periods.
3. Customization and Flexibility:
• Fully adjustable EMA lengths and overlap sensitivity to adapt to different markets and trading styles.
Lost Bar Locator v1 [Yaphott]Lost Bar Locator v1 helps you locate missing data on your chart.
It does this by looking for consecutive bars that have a delta time greater than the current interval.
Two lines are drawn for each group of one or more missing bars:
Bar before the missing bar(s).
Bar after the missing bar(s).
Buy Signal Forex & Crypto v0 ImprovedPurpose of the Script:
This script is designed to generate buy and sell signals for trading Forex and cryptocurrencies by analyzing price trends using exponential moving averages (EMAs), volatility, and volume filters. The signals are displayed as arrows on the chart.
What the Script Does
Input Settings:
The script allows the user to configure various settings, such as the lengths of EMAs, a higher timeframe for trend confirmation, and thresholds for volume and volatility (ATR - Average True Range).
Key settings:
5 EMA Length – Length of the short-term EMA.
13 EMA Length – Length of the medium-term EMA.
26 EMA Length – Length of the long-term EMA.
21 EMA Length – Used for trend confirmation on a higher timeframe.
Higher Timeframe – Lets you select a timeframe (e.g., daily) for confirming the overall trend.
ATR Threshold – Filters out signals when the market's volatility is too low.
Volume Filter – Ensures sufficient trading activity before generating signals.
Calculating EMAs (Exponential Moving Averages):
Four EMAs are calculated:
ema5 (short-term), ema13 (medium-term), ema26 (long-term), and ema21 (higher timeframe confirmation).
These EMAs help determine price trends and crossovers, which are critical for identifying buy and sell opportunities.
Trend Confirmation Using a Higher Timeframe:
The 21 EMA on the higher timeframe (e.g., daily) is used to confirm the overall direction of the market.
Defining Signal Conditions:
Buy Signal:
A buy signal is generated when:
ema5 crosses above ema13 (indicating a bullish trend).
ema5 crosses above ema26 (stronger bullish confirmation).
The closing price is above ema5, ema13, ema26, and the 21 EMA on the higher timeframe.
The market's volatility (ATR) is above the defined threshold.
The volume meets the conditions or volume filtering is disabled.
Sell Signal:
A sell signal is generated when:
ema5 crosses below ema13 (indicating a bearish trend).
ema5 crosses below ema26 (stronger bearish confirmation).
The closing price is below ema5, ema13, ema26, and the 21 EMA on the higher timeframe.
The market's volatility (ATR) is above the defined threshold.
The volume meets the conditions or volume filtering is disabled.
Volume Filtering:
Ensures there’s enough trading activity by comparing the current volume to a 20-period moving average of volume.
Persistent Variables:
These variables (crossed13 and crossed13Sell) help track whether the short-term EMA (ema5) has crossed the medium-term EMA (ema13). This prevents false or repeated signals.
Displaying Signals on the Chart:
Buy signals are displayed as green upward arrows below the price.
Sell signals are displayed as red downward arrows above the price.
How It Helps Traders:
This script provides visual cues for potential entry and exit points by combining moving average crossovers, volatility, volume, and higher timeframe trend confirmation. It works well for trending markets and ensures signals are filtered for stronger conditions to reduce noise.
Chart InfoOVERVIEW
What would a general summary of the symbol on the chart look like? Here’s an example: This script was created to help you easily access the essential details of a symbol, which I believe are critical for daily use.
CONCEPTS
When using any indicator or analysing price movement, the characteristics of the chart become important. Each symbol has a unique character and the more we can quickly find out about it, the better. Instead of embedding those details within each individual indicator, it is often more practical to access these data through an external tool. This indicator presents the following results related to the symbol on your chart in a table format:
ID : Ticker ID (Exchange, Base Currency, and Quote Currency)
TIMEFRAME : The chart's time period
START : The starting date of the chart
FINISH : The finishing date of the chart
INTERVAL : The total time between the start and finish dates (based on timeframe). The current bar is not included in the total time until it is closed.
BAR INDEX : The total number of bars on the chart (can also be viewed in both forward and backward directions in the data window as a series type).
VOLATILITY : Percentage ratio of 14-bar ATR to close.
CHANGE : The daily percentage change.
HODL : The percentage return that would be gained if the symbol had been bought and held since the first bar.
DAILY BUY : The percentage return that would be gained if the same amount of buying was made daily (a kind of DCA).
MECHANICS
This is a very simple script. I didn't add user-defined timestamp inputs because I didn’t want to overwhelm the indicator with parameters. However, if requested, i can make improvements in this direction in a second version.
NOTES
I live in Istanbul, so I designed the default timezone offset as GMT+3. Please remember to adjust it according to your own timezone to ensure the date results are accurate.
I hope it helps everyone. Do not forget to manage your risk. And trade as safely as possible. Best of luck!
Monthly, Quarterly OPEX & Vix expirations
OPEX Indicator:
The OPEX indicator is designed to provide traders with a visual representation of key options expiration dates, particularly for monthly, quarterly, and VIX options expirations. This indicator can be particularly helpful for market participants who focus on options-based strategies or those who track the impact of options expiration on price action.
The indicator overlays vertical lines and labels on the chart to highlight three key types of expiration events:
Monthly Equity and Index Expiration (OPEX): This marks the standard monthly options expiration dates for equity and index options.
Quarterly Index Expiration (Q): This indicates the quarterly expiration dates for index options, which tend to have a larger impact on the market.
Monthly VIX Expiration (VIXEX): This marks the monthly expiration of VIX options and futures, which are important for volatility traders.
How to Use the OPEX Indicator:
Expiration Dates on the Chart: The OPEX indicator marks expiration dates with vertical lines and labels that appear on the chart. These are customizable, allowing you to adjust the line and label colors to suit your preferences. The lines and labels will appear at specific times, such as the closing of the market on expiration days, allowing traders to prepare for potential volatility or other market dynamics associated with these events.
Customizable Colors and Label Positions: The indicator offers flexibility in customizing the appearance of expiration lines and labels. For each expiration type (OPEX, Quarterly, and VIXEX), you can adjust the line color, label color, and label text color. Additionally, the label text size and position can be customized (e.g., above the bar, below the bar, top or bottom of the chart). This allows for a tailored display that suits your trading style and chart layout.
Visualizing Impact of Expiration Events: Traders who track the influence of expiration events can use this indicator to spot potential market moves around expiration dates. For example, significant price swings often occur near expiration days as options traders adjust their positions. With this indicator, you can visualize these dates on your chart and analyze market behavior in the lead-up to, during, and after the expirations.
Input Options:
Expiration Types:
Monthly Equity, Index Expiration (OPEX): Turn on or off the monthly equity expiration markers.
Quarterly Index Expiration (Q): Turn on or off the quarterly expiration markers.
Monthly VIX Expiration (VIXEX): Turn on or off the VIX expiration markers.
Line and Label Customization:
Line Color: Adjust the color of the vertical lines marking the expiration events.
Label Color: Customize the color of the expiration labels.
Label Text Color: Adjust the color of the text inside the labels.
Label Position: Choose the position of the labels (e.g., top, bottom, above bar, below bar).
Use Cases:
Options Traders: Track options expiration dates to assess potential price swings or liquidity changes.
Volatility Traders: Watch for patterns around VIX options expirations.
Index Traders: Monitor quarterly expirations for potential market-moving events.
Example Use:
As a trader, you can apply this indicator to your chart and observe how price action reacts near expiration dates. For instance, on the monthly OPEX expiration day, you might notice increased volatility or an uptick in options-related price moves. By observing this trend over time, you can align your trades to capitalize on predictable movements around key expiration days.
Additionally, you may use the quarterly expiration markers to assess whether there’s typically a market shift during these periods, providing insights for long-term traders.
This indicator can be a helpful tool for preparing and managing trades around critical options expiration dates, helping to forecast potential market behavior based on historical patterns.
TradingView Community Guidelines Compliance: This script complies with TradingView's community guidelines by offering a clear and valuable function for traders, providing customizable inputs for enhanced usability. The script is focused on chart visualizations without manipulating or misrepresenting market data. It serves as an educational tool and a functional indicator, with no claims or misleading functionality. The indicator does not promote financial products or services and focuses solely on charting for better trading decision-making.
IU Trailing Stop Loss MethodsThe 'IU Trailing Stop Loss Methods' it's a risk management tool which allows users to apply 12 trailing stop-loss (SL) methods for risk management of their trades and gives live alerts when the trailing Stop loss has hit. Below is a detailed explanation of each input and the working of the Script.
Main Inputs:
- bar_time: Specifies the date from which the trade begins and entry price will be the open of the first candle.
- entry_type: Choose between 'Long' or 'Short' positions.
- trailing_method: Select the trailing stop-loss method. Options include ATR, Parabolic SAR, Supertrend, Point/Pip based, Percentage, EMA, Highest/Lowest, Standard Deviation, and multiple target-based methods.
- exit_after_close: If checked, exits the trade only after the candle closes.
Optional Inputs:
ATR Settings:
- atr_Length: Length for the ATR calculation.
- atr_factor: ATR multiplier for SL calculation.
Parabolic SAR Settings:
- start, increment, maximum: Parameters for the Parabolic SAR indicator.
Supertrend Settings:
- supertrend_Length, supertrend_factor: Length and factor for the Supertrend indicator.
Point/Pip Based:
- point_base: Set trailing SL in points/pips.
Percentage Based:
- percentage_base: Set SL as a percentage of entry price.
EMA Settings:
- ema_Length: Length for EMA calculation.
Standard Deviation Settings:
- std_Length, std_factor: Length and factor for standard deviation calculation.
Highest/Lowest Settings:
- highest_lowest_Length: Length for the highest/lowest SL calculation.
Target-Based Inputs:
- ATR, Point, Percentage, and Standard Deviation based target SL settings with customizable lengths and multipliers.
Entry Logic:
- Trades initiate based on the entry_type selected and the specified bar_time.
- If Long is selected, a long trade is initiated when the conditions match, and vice versa for Short.
Trailing Stop-Loss (SL) Methods Explained:
The strategy dynamically adjusts stop-loss based on the chosen method. Each method has its calculation logic:
- ATR: Stop-loss calculated using ATR multiplied by a user-defined factor.
- Parabolic SAR: Uses the Parabolic SAR indicator for trailing stop-loss.
- Supertrend: Utilizes the Supertrend indicator as the stop-loss line.
- Point/Pip Based: Fixed point-based stop-loss.
- Percentage Based: SL set as a percentage of entry price.
- EMA: SL based on the Exponential Moving Average.
- Highest/Lowest: Uses the highest high or lowest low over a specified period.
- Standard Deviation: SL calculated using standard deviation.
Exit Conditions:
- If exit_after_close is enabled, the position will only close after the candle confirms the stop-loss hit.
- If exit_after_close is disabled, the strategy will close the trade immediately when the SL is breached.
Visualization:
The script plots the chosen trailing stop-loss method on the chart for easy visualization.
Target-Based Trailing SL Logic:
- When a position is opened, the strategy calculates the initial stop-loss and progressively adjusts it as the price moves favorably.
- Each SL adjustment is stored in an array for accurate tracking and visualization.
Alerts and Labels:
- When the Entry or trailing stop loss is hit this scripts draws a label and give alert to the user that trailing stop has been hit for the trade.
Note - on the historical data The Script will show nothing if the entry and the exit has happened on the same candle, because we don't know what was hit first SL or TP (basically how the candle was formed on the lower timeframe).
Summary:
This script offers flexible trailing stop-loss options for traders who want dynamic risk management in their strategies. By offering multiple methods like ATR, SAR, Supertrend, and EMA, it caters to various trading styles and risk preferences.
Candle 1 2 3 on XAUUSD (by Veronica)Description
Discover the Candle 1 2 3 Strategy, a simple yet effective trading method tailored exclusively for XAUUSD on the 15-minute timeframe. Designed by Veronica, this strategy focuses on identifying key reversal and continuation patterns during the London and New York sessions, making it ideal for traders who prioritise high-probability entries during these active market hours.
Key Features:
1. Session-Specific Trading:
The strategy operates strictly during London (03:00–06:00 UTC) and New York (08:30–12:30 UTC) sessions, where XAUUSD tends to show higher volatility and clearer price movements.
Pattern Criteria:
- Works best if the first candle is NOT a pin bar or a doji.
- Third candle should either:
a. Be a marubozu (large body with minimal wicks).
a. Have a significant body with wicks, ensuring the close of the third candle is above Candle 2 (for Buy) or below Candle 2 (for Sell).
Callout Labels and Alerts:
Automatic Buy and Sell labels are displayed on the chart during qualifying sessions, ensuring clarity for decision-making.
Integrated alerts notify you of trading opportunities in real-time.
Risk Management:
Built-in Risk Calculator to estimate lot sizes based on your account size, risk percentage, and stop-loss levels.
Customizable Table:
Displays your calculated lot size for various stop-loss pip values, making risk management seamless and efficient.
How to Use:
1. Apply the indicator to XAUUSD (M15).
2. Focus on setups appearing within the London and New York sessions only.
3. Ensure the first candle is neither a pin bar nor a doji.
4. Validate the third candle's body placement:
For a Buy, the third candle’s close must be above the second candle.
For a Sell, the third candle’s close must be below the second candle.
5. Use the generated alerts to streamline your entry process.
Notes:
This strategy is meant to complement your existing knowledge of market structure and price action.
Always backtest thoroughly and adjust parameters to fit your personal trading style and risk tolerance.
Credit:
This strategy is the intellectual property of Veronica, developed specifically for XAUUSD (M15) traders seeking precision entries during high-volume sessions.
00 Averaging Down Backtest Strategy by RPAlawyer v21FOR EDUCATIONAL PURPOSES ONLY! THE CODE IS NOT YET FULLY DEVELOPED, BUT IT CAN PROVIDE INTERESTING DATA AND INSIGHTS IN ITS CURRENT STATE.
This strategy is an 'averaging down' backtester strategy. The goal of averaging/doubling down is to buy more of an asset at a lower price to reduce your average entry price.
This backtester code proves why you shouldn't do averaging down, but the code can be developed (and will be developed) further, and there might be settings even in its current form that prove that averaging down can be done effectively.
Different averaging down strategies exist:
- Linear/Fixed Amount: buy $1000 every time price drops 5%
- Grid Trading: Placing orders at price levels, often with increasing size, like $1000 at -5%, $2000 at -10%
- Martingale: doubling the position size with each new entry
- Reverse Martingale: decreasing position size as price falls: $4000, then $2000, then $1000
- Percentage-Based: position size based on % of remaining capital, like 10% of available funds at each level
- Dynamic/Adaptive: larger entries during high volatility, smaller during low
- Logarithmic: position sizes increase logarithmically as price drops
Unlike the above average costing strategies, it applies averaging down (I use DCA as a synonym) at a very strong trend reversal. So not at a certain predetermined percentage negative PNL % but at a trend reversal signaled by an indicator - hence it most closely resembles a dynamically moving grid DCA strategy.
Both entering the trade and averaging down assume a strong trend. The signals for trend detection are provided by an indicator that I published under the name '00 Parabolic SAR Trend Following Signals by RPAlawyer', but any indicator that generates numeric signals of 1 and -1 for buy and sell signals can be used.
The indicator must be connected to the strategy: in the strategy settings under 'External Source' you need to select '00 Parabolic SAR Trend Following Signals by RPAlawyer: Connector'. From this point, the strategy detects when the indicator generates buy and sell signals.
The strategy considers a strong trend when a buy signal appears above a very conservative ATR band, or a sell signal below the ATR band. The conservative ATR is chosen to filter ranging markets. This very conservative ATR setting has a default multiplier of 8 and length of 40. The multiplier can be increased up to 10, but there will be very few buy and sell signals at that level and DCA requirements will be very high. Trade entry and DCA occur at these strong trends. In the settings, the 'ATR Filter' setting determines the entry condition (e.g., ATR Filter multiplier of 9), and the 'DCA ATR' determines when DCA will happen (e.g., DCA ATR multiplier of 6).
The DCA levels and DCA amounts are determined as follows:
The first DCA occurs below the DCA Base Deviation% level (see settings, default 3%) which acts as a threshold. The thick green line indicates the long position avg price, and the thin red line below the green line indicates the 3% DCA threshold for long positions. The thick red line indicates the short position avg price, and the thin red line above the thick red line indicates the short position 3% DCA threshold. DCA size multiplier defines the DCA amount invested.
If the loss exceeds 3% AND a buy signal arrives below the lower ATR band for longs, or a sell signal arrives above the upper ATR band for shorts, then the first DCA will be executed. So the first DCA won't happen at 3%, rather 3% is a threshold where the additional condition is that the price must close above or below the ATR band (let's say the first DCA occured at 8%) – this is why the code resembles a dynamic grid strategy, where the grid moves such that alongside the first 3% threshold, a strong trend must also appear for DCA. At this point, the thick green/red line moves because the avg price is modified as a result of the DCA, and the thin red line indicating the next DCA level also moves. The next DCA level is determined by the first DCA level, meaning modified avg price plus an additional +8% + (3% * the Step Scale Multiplier in the settings). This next DCA level will be indicated by the modified thin red line, and the price must break through this level and again break through the ATR band for the second DCA to occur.
Since all this wasn't complicated enough, and I was always obsessed by the idea that when we're sitting in an underwater position for days, doing DCA and waiting for the price to correct, we can actually enter a short position on the other side, on which we can realize profit (if the broker allows taking hedge positions, Binance allows this in Europe).
This opposite position in this strategy can open from the point AFTER THE FIRST DCA OF THE BASE POSITION OCCURS. This base position first DCA actually indicates that the price has already moved against us significantly so time to earn some money on the other side. Breaking through the ATR band is also a condition for entry here, so the hedge position entry is not automatic, and the condition for further DCA is breaking through the DCA Base Deviation (default 3%) and breaking through the ATR band. So for the 'hedge' or rather opposite position, the entry and further DCA conditions are the same as for the base position. The hedge position avg price is indicated by a thick black line and the Next Hedge DCA Level is indicated by a thin black line.
The TPs are indicated by green labels for base positions and red labels for hedge positions.
No SL built into the strategy at this point but you are free to do your coding.
Summary data can be found in the upper right corner.
The fantastic trend reversal indicator Machine learning: Lorentzian Classification by jdehorty can be used as an external indicator, choose 'backtest stream' for the external source. The ATR Band multiplicators need to be reduced to 5-6 when using Lorentz.
The code can be further developed in several aspects, and as I write this, I already have a few ideas 😊
Best of Option Indicator - Manoj WadekarPlot this indicator for both CALL and PUT options and buy only when color of candle is YELLOW and above BLACK line.
4EMAs+OpenHrs+FOMC+CPIThis script displays 4 custom EMAs of your choice based on the Pine script standard ema function.
Additionally the following events are shown
1. Opening hours for New York Stock exchange
2. Opening Time for London Stock exchange
3. US CPI Release Dates
4. FOMC press conference dates
5. FOMC meeting minutes release dates
I have currently added FOMC and CPI Dates for 2025 but will keep updating in January of every year (at least as long as I stay in the game :D)
Market Turn Breakout Strategy OptimizerThis is a script made for a friend of mine. It is intended to be used as a visual tool to see which combination of RR is best for a Breakout Strategy he made.
Buy Low over 18 SMA Strategythis is a customizeable strategy to buy on daily chart where you can select after which days you want to buy
with a 1or2 day trailing stop on prior low
the Nasdaq seams to be most profitable when buying above the wednesdays and fridays high
this avoided entries in the bearish move on july 2024
breakeven stops in aug 2023
only small losses in jan/april/sept 2022
all in all a pretty good strategy when exiting below the low of prior two days
Trend-Based Signals (NASDAQ) - LA CLAVE ESTÁ EN NO RENDIRSEOrlando Pereira
// Highlight Time Zones
in_zone1 = (hour == 8 and minute >= 30 and minute <= 35) // 8:30 am to 8:36 am EST
in_zone2 = (hour == 8 and minute > 35) or (hour == 9) or (hour == 10 and minute == 0) // 8:36 am to 10:00 am EST
bgcolor(in_zone1 ? color_zone1 : na, title="Zone 1 Background")
bgcolor(in_zone2 ? color_zone2 : na, title="Zone 2 Background")
// Display motivational message
if bar_index == na
label.new(bar_index, high, "LA CLAVE ESTÁ EN NO RENDIRSE",
style=label.style_label_center,
color=color.orange,
textcolor=color.black,
size=size.large)
India VIXThe VIX chart represents the Volatility Index, commonly referred to as the "Fear Gauge" of the stock market. It measures the market's expectations of future volatility over the next 30 days, based on the implied volatility of NSE index options. The VIX is often used as an indicator of investor sentiment, reflecting the level of fear or uncertainty in the market.
Here’s a breakdown of what you might observe on a typical VIX chart:
VIX Value: The y-axis typically represents the VIX index value, with higher values indicating higher levels of expected market volatility (more fear or uncertainty), and lower values signaling calm or stable market conditions.
VIX Spikes: Large spikes in the VIX often correspond to market downturns or periods of heightened uncertainty, such as during financial crises or major geopolitical events. A high VIX is often associated with a drop in the stock market.
VIX Drops: A decline in the VIX indicates a reduction in expected market volatility, usually linked with periods of market calm or rising stock prices.
Trend Analysis: Technical traders might use moving averages or other indicators on the VIX chart to assess the potential for future market movements.
Inverse Relationship with the Stock Market: Typically, there is an inverse correlation between the VIX and the stock market. When stocks fall sharply, volatility increases, and the VIX tends to rise. Conversely, when the stock market rallies or remains stable, the VIX tends to fall.
A typical interpretation would be that when the VIX is low, the market is relatively stable, and when the VIX is high, the market is perceived to be uncertain or volatile.
Combined Multi-Timeframe EMA OscillatorThis script aims to visualize the strength of bullish or bearish trends by utilizing a mix of 200 EMA across multiple timeframes. I've observed that when the multi-timeframe 200 EMA ribbon is aligned and expanding, the uptrend usually lasts longer and is safer to enter at a pullback for trend continuation. Similarly, when the bands are expanding in reverse order, the downtrend holds longer, making it easier to sell the pullbacks.
In this script, I apply a purely empirical and experimental method: a) Ranking the position of each of the above EMAs and turning it into an oscillator. b) Taking each 200 EMA on separate timeframes, turning it into a stochastic-like oscillator, and then averaging them to compute an overall stochastic.
To filter a bullish signal, I use the bullish crossover between these two aggregated oscillators (default: yellow and blue on the chart) which also plots a green shadow area on the screen and I look for buy opportunities/ ignore sell opportunities while this signal is bullish. Similarly, a bearish crossover gives us a bearish signal which also plots a red shadow area on the screen and I only look for sell opportunities/ ignore any buy opportunities while this signal is bearish.
Note that directly buying the signal as it prints can lead to suboptimal entries. The idea behind the above is that these crossovers point on average to a stronger trend; however, a trade should be initiated on the pullbacks with confirmation from momentum and volume indicators and in confluence with key areas of support and resistance and risk management should be used in order to protect your position.
Disclaimer: This script does not constitute certified financial advice, the current work is purely experimental, use at your own discretion.