Cycles
Dérivée seconde + cadran (pour l'inflation)Dérivée seconde + cadran (pour l'inflation)
En ce qui concerne l'inflation ce qui compte pour les marchés financiers ce n'est pas l'inflation moyenne c'est les variations de cette inflation ; ce qui l'intéresse est donc la dérivée seconde. (La variation du taux d'inflation).
Ensuite on prend une formule mathématique ou il compare l'inflation sur les deux dernières années à l'inflation sur les dix dernières années. Si l’inflation accélère de deux ans sur dix ans alors nous sommes dans les deux cadrans du haut.
Bitcoin Halving Dates by cryptanski//@version=5
indicator("Bitcoin Halving Dates", overlay=true)
// Даты халвингов
halving_dates = array.new_int()
array.push(halving_dates, timestamp(2012, 11, 28, 0, 0))
array.push(halving_dates, timestamp(2016, 7, 9, 0, 0))
array.push(halving_dates, timestamp(2020, 5, 11, 0, 0))
array.push(halving_dates, timestamp(2024, 4, 20, 0, 0)) // будущий халвинг
// Отображение линий
for i = 0 to array.size(halving_dates) - 1
line.new(x1=array.get(halving_dates, i), y1=high, x2=array.get(halving_dates, i), y2=low, width=2, color=color.blue, style=line.style_dashed)
label.new(array.get(halving_dates, i), high, "Halving", color=color.white, size=size.small, textcolor=color.blue, style=label.style_label_down)
DragonBandzv0_Hi All,
OK, the colored line is basically your macd (Moving average convergence/divergence) line. I took the coloring from the histogram and put it on the macd line, itself. That allows me to hide the signal and histogram lines.
White - increasing momentum up
Blue- decreasing momentum up
Red - increasing momentum down
Orange - decreasing momentum down
The volatility line is something I created. Basically....
Yellow - Bollinger bands are TIGHT showing low volatility before a breakout
Red - bands are WIDE showing high volatility before a pullback
Purple - somewhere in the middle, lol.
Top and bottom are the high and low of the previous 55 candles. It's controlled by the slowlength.
The period for the volatility and momentum zero line is the midlength.
The fastlength controls the period of the momentum wave, itself.
Smoothing is... smoothing, lol.
Everyone always gets stuck in money flow changing colors. That's NOT the basic strategy. The basic strategy is anticipating the PEAKS to trend before price starts trending. So, you kinda want to buy in the red, but when it makes higher lows. So, that's the anchor and trigger wave, and the smooth curving of the money flow curve.
So, I tried to give people the color changing thing on the momentum wave.
By Karatop420 (published on behalf of a friend)
3EMA + RSI with Trail Stop [TIA] TF30min v.5กำหนด EMA จำนวน 3 เส้น เพื่อใช้เป็น Strategy ในการเข้าออเดอร์ Long และ Short และใช้ RSI ด้วย
MY EMA921BUY AND SELL intraday, with indiacator trading dobodojdjohohodhob👋dh👋hdjpbo jodh👋dh👋doh👋dj u👋dh👋hd👋h👋dh👋dh👋u udjpjdojdpjpdjpsj
A Dũng sport RSI PK tăng giảm + biên 10-20-80-90Em Đoàn Ánh Dương
fb: https://www.( )facebook.com/anh.duong151199 ( bỏ ngoặc )
code tặng anh Dũng Sport chỉ báo RSI PK tăng giảm + biên 10-20-80-90
Time-based Alerts for Trading Windows🌟 Time-based Alerts for Trading Windows 🌐📈
This is a re-uploaded script as the previous one got hidden.
This Time-based Alerts for Trading Windows script is a highly customizable and reliable tool designed to assist traders in managing automated strategies or manually monitoring specific market conditions. Inspired by CrossTrade's Time-based Alert, this script is tailored for those who rely on precise time windows to trigger actions, such as sending webhook signals or managing Expert Advisors (EAs).
Whether you are a scalper, day trader, or algorithmic trader, this script empowers you to stay on top of your trades with fully customizable time-based alerts.
🛠️ Customizable Time Alerts
This indicator allows you to create up to 12 unique time windows by specifying the exact hour and minute for each alert. Each time window corresponds to an individual alert condition, making it perfect for managing trades during specific market sessions or key time periods.
For example:
Alert 1 can be set at 9:30 AM (market open).
Alert 2 can be set at 3:55 PM (just before market close).
Each alert can be toggled on or off in the indicator settings, allowing you to manage alerts without having to reconfigure your script.
You can adjust the colours to fit any colour scheme you like!
🕒 Odd and Even Time Alerts
The script comes with three built-in alert type categories:
Odd Alerts (marked with a green triangle on the chart): These correspond to odd-numbered inputs like Alert 1, Alert 3, Alert 5, and so on.
Even Alerts (marked with a red triangle on the chart): These correspond to even-numbered inputs like Alert 2, Alert 4, Alert 6, and so on.
You can also customize all 12 alerts individually to include a custom alert message
These alerts serve as a convenient way to differentiate between multiple trading strategies or market conditions. You can customize alert messages for odd and even alerts directly from TradingView’s alert panel.
🔗 Webhook Integration for Automation
This script is fully compatible with webhook-based automation. By configuring your alerts in TradingView, you can send signals to trading bots, EAs, or any third-party system. For example, you can:
Turn off an EA at a specific time (e.g., 3:55 PM EST).
Send buy/sell signals to your bot during predefined trading windows.
Simply use TradingView’s alert message editor to format webhook payloads for your automation system.
🌐 Timezone Flexibility
Trading happens across multiple time zones, and this script accounts for that. You can toggle between:
Eastern Time (New York): Ideal for most US-based markets.
Central Time (Exchange): Useful for futures and commodities traders.
This ensures your alerts are always in sync with your preferred time zone, eliminating confusion.
🎨 Visual Indicators
The script plots visual markers directly on your chart to indicate active alerts:
Up Facing Triangles: Represent odd-numbered alerts, providing a quick reference for these time windows.
Down Facing Triangles: Represent even-numbered alerts, helping you track different strategies or conditions.
These visual markers make it easy to see when alerts are triggered, even at a glance.
📈 Practical Use Case
Let’s say you’re trading the USTEC index on a 1-minute chart. You want to:
Turn off your trading bot at 16:55 EST to avoid after-market volatility.
Trigger a re-entry signal at 17:30 EST to capture moves during the Asian session.
Visually monitor these actions on your chart for easy reference.
This script makes it possible with precision alerts and webhook integration. Simply configure the time windows in the settings and set up your alerts in TradingView.
🚨 How to Set Up Alerts
Enable or Disable Alerts: Use the script’s settings to toggle specific alerts on or off as needed.
Set Custom Time Windows: Define the hour and minute for each alert in the settings panel.
Create Alerts in TradingView:
Go to the TradingView alert panel.
Select the condition (e.g., "Odd Time-based Alert (Green)" or "Even Time-based Alert (Red)").
Customize the alert message for webhook integration or personal notification.
Choose the trigger type: Once Per Bar or Once Per Bar Close to keep the alert active.
Integrate with Webhooks: Use the alert message field to format payloads for automation systems like MT4, MT5, or third-party bots.
📋 Key Notes
Alerts can trigger indefinitely if set to "Once Per Bar" or "Once Per Bar Close".
Always ensure the expiration date is set far in the future to avoid unexpected alert deactivation.
Test webhook messages and alert configurations thoroughly before using them in live trading.
This script is a powerful addition to your trading toolbox, offering precision, flexibility, and automation capabilities. Whether you’re turning off an EA, managing trades during market sessions, or automating strategies via webhooks, this script is here to support you.
Start using the Time-based Alerts for Trading Windows today and trade with confidence! 🚀✨
Float Turnover Signal
The *Float Turnover Signal* indicator helps traders analyze the relationship between price changes and trading volume relative to the stock's free float. It generates signals based on turnover ratios, providing insights into liquidity-driven price movements.
**How It Works**
- The indicator calculates the **percentage change** in closing price from two days ago to the previous day.
- It retrieves the **free float** (the number of publicly available shares) from TradingView.
- It then calculates the **turnover percentage**, which represents the previous day's trading volume as a percentage of the free float.
- The **turnover ratio** is derived by dividing the price change percentage by the turnover percentage.
- Based on this ratio, the indicator generates **color-coded signals**:
- 🟢 **Green Signal** – Indicates a balanced turnover ratio (0.8 to 1.2), suggesting a stable price-volume relationship.
- 🟡 **Yellow Signal** – Indicates a near-optimal but not perfect ratio (0.6-0.8 or 1.2-1.5), suggesting caution.
**Customization & Features**
✅ **Adjustable Signal Display** – Users can choose how many recent bars will display signals using the `"Number of Bars to Display Signal"` setting.
✅ **Works on Any Timeframe** – The indicator adapts to different chart resolutions.
✅ **Helps Identify Volume-Driven Moves** – Ideal for spotting potential breakouts, liquidity shifts, and confirming price action validity.
RoGr75 - Global Exchange Open/Close SignalsGlobal Exchange Open/Close Signals Indicator
This indicator helps traders track market hours for major global exchanges (NYSE, LSE, TSE, HKEX, and ASX) with these key features:
• Real-time Status Dashboard: Shows which exchanges are currently open/closed with an easy-to-read color-coded display (Green = Open, Red = Closed)
• Visual Market Open/Close Signals: Displays gradient background lines when your selected exchange opens (green) or closes (red)
• Timezone Adjustment: Easily adapt the indicator to your local timezone using the UTC offset setting
Supported Exchanges and Trading Hours (UTC):
• NYSE: 13:30 - 20:00 (9:30 AM - 4:00 PM ET)
• LSE: 08:00 - 16:30 (8:00 AM - 4:30 PM London)
• TSE: 00:00 - 06:30 (9:00 AM - 3:30 PM Tokyo)
• HKEX: 01:30 - 08:00 (9:30 AM - 4:00 PM HK)
• ASX: 00:00 - 06:00 (10:00 AM - 4:00 PM Sydney)
Settings:
• Select Exchange: Choose which exchange to monitor for open/close signals
• Show Dashboard: Toggle the exchange status dashboard on/off
• User Timezone Offset: Adjust the display to your local timezone (in UTC)
Use Cases:
• Monitor multiple exchange hours simultaneously
• Get visual alerts for market opens and closes
• Coordinate trading across different time zones
• Plan entries and exits around market hours
• Manage global trading portfolios effectively
Note: The indicator handles timezone conversions and markets crossing midnight automatically. Times are based on standard trading sessions and may not reflect holidays or special trading hours.
Bitcoin Log Growth Curve OscillatorThis script presents the oscillator version of the Bitcoin Logarithmic Growth Curve 2024 indicator, offering a new perspective on Bitcoin’s long-term price trajectory.
By transforming the original logarithmic growth curve into an oscillator, this version provides a normalized view of price movements within a fixed range, making it easier to identify overbought and oversold conditions.
For a comprehensive explanation of the mathematical derivation, underlying concepts, and overall development of the Bitcoin Logarithmic Growth Curve, we encourage you to explore our primary script, Bitcoin Logarithmic Growth Curve 2024, available here . This foundational script details the regression-based approach used to model Bitcoin’s long-term price evolution.
Normalization Process
The core principle behind this oscillator lies in the normalization of Bitcoin’s price relative to the upper and lower regression boundaries. By applying Min-Max Normalization, we effectively scale the price into a bounded range, facilitating clearer trend analysis. The normalization follows the formula:
normalized price = (upper regresionline − lower regressionline) / (price − lower regressionline)
This transformation ensures that price movements are always mapped within a fixed range, preventing distortions caused by Bitcoin’s exponential long-term growth. Furthermore, this normalization technique has been applied to each of the confidence interval lines, allowing for a structured and systematic approach to analyzing Bitcoin’s historical and projected price behavior.
By representing the logarithmic growth curve in oscillator form, this indicator helps traders and analysts more effectively gauge Bitcoin’s position within its long-term growth trajectory while identifying potential opportunities based on historical price tendencies.
Buy on VolumeThis script has several weaknesses:
1. **Overly Simplistic Logic** – The buy signal is based on just two conditions (DEMA crossing above a Lorentzian Line and a volume spike), which may not be robust enough for real trading conditions.
2. **Lack of Sell Signals** – The script only focuses on buy signals without any exit strategy, making it incomplete for practical trading.
3. **Volume Confirmation May Be Unreliable** – The threshold for volume confirmation (50% above average) is arbitrary and may produce frequent false positives or fail in low-liquidity conditions.
4. **No Risk Management** – There is no stop-loss, take-profit, or risk-adjustment mechanism, making it unsuitable for serious trading.
5. **Potential for Late Entries** – The reliance on moving averages (DEMA) can introduce lag, causing buy signals to appear late after a price move has already occurred.
6. **Limited Adaptability** – The fixed parameter settings (e.g., DEMA period of 6, Lorentzian length of 21) may not work across different market conditions or assets.
7. **No Consideration for Market Trends** – The script does not account for broader market trends, which could lead to poor entries in bearish conditions.
8. **Visual Clutter** – The plotted signals and indicators might create unnecessary chart noise, making it difficult to analyze price action effectively.
9. **Alert Spam Potential** – Without additional filtering conditions, the script may trigger frequent buy alerts, leading to signal fatigue.
Full Moon and New Moon IndicatorThe Full Moon & New Moon Indicator is a custom Pine Script indicator which marks Full Moon (Pournami) and New Moon (Amavasya) events on the price chart. This indicator helps traders who incorporate lunar cycles into their market analysis, as certain traders believe these cycles influence market sentiment and price action. The current script is added for the year 2024 and 2025 and the dates are considered as per the Telugu calendar.
Features
✅ Identifies and labels Full Moon & New Moon days on the chart for the year 2024 and 2025
How it Works!
On a Full Moon day, it places a yellow label ("Pournami") above the corresponding candle.
On a New Moon day, it places a blue label ("Amavasya") above the corresponding candle.
Example Usage
When a Full Moon label appears, check for potential trend reversals or high volatility.
When a New Moon label appears, watch for market consolidation or a shift in sentiment.
Combine with candlestick patterns, support/resistance, or momentum indicators for a stronger trading setup.
🚀 Add this indicator to your TradingView chart and explore the market’s reaction to lunar cycles! 🌕
US 20Y Treasury YieldWhat This Indicator Does
This Pine Script creates a custom indicator for TradingView that displays the US 20-Year Treasury Yield (US20Y) on your chart. Here's what it does step by step:
1. What Is the US 20-Year Treasury Yield?
The US 20-Year Treasury Yield is a financial metric that shows the interest rate (or yield) investors earn when they buy US government bonds that mature in 20 years. It’s an important indicator of the economy and can influence other markets like stocks, bonds, and currencies.
2. How Does the Indicator Work?
The indicator fetches the latest data for the US 20-Year Treasury Yield from TradingView's database.
It then plots this data in a separate pane below your main chart, so you can easily monitor the yield without cluttering your price chart.
3. What Does the Indicator Show?
A blue line is drawn in the separate pane, showing the movement of the US 20-Year Treasury Yield over time.
A gray dashed line is added at the 4.0% level as a reference point. You can use this line to quickly see when the yield is above or below 4.0%.
5. Why Use This Indicator?
Monitor Economic Trends : The US 20-Year Treasury Yield is a key economic indicator. By plotting it on your chart, you can stay informed about changes in interest rates and their potential impact on other markets.
[COG]StochRSI Zenith📊 StochRSI Zenith
This indicator combines the traditional Stochastic RSI with enhanced visualization features and multi-timeframe analysis capabilities. It's designed to provide traders with a comprehensive view of market conditions through various technical components.
🔑 Key Features:
• Advanced StochRSI Implementation
- Customizable RSI and Stochastic calculation periods
- Multiple moving average type options (SMA, EMA, SMMA, LWMA)
- Adjustable signal line parameters
• Visual Enhancement System
- Dynamic wave effect visualization
- Energy field display for momentum visualization
- Customizable color schemes for bullish and bearish signals
- Adaptive transparency settings
• Multi-Timeframe Analysis
- Higher timeframe confirmation
- Synchronized market structure analysis
- Cross-timeframe signal validation
• Divergence Detection
- Automated bullish and bearish divergence identification
- Customizable lookback period
- Clear visual signals for confirmed divergences
• Signal Generation Framework
- Price action confirmation
- SMA-based trend filtering
- Multiple confirmation levels for reduced noise
- Clear entry signals with customizable display options
📈 Technical Components:
1. Core Oscillator
- Base calculation: 13-period RSI (adjustable)
- Stochastic calculation: 8-period (adjustable)
- Signal lines: 5,3 smoothing (adjustable)
2. Visual Systems
- Wave effect with three layers of visualization
- Energy field display with dynamic intensity
- Reference bands at 20/30/50/70/80 levels
3. Confirmation Mechanisms
- SMA trend filter
- Higher timeframe alignment
- Price action validation
- Divergence confirmation
⚙️ Customization Options:
• Visual Parameters
- Wave effect intensity and speed
- Energy field sensitivity
- Color schemes for bullish/bearish signals
- Signal display preferences
• Technical Parameters
- All core calculation periods
- Moving average types
- Divergence detection settings
- Signal confirmation criteria
• Display Settings
- Chart and indicator signal placement
- SMA line visualization
- Background highlighting options
- Label positioning and size
🔍 Technical Implementation:
The indicator combines several advanced techniques to generate signals. Here are key components with code examples:
1. Core StochRSI Calculation:
// Base RSI calculation
rsi = ta.rsi(close, rsi_length)
// StochRSI transformation
stochRSI = ((ta.highest(rsi, stoch_length) - ta.lowest(rsi, stoch_length)) != 0) ?
(100 * (rsi - ta.lowest(rsi, stoch_length))) /
(ta.highest(rsi, stoch_length) - ta.lowest(rsi, stoch_length)) : 0
2. Signal Generation System:
// Core signal conditions
crossover_buy = crossOver(sk, sd, cross_threshold)
valid_buy_zone = sk < 30 and sd < 30
price_within_sma_bands = close <= sma_high and close >= sma_low
// Enhanced signal generation
if crossover_buy and valid_buy_zone and price_within_sma_bands and htf_allows_long
if is_bullish_candle
long_signal := true
else
awaiting_bull_confirmation := true
3. Multi-Timeframe Analysis:
= request.security(syminfo.tickerid, mtf_period,
)
The HTF filter looks at a higher timeframe (default: 4H) to confirm the trend
It only allows:
Long trades when the higher timeframe is bullish
Short trades when the higher timeframe is bearish
📈 Trading Application Guide:
1. Signal Identification
• Oversold Opportunities (< 30 level)
- Look for bullish crosses of K-line above D-line
- Confirm with higher timeframe alignment
- Wait for price action confirmation (bullish candle)
• Overbought Conditions (> 70 level)
- Watch for bearish crosses of K-line below D-line
- Verify higher timeframe condition
- Confirm with bearish price action
2. Divergence Trading
• Bullish Divergence
- Price makes lower lows while indicator makes higher lows
- Most effective when occurring in oversold territory
- Use with support levels for entry timing
• Bearish Divergence
- Price makes higher highs while indicator shows lower highs
- Most reliable in overbought conditions
- Combine with resistance levels
3. Wave Effect Analysis
• Strong Waves
- Multiple wave lines moving in same direction indicate momentum
- Wider wave spread suggests increased volatility
- Use for trend strength confirmation
• Energy Field
- Higher intensity in trading zones suggests stronger moves
- Use for momentum confirmation
- Watch for energy field convergence with price action
The energy field is like a heat map that shows momentum strength
It gets stronger (more visible) when:
Price is in oversold (<30) or overbought (>70) zones
The indicator lines are moving apart quickly
A strong signal is forming
Think of it as a "strength meter" - the more visible the energy field, the stronger the potential move
4. Risk Management Integration
• Entry Confirmation
- Wait for all signal components to align
- Use higher timeframe for trend direction
- Confirm with price action and SMA positions
• Stop Loss Placement
- Consider placing stops beyond recent swing points
- Use ATR for dynamic stop calculation
- Account for market volatility
5. Position Management
• Partial Profit Taking
- Consider scaling out at overbought/oversold levels
- Use wave effect intensity for exit timing
- Monitor energy field for momentum shifts
• Trade Duration
- Short-term: Use primary signals in trading zones
- Swing trades: Focus on divergence signals
- Position trades: Utilize higher timeframe signals
⚠️ Important Usage Notes:
• Avoid:
- Trading against strong trends
- Relying solely on single signals
- Ignoring higher timeframe context
- Over-leveraging based on signals
Remember: This tool is designed to assist in analysis but should never be used as the sole decision-maker for trades. Always maintain proper risk management and combine with other forms of analysis.
[SHORT ONLY] 10 Bar Low Pullback█ STRATEGY DESCRIPTION
The "10 Bar Low Pullback" strategy is a contrarian short trading system designed to capture pullbacks after a new 10‐bar low is made. it identifies a potential short opportunity when the current bar’s low breaks below the lowest low of the previous 10 bars, provided that the bar exhibits strong internal momentum as measured by its IBS value. An optional trend filter further refines entries by requiring that the close is below a 200-period EMA.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
ibs = (close - low) / (high - low)
- Low IBS (≤ 0.2): Indicates the close is near the bar's low, suggesting oversold conditions.
- High IBS (≥ 0.8): Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The current bar’s low is below the lowest low of the past X bars (default: 10).
The bar’s IBS is greater than the specified threshold (default: 0.85).
The signal occurs within the defined trading window (between Start Time and End Time).
If the EMA Filter is enabled, the close must be below the 200-period EMA.
2. EXIT CONDITION
An exit Signal is generated when the current close falls below the previous bar’s low (close < low ), indicating a potential bearish reversal and prompting the strategy to close its short position.
█ ADDITIONAL SETTINGS
Lookback Period: Defines the number of bars (default is 10) over which the lowest low is calculated.
IBS Threshold: Sets the minimum required IBS value (default is 0.85) to qualify as a pullback.
Trading Window: Trades are only executed between the user-defined Start Time and End Time.
EMA Filter (Optional): When enabled, short entries are only considered if the current close is below the 200-period EMA, with the EMA period being adjustable (default is 200).
█ PERFORMANCE OVERVIEW
Designed for shorting opportunities, this strategy aims to capture pullbacks following an aggressive 10-bar low break.
It leverages a combination of a lookback low and IBS measurement to identify overextended bullish moves that may revert.
The optional EMA filter helps confirm a bearish market environment by ensuring the price remains under the trend line.
Suitable for use on various assets, including stocks and ETFs, on daily or similar timeframes.
Backtesting and parameter optimization are recommended to tailor the strategy to specific market conditions.
[SHORT ONLY] ATR Sell the Rip Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "ATR Sell the Rip Mean Reversion Strategy" is a contrarian system that targets overextended price moves on stocks and ETFs. It calculates an ATR‐based trigger level to identify shorting opportunities. When the current close exceeds this smoothed ATR trigger, and if the close is below a 200-period EMA (if enabled), the strategy initiates a short entry, aiming to profit from an anticipated corrective pullback.
█ HOW IS THE ATR SIGNAL BAND CALCULATED?
This strategy computes an ATR-based signal trigger as follows:
Calculate the ATR
The strategy computes the Average True Range (ATR) using a configurable period provided by the user:
atrValue = ta.atr(atrPeriod)
Determine the Threshold
Multiply the ATR by a predefined multiplier and add it to the current close:
atrThreshold = close + atrValue * atrMultInput
Smooth the Threshold
Apply a Simple Moving Average over a specified period to smooth out the threshold, reducing noise:
signalTrigger = ta.sma(atrThreshold, smoothPeriodInput)
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The current close is above the smoothed ATR signal trigger.
The trade occurs within the specified trading window (between Start Time and End Time).
If the EMA filter is enabled, the close must also be below the 200-period EMA.
2. EXIT CONDITION
An exit Signal is generated when the current close falls below the previous bar’s low (close < low ), indicating a potential bearish reversal and prompting the strategy to close its short position.
█ ADDITIONAL SETTINGS
ATR Period: The period used to calculate the ATR, allowing for adaptability to different volatility conditions (default is 20).
ATR Multiplier: The multiplier applied to the ATR to determine the raw threshold (default is 1.0).
Smoothing Period: The period over which the raw ATR threshold is smoothed using an SMA (default is 10).
Start Time and End Time: Defines the time window during which trades are allowed.
EMA Filter (Optional): When enabled, short entries are only executed if the current close is below the 200-period EMA, confirming a bearish trend.
█ PERFORMANCE OVERVIEW
This strategy is designed for use on the Daily timeframe, targeting stocks and ETFs by capitalizing on overextended price moves.
It utilizes a dynamic, ATR-based trigger to identify when prices have potentially peaked, setting the stage for a mean reversion short entry.
The optional EMA filter helps align trades with broader market trends, potentially reducing false signals.
Backtesting is recommended to fine-tune the ATR multiplier, smoothing period, and EMA settings to match the volatility and behavior of specific markets.
[SHORT ONLY] Consecutive Bars Above MA Strategy█ STRATEGY DESCRIPTION
The "Consecutive Bars Above MA Strategy" is a contrarian trading system aimed at exploiting overextended bullish moves in stocks and ETFs. It monitors the number of consecutive bars that close above a chosen short-term moving average (which can be either a Simple Moving Average or an Exponential Moving Average). Once the count reaches a preset threshold and the current bar’s close exceeds the previous bar’s high within a designated trading window, a short entry is initiated. An optional EMA filter further refines entries by requiring that the current close is below the 200-period EMA, helping to ensure that trades are taken in a bearish environment.
█ HOW ARE THE CONSECUTIVE BULLISH COUNTS CALCULATED?
The strategy utilizes a counter variable, `bullCount`, to track consecutive bullish bars based on their relation to the short-term moving average. Here’s how the count is determined:
Initialize the Counter
The counter is initialized at the start:
var int bullCount = na
Bullish Bar Detection
For each bar, if the close is above the selected moving average (either SMA or EMA, based on user input), the counter is incremented:
bullCount := close > signalMa ? (na(bullCount) ? 1 : bullCount + 1) : 0
Reset on Non-Bullish Condition
If the close does not exceed the moving average, the counter resets to zero, indicating a break in the consecutive bullish streak.
█ SIGNAL GENERATION
1. SHORT ENTRY
A short signal is generated when:
The number of consecutive bullish bars (i.e., bars closing above the short-term MA) meets or exceeds the defined threshold (default: 3).
The current bar’s close is higher than the previous bar’s high.
The signal occurs within the specified trading window (between Start Time and End Time).
Additionally, if the EMA filter is enabled, the entry is only executed when the current close is below the 200-period EMA.
2. EXIT CONDITION
An exit signal is triggered when the current close falls below the previous bar’s low, prompting the strategy to close the short position.
█ ADDITIONAL SETTINGS
Threshold: The number of consecutive bullish bars required to trigger a short entry (default is 3).
Trading Window: The Start Time and End Time inputs define when the strategy is active.
Moving Average Settings: Choose between SMA and EMA, and set the MA length (default is 5), which is used to assess each bar’s bullish condition.
EMA Filter (Optional): When enabled, this filter requires that the current close is below the 200-period EMA, supporting entries in a downtrend.
█ PERFORMANCE OVERVIEW
This strategy is designed for stocks and ETFs and can be applied across various timeframes.
It seeks to capture mean reversion by shorting after a series of bullish bars suggests an overextended move.
The approach employs a contrarian short entry by waiting for a breakout (close > previous high) following consecutive bullish bars.
The adjustable moving average settings and optional EMA filter allow for further optimization based on market conditions.
Comprehensive backtesting is recommended to fine-tune the threshold, moving average parameters, and filter settings for optimal performance.
[SHORT ONLY] Consecutive Close>High[1] Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "Consecutive Close > High " Mean Reversion Strategy is a contrarian daily trading system for stocks and ETFs. It identifies potential shorting opportunities by counting consecutive days where the closing price exceeds the previous day's high. When this consecutive day count reaches a predetermined threshold, and if the close is below a 200-period EMA (if enabled), a short entry is triggered, anticipating a corrective pullback.
█ HOW ARE THE CONSECUTIVE BULLISH COUNTS CALCULATED?
The strategy uses a counter variable called `bullCount` to track how many consecutive bars meet a bullish condition. Here’s a breakdown of the process:
Initialize the Counter
var int bullCount = 0
Bullish Bar Detection
Every time the close exceeds the previous bar's high, increment the counter:
if close > high
bullCount += 1
Reset on Bearish Bar
When there is a clear bearish reversal, the counter is reset to zero:
if close < low
bullCount := 0
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The count of consecutive bullish closes (where close > high ) reaches or exceeds the defined threshold (default: 3).
The signal occurs within the specified trading window (between Start Time and End Time).
2. EXIT CONDITION
An exit Signal is generated when the current close falls below the previous bar’s low (close < low ), prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Threshold: The number of consecutive bullish closes required to trigger a short entry (default is 3).
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
EMA Filter (Optional): When enabled, short entries are only triggered if the current close is below the 200-period EMA.
█ PERFORMANCE OVERVIEW
This strategy is designed for Stocks and ETFs on the Daily timeframe and targets overextended bullish moves.
It aims to capture mean reversion by entering short after a series of consecutive bullish closes.
Further optimization is possible with additional filters (e.g., EMA, volume, or volatility).
Backtesting should be used to fine-tune the threshold and filter settings for specific market conditions.
[SHORT ONLY] Internal Bar Strength (IBS) Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "Internal Bar Strength (IBS) Strategy" is a mean-reversion strategy designed to identify trading opportunities based on the closing price's position within the daily price range. It enters a short position when the IBS indicates overbought conditions and exits when the IBS reaches oversold levels. This strategy is Short-Only and was designed to be used on the Daily timeframe for Stocks and ETFs.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
IBS = (Close - Low) / (High - Low)
- Low IBS (≤ 0.2) : Indicates the close is near the bar's low, suggesting oversold conditions.
- High IBS (≥ 0.8) : Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The IBS value rises to or above the Upper Threshold (default: 0.9).
The Closing price is greater than the previous bars High (close>high ).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
An exit Signal is generated when the IBS value drops to or below the Lower Threshold (default: 0.3). This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
Upper Threshold: The IBS level at which the strategy enters trades. Default is 0.9.
Lower Threshold: The IBS level at which the strategy exits short positions. Default is 0.3.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for Stocks and ETFs markets and performs best when prices frequently revert to the mean.
The strategy can be optimized further using additional conditions such as using volume or volatility filters.
It is sensitive to extreme IBS values, which help identify potential reversals.
Backtesting results should be analyzed to optimize the Upper/Lower Thresholds for specific instruments and market conditions.
IPO Date ScreenerThis script, the IPO Date Screener, allows traders to visually identify stocks that are relatively new, based on the number of bars (days) since their IPO. The user can set a custom threshold for the number of days (bars) after the IPO, and the script will highlight new stocks that fall below that threshold.
Key Features:
Customizable IPO Days Threshold: Set the threshold for considering a stock as "new." Since Pine screener limits number bars to 500, it will work for stocks having trading days below 500 since IPO which almost 2 years.
Column Days since IPO: Sort this column from low to high to see newest to oldest STOCK with 500 days of trading.
Since a watchlist is limited to 1000 stocks, use this pines script to screen stocks within the watch list having trading days below 500 or user can select lower number of days from settings.
This is not helpful to add on chart, this is to use on pine screener as utility.
2xSPYTIPS Strategy by Fra public versionThis is a test strategy with S&P500, open source so everyone can suggest everything, I'm open to any advice.
Rules of the "2xSPYTIPS" Strategy :
This trading strategy is designed to operate on the S&P 500 index and the TIPS ETF. Here’s how it works:
1. Buy Conditions ("BUY"):
- The S&P 500 must be above its **200-day simple moving average (SMA 200)**.
- This condition is checked at the **end of each month**.
2. Position Management:
- If leverage is enabled (**2x leverage**), the purchase quantity is increased based on a configurable percentage.
3. Take Profit:
- A **Take Profit** is set at a fixed percentage above the entry price.
4. Visualization & Alerts:
- The **SMA 200** for both S&P 500 and TIPS is plotted on the chart.
- A **BUY signal** appears visually and an alert is triggered.
What This Strategy Does NOT Do
- It does not use a **Stop Loss** or **Trailing Stop**.
- It does not directly manage position exits except through Take Profit.
Blockchain Fundamentals: Liquidity Cycle MomentumLiquidity Cycle Momentum Indicator
Overview:
This indicator analyzes global liquidity trends by calculating a unique Liquidity Index and measuring its year-over-year (YoY) percentage change. It then applies a momentum oscillator to the YoY change, providing insights into the cyclical momentum of liquidity. The indicator incorporates a limited historical data workaround to ensure accurate calculations even when the chart’s history is short.
Features Breakdown:
1. Limited Historical Data Workaround
Function: The limit(length) function adjusts the lookback period when there isn’t enough historical data (i.e., near the beginning of the chart), ensuring that calculations do not break due to insufficient data.
2. Global Liquidity Calculation
Data Sources:
TVC:CN10Y (10-year yield from China)
TVC:DXY (US Dollar Index)
ECONOMICS:USCBBS (US Central Bank Balance Sheet)
FRED:JPNASSETS (Japanese assets)
ECONOMICS:CNCBBS (Chinese Central Bank Balance Sheet)
FRED:ECBASSETSW (ECB assets)
Calculation Methodology:
A ratio is computed (cn10y / dxy) to adjust for currency influences.
The Liquidity Index is then derived by multiplying this ratio with the sum of the other liquidity components.
3. Year-over-Year (YoY) Percent Change
Computation:
The indicator determines the number of bars that approximately represent one year.
It then compares the current Liquidity Index to its value one year ago, calculating the YoY percentage change.
4. Momentum Oscillator on YoY Change
Oscillator Components:
1. Calculated using the Chande Momentum Oscillator (CMO) applied to the YoY percent change with a user-defined momentum length.
2. A weighted moving average (WMA) that smooths the momentum signal.
3. Overbought and Oversold zones
Signal Generation:
Buy Signal: Triggered when the momentum crosses upward from an oversold condition, suggesting a potential upward shift in liquidity momentum.
Sell Signal: Triggered when crosses below an overbought condition, indicating potential downward momentum.
State Management:
The indicator maintains a state variable to avoid repeated signals, ensuring that a new buy or sell signal is only generated when there’s a clear change in momentum.
5. Visual Presentation and Alerts
Plots:
The oscillator value and signalline are plotted for visual analysis.
Overbought and oversold levels are marked with dashed horizontal lines.
Signal Markers:
Buy and sell signals are marked with green and maroon circles, respectively.
Background Coloration:
Optionally, the chart’s background bars are colored (yellow for buy signals and fuchsia for sell signals) to enhance visual cues when signals are triggered.
Conclusion
In summary, the Liquidity Cycle Momentum Indicator provides a robust framework to analyze liquidity trends by combining global liquidity data, YoY changes, and momentum oscillation. This makes it an effective tool for traders and analysts looking to identify cyclical shifts in liquidity conditions and potential turning points in the market.