Three Step Future-Trend [BigBeluga]Three Step Future-Trend by BigBeluga is a forward-looking trend analysis tool designed to project potential future price direction based on historical periods. This indicator aggregates data from three consecutive periods, using price averages and delta volume analysis to forecast trend movement and visualize it on the chart with a projected trend line and volume metrics.
🔵 Key Features:
Three Period Analysis: Calculates price averages and delta volumes from three specified periods, creating a consolidated view of historical price movement.
Future Trend Line Projection: Plots a forward trend line based on the calculated averag of three periods, helping traders visualize potential future price movement.
Avg Delta Volume and Future Price Label: Shows a delta average Volume a long with a Future Price label at the end of the projected trend line, indicating the possible future delta volume and future Price.
Volume Data Table: Displays a detailed table showing delta and total volume for each of the three periods, allowing quick volume comparison to support the projected trend.
This indicator provides a dynamic way to anticipate market direction by blending price and volume data, giving traders insights into both volume and trend strength in upcoming periods.
Indicateurs et stratégies
LRI Momentum Cycles [AlgoAlpha]Discover the LRI Momentum Cycles indicator by AlgoAlpha, a cutting-edge tool designed to identify market momentum shifts using trend normalization and linear regression analysis. This advanced indicator helps traders detect bullish and bearish cycles with enhanced accuracy, making it ideal for swing traders and intraday enthusiasts alike.
Key Features :
🎨 Customizable Appearance : Set personalized colors for bullish and bearish trends to match your charting style.
🔧 Dynamic Trend Analysis : Tracks market momentum using a unique trend normalization algorithm.
📊 Linear Regression Insight : Calculates real-time trend direction using linear regression for better precision.
🔔 Alert Notifications : Receive alerts when the market switches from bearish to bullish or vice versa.
How to Use :
🛠 Add the Indicator : Favorite and apply the indicator to your TradingView chart. Adjust the lookback period, linear regression source, and regression length to fit your strategy.
📊 Market Analysis : Watch for color changes on the trend line. Green signals bullish momentum, while red indicates bearish cycles. Use these shifts to time entries and exits.
🔔 Set Alerts : Enable notifications for momentum shifts, ensuring you never miss critical market moves.
How It Works :
The LRI Momentum Cycles indicator calculates trend direction by applying linear regression on a user-defined price source over a specified period. It compares historical trend values, detecting bullish or bearish momentum through a dynamic scoring system. This score is normalized to ensure consistent readings, regardless of market conditions. The indicator visually represents trends using gradient-colored plots and fills to highlight changes in momentum. Alerts trigger when the momentum state changes, providing actionable trading signals.
Log Regression OscillatorThe Log Regression Oscillator transforms the logarithmic regression curves into an easy-to-interpret oscillator that displays potential cycle tops/bottoms.
🔶 USAGE
Calculating the logarithmic regression of long-term swings can help show future tops/bottoms. The relationship between previous swing points is calculated and projected further. The calculated levels are directly associated with swing points, which means every swing point will change the calculation. Importantly, all levels will be updated through all bars when a new swing is detected.
The "Log Regression Oscillator" transforms the calculated levels, where the top level is regarded as 100 and the bottom level as 0. The price values are displayed in between and calculated as a ratio between the top and bottom, resulting in a clear view of where the price is situated.
The main picture contains the Logarithmic Regression Alternative on the chart to compare with this published script.
Included are the levels 30 and 70. In the example of Bitcoin, previous cycles showed a similar pattern: the bullish parabolic was halfway when the oscillator passed the 30-level, and the top was very near when passing the 70-level.
🔹 Proactive
A "Proactive" option is included, which ensures immediate calculations of tentative unconfirmed swings.
Instead of waiting 300 bars for confirmation, the "Proactive" mode will display a gray-white dot (not confirmed swing) and add the unconfirmed Swing value to the calculation.
The above example shows that the "Calculated Values" of the potential future top and bottom are adjusted, including the provisional swing.
When the swing is confirmed, the calculations are again adjusted, showing a red dot (confirmed top swing) or a green dot (confirmed bottom swing).
🔹 Dashboard
When less than two swings are available (top/bottom), this will be shown in the dashboard.
The user can lower the "Threshold" value or switch to a lower timeframe.
🔹 Notes
Logarithmic regression is typically used to model situations where growth or decay accelerates rapidly at first and then slows over time, meaning some symbols/tickers will fit better than others.
Since the logarithmic regression depends on swing values, each new value will change the calculation. A well-fitted model could not fit anymore in the future.
Users have to check the validity of swings; for example, if the direction of swings is downwards, then the dataset is not fitted for logarithmic regression.
In the example above, the "Threshold" is lowered. However, the calculated levels are unreliable due to the swings, which do not fit the model well.
Here, the combination of downward bottom swings and price accelerates slower at first and faster recently, resulting in a non-fit for the logarithmic regression model.
Note the price value (white line) is bound to a limit of 150 (upwards) and -150 (down)
In short, logarithmic regression is best used when there are enough tops/bottoms, and all tops are around 100, and all bottoms around 0.
Also, note that this indicator has been developed for a daily (or higher) timeframe chart.
🔶 DETAILS
In mathematics, the dot product or scalar product is an algebraic operation that takes two equal-length sequences of numbers (arrays) and returns a single number, the sum of the products of the corresponding entries of the two sequences of numbers.
The usual way is to loop through both arrays and sum the products.
In this case, the two arrays are transformed into a matrix, wherein in one matrix, a single column is filled with the first array values, and in the second matrix, a single row is filled with the second array values.
After this, the function matrix.mult() returns a new matrix resulting from the product between the matrices m1 and m2.
Then, the matrix.eigenvalues() function transforms this matrix into an array, where the array.sum() function finally returns the sum of the array's elements, which is the dot product.
dot(x, y)=>
if x.size() > 1 and y.size() > 1
m1 = matrix.new()
m2 = matrix.new()
m1.add_col(m1.columns(), y)
m2.add_row(m2.rows (), x)
m1.mult (m2)
.eigenvalues()
.sum()
🔶 SETTINGS
Threshold: Period used for the swing detection, with higher values returning longer-term Swing Levels.
Proactive: Tentative Swings are included with this setting enabled.
Style: Color Settings
Dashboard: Toggle, "Location" and "Text Size"
EZ Trend IndicatorMade this to help me not be a bozo and to stick to the trend
I like taking the labels off
cheers
Big Money by ChartedhighsBig Money by Chartedhighs
Script Overview:
The "Big Money" indicator is designed to help traders easily identify significant price movements on their charts. This script visually highlights candles where the price change from open to close exceeds a user-defined threshold. It draws attention to these key moments, providing a clear indication of potential big-money moves in the market.
Key Features:
Customizable Threshold:
Allows users to set a specific price change threshold via the input menu (Highlight Threshold).
Only candles with a price change greater than or equal to this value are highlighted.
Candle Highlighting:
Uses color-coded bars to emphasize candles meeting the threshold condition.
Candles are highlighted in yellow for immediate visual clarity.
Dynamic Box Annotation:
Draws a semi-transparent yellow box around highlighted candles.
Extends the box dynamically to subsequent bars, providing an area of interest for continued analysis.
Labeling for Key Moments:
Automatically adds a label ("BigMoney") above highlighted bars to further indicate significant price action.
How It Works:
The script calculates the price change for each bar (close - open) and compares it to the user-defined threshold.
If the price change meets or exceeds the threshold:
The bar color changes to yellow.
A box is drawn around the candle to highlight the price movement visually.
A label is added above the candle to emphasize its significance.
The box extends dynamically until the next highlighted candle, allowing users to track zones of activity.
Customization Options:
Highlight Threshold: Modify the threshold value to suit your trading style or instrument volatility.
Use Case:
This indicator is ideal for traders looking to identify significant price movements quickly. It helps to locate areas where "big money" might be flowing into the market, offering potential entry or exit opportunities.
How to Use:
Add the "Big Money by Chartedhighs" script to your TradingView chart.
Set the Highlight Threshold to a value suitable for your market or timeframe.
Observe highlighted candles and boxes for potential trading signals or areas of interest.
This script is highly visual, intuitive, and customizable, making it a great addition to any trader's toolkit!
SUHAIL Trend Levels [BigBeluga]+ percent trendthis indicator is the best indicator and all market works great working. money flow
MicuRobert EMA Cross StrategyThis is a repost of a old strategy that cant be updated anymore, it was a request for a user made in Oct, 6, 2015
Here's a possible engaging description for the tradingview script:
**MicuRobert EMA Cross V2: A Powerful Trading Strategy**
Join the ranks of successful traders with this advanced strategy, designed to help you profit from market trends. The MicuRobert EMA Cross V2 combines two essential indicators - Exponential Moving Average (EMA) and Divergence EMA (DEMA) - to generate buy and sell signals.
**Key Features:**
* **Trading Session Filter**: Only trade during your preferred session, ensuring you're in sync with market conditions.
* **Trailing Stop**: Automatically adjust stop-loss levels to lock in profits or limit losses.
* **Customizable Trade Size**: Set the size of each trade based on your risk tolerance and trading goals.
**How it Works:**
The script uses two EMAs (5-period and 34-period) to identify trends. When the shorter EMA crosses above the longer one, a buy signal is generated. Conversely, when the shorter EMA falls below the longer one, a sell signal is triggered. The strategy also incorporates divergence analysis between price action and the EMAs.
**Visual Aids:**
* **EMA Plots**: Visualize the two EMAs on your chart to gauge market momentum.
* **Buy/Sell Signals**: See when buy or sell signals are generated, along with their corresponding entry prices.
* **Trailing Stop Lines**: Monitor stop-loss levels as they adjust based on price action.
**Get Started:**
Download this script and start trading like a pro! With its robust features and customizable settings, the MicuRobert EMA Cross V2 is an excellent addition to any trader's arsenal.
~Llama3
Loacally Weighted MA (LWMA) Direction HistogramThe Locally Weighted Moving Average (LWMA) Direction Histogram indicator is designed to provide traders with a visual representation of the price momentum and trend direction. This Pine Script, written in version 6, calculates an LWMA by assigning higher weights to recent data points, emphasizing the most current market movements. The script incorporates user-defined input parameters, such as the LWMA length and a direction lookback period, making it flexible to adapt to various trading strategies and preferences.
The histogram visually represents the difference between the current LWMA and a previous LWMA value (based on the lookback period). Positive values are colored blue, indicating upward momentum, while negative values are yellow, signaling downward movement. Additionally, the script colors candlesticks according to the histogram's value, enhancing clarity for users analyzing market trends. The LWMA line itself is plotted on the chart but hidden by default, enabling traders to toggle its visibility as needed. This blend of histogram and candlestick visualization offers a comprehensive tool for identifying shifts in momentum and potential trading opportunities.
[blackcat] L1 Swing Reversal Oscillator█ OVERVIEW
The script defines a custom indicator called the "L1 Swing Reversal Oscillator," which integrates moving averages and RSI to detect possible swing reversals in market trends. Its core purpose is to produce signals derived from the oscillator's indications of overbought or oversold states.
█ LOGICAL FRAMEWORK
The script comprises multiple key segments:
1 — Custom Functions: Encompasses calculate_weighted_moving_average and calculate_l1_swing_reversal_oscillator.
2 — Input Parameters: Permits customization of moving average lengths and weights alongside RSI settings.
3 — Calculations: Employs predefined functions to determine oscillator readings.
4 — Plot Statements: Depicts oscillator outputs graphically on the chart.
Data processing follows this sequence: initial computation of the typical price, subsequent derivation of the adjusted CC1 metric, additional smoothing operations, and finally, RSI evaluation prior to plotting the resultant oscillator figures.
█ CUSTOM FUNCTIONS
• calculate_weighted_moving_average(source, length, weight) : Generates a weighted moving average from the provided source material utilizing specified duration and coefficient inputs.
– Returns computed weighted moving average.
• calculate_l1_swing_reversal_oscillator(close_price, high_price, low_price, sma_length, sma_weight, rsi_length) : Assesses the L1 Swing Reversal Oscillator leveraging closing, highest, and lowest prices along with defined SMA span, weighting factor, and RSI period.
– Yields an array featuring central CC1, CB1, CB2, and RSI metrics.
█ KEY POINTS AND TECHNIQUES
• Weighted Moving Average: Incorporates bespoke functionality for computing weighted moving averages, distinct from built-in Pine Script methods.
• RSI Calculation: Employs customized logic for calculating Relative Strength Index, offering adaptable computational approaches.
• Plotting Techniques: Implements color coding contingent upon oscillator values to emphasize visual cues regarding overbought and oversold statuses.
• Optimization: Furnishes adjustable parameters including SMA timeframe, weightage, and RSI interval enabling personalized fine-tuning per user requirements.
█ EXTENDED KNOWLEDGE AND APPLICATIONS
• Modifications: Potential enhancements involve integrating supplementary oscillators like MACD or Stochastic Oscillator alongside the existing L1 Swing Reversal Oscillator.
• Application Scenarios: Comparable methodologies can be adopted within various trading frameworks focusing on momentum shifts such as trend-following or mean reversion tactics.
• Related Concepts: Proficiency in crafting custom functions, manipulating moving averages, and interpreting RSI within Pine Script environment proves advantageous when altering or expanding on current script functionalities. Understanding utilization of nz and na functions for managing null data points adds significant depth.
Support and Resistance LinesDraw the last 5 support and resistance lines. It works on the current timeframe. You can adjust the sensibility by changing the diff variable.
6 EMAs + SR ChannelsJust added 4 EMAs in the already available SR Channel indicator by LonesomeTheBlue.
DemaRSI StrategyThis is a repost to a old script that cant be updated anymore, the request was made on Feb, 27, 2016.
Here's a engaging description for the tradingview script:
**DemaRSI Strategy: A Proven Trading System**
Join thousands of traders who have already experienced the power of this highly effective strategy. The DemaRSI system combines two powerful indicators - DEMA (Double Exponential Moving Average) and RSI (Relative Strength Index) - to generate profitable trades with minimal risk.
**Key Features:**
* **Trend-Following**: Our algorithm identifies strong trends using a combination of DEMA and RSI, allowing you to ride the waves of market momentum.
* **Risk Management**: The system includes built-in stop-loss and take-profit levels, ensuring that your gains are protected and losses are minimized.
* **Session-Based Trading**: Trade during specific sessions only (e.g., London or New York) for even more targeted results.
* **Customizable Settings**: Adjust the length of moving averages, RSI periods, and other parameters to suit your trading style.
**What You'll Get:**
* A comprehensive strategy that can be used with any broker or platform
* Easy-to-use interface with customizable settings
* Real-time performance metrics and backtesting capabilities
**Start Trading Like a Pro Today!**
This script is designed for intermediate to advanced traders who want to take their trading game to the next level. With its robust risk management features, this strategy can help you achieve consistent profits in various market conditions.
**Disclaimer:** This script is not intended as investment advice and should be used at your own discretion. Trading carries inherent risks, and losses are possible.
~Llama3
GainzAlgo Pro// © GainzAlgo
//@version=5
indicator('GainzAlgo Pro', overlay=true, max_labels_count=500)
candle_stability_index_param = input.float(0.5, 'Candle Stability Index', 0, 1, step=0.1, group='Technical', tooltip='Candle Stability Index measures the ratio between the body and the wicks of a candle. Higher - more stable.')
rsi_index_param = input.int(50, 'RSI Index', 0, 100, group='Technical', tooltip='RSI Index measures how overbought/oversold is the market. Higher - more overbought/oversold.')
candle_delta_length_param = input.int(5, 'Candle Delta Length', 3, group='Technical', tooltip='Candle Delta Length measures the period over how many candles the price increased/decreased. Higher - longer period.')
disable_repeating_signals_param = input.bool(true, 'Disable Repeating Signals', group='Technical', tooltip='Removes repeating signals. Useful for removing clusters of signals and general clarity')
GREEN = color.rgb(29, 255, 40)
RED = color.rgb(255, 0, 0)
TRANSPARENT = color.rgb(0, 0, 0, 100)
label_size = input.string('normal', 'Label Size', options= , group='Cosmetic')
label_style = input.string('text bubble', 'Label Style', , group='Cosmetic')
buy_label_color = input(GREEN, 'BUY Label Color', inline='Highlight', group='Cosmetic')
sell_label_color = input(RED, 'SELL Label Color', inline='Highlight', group='Cosmetic')
label_text_color = input(color.white, 'Label Text Color', inline='Highlight', group='Cosmetic')
stable_candle = math.abs(close - open) / ta.tr > candle_stability_index_param
rsi = ta.rsi(close, 14)
bullish_engulfing = close < open and close > open and close > open
rsi_below = rsi < rsi_index_param
decrease_over = close < close
bull = bullish_engulfing and stable_candle and rsi_below and decrease_over and barstate.isconfirmed
bearish_engulfing = close > open and close < open and close < open
rsi_above = rsi > 100 - rsi_index_param
increase_over = close > close
bear = bearish_engulfing and stable_candle and rsi_above and increase_over and barstate.isconfirmed
var last_signal = ''
if bull and (disable_repeating_signals_param ? (last_signal != 'buy' ? true : na) : true)
if label_style == 'text bubble'
label.new(bull ? bar_index : na, low, 'BUY', color=buy_label_color, style=label.style_label_up, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bull ? bar_index : na, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_triangleup, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bull ? bar_index : na, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_arrowup, textcolor=TRANSPARENT, size=label_size)
last_signal := 'buy'
if bear and (disable_repeating_signals_param ? (last_signal != 'sell' ? true : na) : true)
if label_style == 'text bubble'
label.new(bear ? bar_index : na, high, 'SELL', color=sell_label_color, style=label.style_label_down, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_triangledown, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_arrowdown, textcolor=TRANSPARENT, size=label_size)
last_signal := 'sell'
alertcondition(bull, 'BUY Signals', 'New signal: BUY')
alertcondition(bear, 'SELL Signals', 'New signal: SELL')
IU Opening range Breakout StrategyIU Opening Range Breakout Strategy
This Pine Script strategy is designed to capitalize on the breakout of the opening range, which is a popular trading approach. The strategy identifies the high and low prices of the opening session and takes trades based on price crossing these levels, with built-in risk management and trade limits for intraday trading.
Key Features:
1. Risk Management:
- Risk-to-Reward Ratio (RTR):
Set a customizable risk-to-reward ratio to calculate target prices based on stop-loss levels.
Default: 2:1
- Max Trades in a Day:
Specify the maximum number of trades allowed per day to avoid overtrading.
Default: 2 trades in a day.
- End-of-Day Close:
Automatically closes all open positions at a user-defined session end time to ensure no overnight exposure.
Default: 3:15 PM
2. Opening Range Identification
- Opening Range High and Low:
The script detects the high and low of the first trading session using Pine Script's session functions.
These levels are plotted as visual guides on the chart:
- High: Lime-colored circles.
- Low: Red-colored circles.
3. Trade Entry Logic
- Long Entry:
A long trade is triggered when the price closes above the opening range high.
- Entry condition: Crossover of the price above the opening range high.
-Short Entry:
A short trade is triggered when the price closes below the opening range low.
- Entry condition: Crossunder of the price below the opening range low.
Both entries are conditional on the absence of an existing position.
4. Stop Loss and Take Profit
- Long Position:
- Stop Loss: Previous candle's low.
- Take Profit: Calculated based on the RTR.
- **Short Position:**
- **Stop Loss:** Previous candle's high.
- **Take Profit:** Calculated based on the RTR.
The strategy plots these levels for visual reference:
- Stop Loss: Red dashed lines.
- Take Profit: Green dashed lines.
5. Visual Enhancements
-Trade Level Highlighting:
The script dynamically shades the areas between the entry price and SL/TP levels:
- Red shading for the stop-loss region.
- Green shading for the take-profit region.
- Entry Price Line:
A silver-colored line marks the average entry price for active trades.
How to Use:
1.Input Configuration:
Adjust the Risk-to-Reward ratio, max trades per day, and session end time to suit your trading preferences.
2.Visual Cues:
Use the opening range high/low lines and shading to identify potential breakout opportunities.
3.Execution:
The strategy will automatically enter and exit trades based on the conditions. Review the plotted SL and TP levels to monitor the risk-reward setup.
Important Notes:
- This strategy is designed for intraday trading and works best in markets with high volatility during the opening session.
- Backtest the strategy on your preferred market and timeframe to ensure compatibility.
- Proper risk management and position sizing are essential when using this strategy in live markets.
Weighted Fourier Transform: Spectral Gating & Main Frequency🙏🏻 This drop has 2 purposes:
1) to inform every1 who'd ever see it that Weighted Fourier Tranform does exist, while being available nowhere online, not even in papers, yet there's nothing incredibly complicated about it, and it can/should be used in certain cases;
2) to show TradingView users how they can use it now in dem endevours, to show em what spectral filtering is, and what can they do with all of it in diy mode.
... so we gonna have 2 sections in the description
Section 1: Weighted Fourier Transform
It's quite easy to include weights in Fourier analysis: you just premultiply each datapoint by its corresponding weight -> feed to direct Fourier Transform, and then divide by weights after inverse Fourier transform. Alternatevely, in direct transform you just multiply contributions of each data point to the real and imaginary parts of the Fourier transform by corresponding weights (in accumulation phase), and in inverse transform you divide by weights instead during the accumulation phase. Everything else stays the same just like in non-weighted version.
If you're from the first target group let's say, you prolly know a thing or deux about how to code & about Fourier Transform, so you can just check lines of code to see the implementation of Weighted Discrete version of Fourier Transform, and port it to to any technology you desire. Pine Script is a developing technology that is incredibly comfortable in use for quant-related tasks and anything involving time series in general. While also using Python for research and C++ for development, every time I can do what I want in Pine Script, I reach for it and never touch matlab, python, R, or anything else.
Weighted version allows you to explicetly include order/time information into the operation, which is essential with every time series, although not widely used in mainstream just as many other obvious and right things. If you think deeply, you'll understand that you can apply a usual non-weighted Fourier to any 2d+ data you can (even if none of these dimensions represent time), because this is a geometric tool in essence. By applying linearly decaying weights inside Fourier transform, you're explicetly saying, "one of these dimensions is Time, and weights represent the order". And obviously you can combine multiple weightings, eg time and another characteristic of each datum, allows you to include another non-spatial dimension in your model.
By doing that, on properly processed (not only stationary but Also centered around zero data), you can get some interesting results that you won't be able to recreate without weights:
^^ A sine wave, centered around zero, period of 16. Gray line made by: DWFT (direct weighted Fourier transform) -> spectral gating -> IWFT (inverse weighted Fourier transform) -> plotting the last value of gated reconstructed data, all applied to expanding window. Look how precisely it follows the original data (the sine wave) with no lag at all. This can't be done by using non-weighted version of Fourier transform.
^^ spectral filtering applied to the whole dataset, calculated on the latest data update
And you should never forget about Fast Fourier Transform, tho it needs recursion...
Section 2: About use cases for quant trading, about this particular implementaion in Pine Script 6 (currently the latest version as of Friday 13, December 2k24).
Given the current state of things, we have certain limits on matrix size on TradingView (and we need big dope matrixes to calculate polynomial regression -> detrend & center our data before Fourier), and recursion is not yet available in Pine Script, so the script works on short datasets only, and requires some time.
A note on detrending. For quality results, Fourier Transform should be applied to not only stationary but also centered around zero data. The rightest way to do detrending of time series
is to fit Cumulative Weighted Moving Polynomial Regression (known as WLSMA in some narrow circles xD) and calculate the deltas between datapoint at time t and this wonderful fit at time t. That's exactly what you see on the main chart of script description: notice the distances between chart and WLSMA, now look lower and see how it matches the distances between zero and purple line in WFT study. Using residuals of one regression fit of the whole dataset makes less sense in time series context, we break some 'time' and order rules in a way, tho not many understand/cares abouit it in mainstream quant industry.
Two ways of using the script:
Spectral Gating aka Spectral filtering. Frequency domain filtering is quite responsive and for a greater computational cost does not introduce a lag the way it works with time-domain filtering. Works this way: direct Fourier transform your data to get frequency & phase info -> compute power spectrum out of it -> zero out all dem freqs that ain't hit your threshold -> inverse Fourier tranform what's left -> repeat at each datapoint plotting the very first value of reconstructed array*. With this you can watch for zero crossings to make appropriate trading decisions.
^^ plot Freq pass to use the script this way, use Level setting to control the intensity of gating. These 3 only available values: -1, 0 and 1, are the general & natural ones.
* if you turn on labels in script's style settings, you see the gray dots perfectly fitting your data. They get recalculated (for the whole dataset) at each update. You call it repainting, this is for analytical & aesthetic purposes. Included for demonstration only.
Finding main/dominant frequency & period. You can use it to set up Length for your other studies, and for analytical purposes simply to understand the periodicity of your data.
^^ plot main frequency/main period to use the script this way. On the screenshot, you can see the script applied to sine wave of period 16, notice how many datapoints it took the algo to figure out the signal's period quite good in expanding window mode
Now what's the next step? You can try applying signal windowing techniques to make it all less data-driven but your ego-driven, make a weighted periodogram or autocorrelogram (check Wiener-Khinchin Theorem ), and maybe whole shiny spectrogram?
... you decide, choice is yours,
The butterfly reflect the doors ...
∞
Multi TimeFrame OHLC Overlay @MaxMaseratiMulti TimeFrame OHLC Overlay @MaxMaserati
A powerful and versatile indicator that displays OHLC (Open, High, Low, Close) data across multiple timeframes with enhanced visualization features. Perfect for traders who need to analyze price action across different time periods simultaneously.
Key Features:
Customizable multi-timeframe OHLC visualization with box and line overlays
Extended OHLC lines from higher timeframes with clear labeling
Distinct bullish and bearish candle representations
Fully configurable color schemes and display options
Real-time timeframe information display
Main Components:
Multi-Timeframe Display
Primary timeframe OHLC visualization with boxes and lines
Extended timeframe overlay for broader market context
Clear visual distinction between timeframes
Customizable Visuals
Separate color settings for bullish and bearish patterns
Adjustable transparency for both body and wick components
Configurable OHLC line colors and visibility
Extended Lines Features
Higher timeframe OHLC level overlay
Custom labels with timeframe identification
Adjustable line properties and visibility
Information Display
Current timeframe indicator
Extended timeframe reference
Clean and unobtrusive interface
Settings Groups:
Extended OHLC Lines
Labels Options
Display Options
Bullish/Bearish Candle Settings
OHLC Lines Configuration
Usage Tips:
Start with the default 240-minute timeframe or adjust to your preferred interval
Use the extended lines feature to view higher timeframe levels
Customize colors and transparency to match your chart theme
Enable/disable specific components based on your analysis needs
Perfect For:
Multi-timeframe analysis
Support/Resistance identification
Price action trading
Trend following strategies
Market structure analysis
This indicator combines powerful multi-timeframe analysis capabilities with clean visualization, making it an essential tool for traders who need to maintain awareness of price action across different time periods.
Note:
For optimal performance, adjust the visual settings according to your chart's timeframe and color scheme. The indicator is designed to work seamlessly across all trading instruments and timeframes.
Price action|By Murat|Market Structure Break - Order Block - Breaker Block - Mitigation Block - ZigZag
[blackcat] L1 Enveloped Oscillator█ OVERVIEW
The script is an indicator named “ L1 Enveloped Oscillator” (L1 EO) designed to plot various trend and oscillator values on a separate chart pane. It calculates multiple indicators such as trend, adjusted trend, oscillator, directional strength, and normalized oscillator, and uses these to detect potential buy and sell signals based on trend contractions, expansions, and divergences.
█ LOGICAL FRAMEWORK
Structure:
1 — Input Parameters: None are explicitly defined, but the script is parameterized within the function with fixed values for levels and periods.
2 — Calculations: The calculate_l1_enveloped_oscillator function computes multiple values including price bases, trend, oscillator, and adjusted trends. This function uses built-in Pine Script functions like ta.highest, ta.lowest, ta.ema, ta.sma, and math.max.
3 — Plotting: The calculated values are plotted on the chart using the plot function, with different colors and styles for visual distinction.
4 — Signal Detection: The script detects and labels potential buy and sell signals based on trend contractions, expansions, and divergences between the price and oscillator.
5 — Conditional Statements: Multiple if statements are used to determine when to place labels for buy and sell signals.
█ CUSTOM FUNCTIONS
• calculate_l1_enveloped_oscillator(high, low, close, open): Calculates various trend and oscillator values based on the input price data.
— Parameters: high, low, close, open (price data).
— Return Values: A tuple containing top_level, bottom_level, middle_level, adjusted_trend, trend, oscillator, directional_strength, normalized_oscillator, and adjusted_candle_trend.
█ KEY POINTS AND TECHNIQUES
• Advanced Pine Script Features: Utilizes built-in functions for technical analysis (ta.highest, ta.lowest, ta.ema, ta.sma, ta.crossover, ta.crossunder).
• Optimization Techniques: Uses fixed periods and levels for calculations, which can be adjusted for different market conditions.
• Best Practices: Clearly separates calculations and plotting, making the script modular and easier to maintain.
• Unique Approaches: Combines multiple indicators (trend, oscillator, directional strength) to detect complex market conditions like divergences and contractions/expansions.
█ EXTENDED KNOWLEDGE AND APPLICATIONS
• Modifications: Users can modify the levels (top_level, bottom_level, middle_level) and periods used in calculations to better suit specific asset classes or market conditions.
• Extensions: The script can be extended to include additional indicators or signals, such as RSI or MACD, to enhance its predictive power.
• Application Scenarios: Similar techniques can be applied in other trading strategies involving trend analysis and divergence detection, such as momentum trading or mean reversion strategies.
• Related Concepts: Users can explore other Pine Script concepts like alerts, backtesting, and optimization to fine-tune strategies based on historical data.
srijeeva FVG Liquidity Sweep Strategy1. Rejecting Engulfing Entries and Rejection Wicks**
You're absolutely right: relying on engulfing candles or rejection wicks often increases stop-loss size, which directly impacts your **risk-reward ratio (RRR)**. If this conflicts with your tight and precise approach, it’s better to leave it out.
#### **Alternative Precision-Driven Entry Filter**
Instead of looking for engulfing patterns or rejections, consider the following filters that don’t expand your stop-loss size:
- **Momentum in the FVG**:
- Enter only when price moves **quickly into the second FVG** and shows a strong directional push as it exits the FVG.
- Avoid slow, choppy retraces, which often indicate weak intent or manipulation.
- Use the speed of the price as a proxy for rejection (without needing a wick confirmation).
- **Microstructure Breaks**:
- On the 1M chart, wait for a **microstructure break** after the price taps into the second FVG. For example:
- **Buy setup**: A higher high forms after the second FVG tap.
- **Sell setup**: A lower low forms after the second FVG tap.
**Why?** This ensures that your entry aligns with active momentum in the desired direction while keeping stops tight.
---
### **2. Hourly Trends vs. Intraday Sweeps**
You're spot-on: smaller timeframe sweeps (like your 2 FVG strategy) don’t always align with hourly or higher timeframe trends. Your strategy is designed for **microstructure reversals**, so relying on higher timeframe trends could conflict with the intended precision.
#### **Instead of Trend Filters, Use Structural Context**
Focus on the **local structure** of the 1M or 5M chart rather than the hourly trend. For instance:
- Only trade sweeps that occur near **key liquidity zones** (previous session highs/lows, Asia range, etc.).
- Avoid setups forming in the **middle of a range**, where liquidity is less predictable.
This approach ensures that you're not forcing trades based on broader trends while staying aligned with liquidity dynamics.
---
### **3. Refined Stop-Loss Placement**
The key to maintaining a good RRR with your strategy lies in **tight yet logical stop-loss placement**. Here’s how you can refine this:
- **Stop Placement Beyond the Sweep**:
- Instead of basing your stop strictly on the FVG, place it slightly beyond the **1H liquidity sweep level** that initiated your setup.
- Example for a buy setup: If the 1H low was swept at **1.2000**, your SL might go at **1.1998**, just under the sweep.
- **Dynamic Stop Refinement**:
- Once the price has moved in your favor and validated your FVG setup, move your stop-loss to **below/above the entry FVG zone**.
- This keeps risk tight while protecting against unnecessary losses if the setup fails.
---
### **4. High-Probability Time Windows**
Since you’re not relying on trends and your strategy thrives on sweeps, focusing on **time-based liquidity zones** is crucial. The best zones for EUR/USD are:
1. **London Close to NY Open Overlap** (9:30 AM–12:00 PM EST):
- High liquidity from the overlap often creates sharp sweeps and reversals.
2. **Post-Lunch Drift** (2:00 PM–3:30 PM EST):
- The market often performs "second phase" liquidity grabs as volatility tapers off.
Eliminating trades outside these zones could reduce noise and improve your strategy's win rate.
---
### **5. Avoid Over-Trading in Consolidation Zones**
One common issue with FVG setups is entering trades during **choppy consolidation periods**, which erode win rate.
#### **How to Spot and Avoid Choppy Conditions:**
- If the 1H chart shows overlapping candles with no clear liquidity zones being tested, avoid trading.
- Skip setups where the second FVG forms too close to the first FVG or a nearby liquidity pool (i.e., less than 5–7 pips away).
---
### **6. Refining the Second FVG Entry**
The second FVG is the core of your strategy, so refining its usage is key:
#### **What Makes a Strong Second FVG?**
- **Size Matters**: Smaller gaps are more reliable because they indicate controlled movement. Larger gaps (>5 pips on 1M) often result from impulsive moves that can reverse.
- **Clean Imbalance**: The second FVG should form with clean, consecutive candles. If the candles overlap excessively, the imbalance isn’t as significant, reducing the setup’s edge.
- **Location**: The second FVG should ideally form within 5–10 pips of the sweep level (not far above or below). This proximity increases its reliability.
---
### **7. Advanced Refinement: The Liquidity Check**
To filter out weak setups, add a **liquidity-check layer**:
- Before entering, ensure there’s a clear **liquidity target** nearby for the price to run toward (e.g., untested highs/lows on 1M or 5M).
- Avoid trades where the price has already tapped into multiple liquidity zones, as these often signal exhaustion.
---
### **8. Backtesting Insights for Improvement**
The best way to refine your strategy further is to:
- **Review Losses**: Study all losing trades to identify patterns. For example:
- Were they during low-volatility periods?
- Was there no clear liquidity target beyond the entry?
- Did the second FVG lack follow-through momentum?
- **Optimize Rules**: Focus on eliminating low-probability setups rather than trying to trade every potential opportunity.
---
### **What This Adds**
1. Keeps your **RRR high** by avoiding filters that increase stop size.
2. Aligns your **entry logic with local liquidity sweeps and microstructure**, not broader trends.
3. Focuses on **precision and efficiency**, ensuring fewer but higher-quality trades.
Shark Price & Bar Prediction
### Description for TradingView
**Shark Price & Bar Prediction Indicator**
The "Shark Price & Bar Prediction" indicator is designed to provide traders with insights into potential price movements based on local extremes in price action. Utilizing Volume Spread Analysis (VSA), this script identifies key price levels and generates predictive targets for bullish and bearish trends.
#### Features:
- **Local Extremes Detection**: Automatically finds the highest and lowest points within a specified prediction period.
- **Price Prediction**: Calculates potential bullish and bearish targets using Fibonacci levels.
- **Visual Signals**: Displays buy and sell signals directly on the chart, making it easy to identify entry points.
- **Customizable Settings**: Users can adjust the prediction period and confidence threshold to suit their trading style.
### How to Use:
1. **Settings**: Adjust the following inputs according to your preferences:
- **Prediction Period**: Set the number of bars to look back for local extremes.
- **Confidence Threshold**: Define the confidence level for predicting price targets.
- **Show Additional Labels**: Toggle additional labels for more detailed information on the chart.
2. **Interpreting Signals**:
- **Buy Signal**: When the closing price exceeds the bullish target, an upward arrow will appear below the bar, indicating a potential buying opportunity.
- **Sell Signal**: When the closing price falls below the bearish target, a downward arrow will appear above the bar, suggesting a potential selling opportunity.
3. **Visual Indicators**:
- The highest point is marked with a 🔴 **red circle**, while the lowest point is marked with a 🟢 **green circle**.
- Bullish targets are represented by a 🔵 **blue line**, and bearish targets are represented by a 🟣 **purple line**.
### Объяснение на русском
**Индикатор Прогнозирования Цены и Баров Shark**
Индикатор "Shark Price & Bar Prediction" предназначен для предоставления трейдерам информации о потенциальных ценовых движениях на основе локальных экстремумов в ценовом действии. Используя анализ объема и спреда (VSA), этот скрипт определяет ключевые уровни цен и генерирует прогнозные цели для бычьих и медвежьих трендов.
#### Особенности:
- **Обнаружение Локальных Экстремумов**: Автоматически находит максимальные и минимальные точки в заданный период прогнозирования.
- **Прогнозирование Цены**: Вычисляет потенциальные бычьи и медвежьи цели с использованием уровней Фибоначчи.
- **Визуальные Сигналы**: Отображает сигналы покупки и продажи непосредственно на графике, что облегчает определение точек входа.
- **Настраиваемые Параметры**: Пользователи могут регулировать период прогнозирования и уровень уверенности в соответствии со своим стилем торговли.
### Как использовать:
1. **Настройки**: Отрегулируйте следующие параметры в соответствии с вашими предпочтениями:
- **Период Прогнозирования**: Установите количество баров для поиска локальных экстремумов.
- **Порог Уверенности**: Определите уровень уверенности для прогнозирования ценовых целей.
- **Показать Дополнительные Метки**: Включите дополнительные метки для более детальной информации на графике.
2. **Интерпретация Сигналов**:
- **Сигнал Покупки**: Когда цена закрытия превышает бычью цель, под баром появится стрелка вверх, указывающая на потенциальную возможность покупки.
- **Сигнал Продажи**: Когда цена закрытия падает ниже медвежьей цели, над баром появится стрелка вниз, предлагающая потенциальную возможность продажи.
3. **Визуальные Индикаторы**:
- Максимальная точка обозначена 🔴 **красным кругом**, а минимальная точка — 🟢 **зеленым кругом**.
- Бычьи цели представлены 🔵 **синей линией**, а медвежьи цели — 🟣 **пурпурной линией**.
Price Volume TrendlineThe Price Volume Trendline indicator calculates and displays a linear regression trendline based on the product of volume and price (e.g., Volume * Close, Volume * Open, etc.) for a specified timeframe. The indicator helps visualize the relationship between price and volume movements over time.
Note - Please choose a timeframe to display the trendline.
Key Features:
Linear Regression: The trendline is computed using a linear regression of Volume * Price values over a user-defined length (length_trend), providing a smoothed representation of the trend.
Color Coding: The trendline color changes dynamically:
Green: When the slope of the trendline is positive (indicating an uptrend in Volume * Price).
Red: When the slope of the trendline is negative (indicating a downtrend in Volume * Price).
Customizable Timeframe: Users can choose the timeframe for the Volume * Price calculation (either "auto" for the chart's timeframe or a custom timeframe).
This indicator is useful for identifying long-term trends in the relationship between price and volume, highlighting bullish or bearish conditions based on both price and volume dynamics.
Please feel free to share your feedback. That would be appreciated!