T3 with ArrowsThe arrows indicate trend reversals - first time closing below and first time closing above.
Bands and Channels
B-Xtrender By Neal inspired from @PuppytherapyThanks to @puppytherapy for creating the original B-Xtrender indicator, available at this link: B-Xtrender by @QuantTherapy
I played around the code to have entry and exit condition. The B-Xtrender @QuantTherapy
indicator is a momentum-based tool designed to help traders identify potential trade opportunities by tracking shifts in market momentum. Using a smoothed momentum oscillator, it detects changes in trend direction and provides clear signals for entry and exit points.
Features
Momentum Detection:
Tracks market momentum using the BX-Trender Oscillator.
Green bars indicate bullish momentum, while red bars indicate bearish momentum.
Lighter shades of green/red reflect weakening momentum.
Entry and Exit Signals:
Entry Condition: A long trade is triggered when the oscillator changes from red to green .
Exit Condition: A long trade exit is triggered when the oscillator changes from green to red .
Dynamic PnL Calculation:
Automatically calculates profit or loss in percentage (%) when a trade is exited.
Positive PnL values are prefixed with `+`, and negative values are shown as `-`.
Clear Visualization:
Bar chart-style oscillator in a separate pane for better trend visualization.
Trade labels on the main price chart for clear entry and exit points.
Inputs
Short-Term Momentum Parameters:
Short - L1: Length of the first EMA for short-term momentum calculations.
Short - L2: Length of the second EMA for short-term momentum calculations.
Short - L3: RSI smoothing period applied to the short-term momentum.
Long-Term Momentum Parameters:
Long - L1: Length of the EMA for long-term momentum calculations.
Long - L2: RSI smoothing period applied to the long-term momentum.
Entry and Exit Logic
Entry Condition:
A long trade is triggered when:
The BX-Trender Oscillator changes from red to green .
This shift indicates bullish momentum.
Exit Condition:
A long trade exit is triggered when:
The BX-Trender Oscillator changes from green to red .
This shift indicates a loss of bullish momentum or the start of bearish momentum.
PnL Calculation:
When exiting a trade, the indicator calculates the profit or loss as a percentage of the entry price.
Example:
A profit is displayed as +5.67% .
A loss is displayed as -3.21% .
Visualization
Oscillator Bars:
Green Bars: Represent increasing bullish momentum.
Light Green Bars: Represent weakening bullish momentum.
Red Bars: Represent increasing bearish momentum.
Light Red Bars: Represent weakening bearish momentum.
Just make sure that you checked off the B-Xtrend oscillator off from the style so chart can be active
Trade Labels:
Entry Labels: Displayed below the candle with the text Entry, long .
Exit Labels: Displayed above the candle with the text Exit .
Bar Chart Pane:
The oscillator is displayed in a separate pane for clear trend visualization.
Default Style
Oscillator Colors:
Green for bullish momentum.
Red for bearish momentum.
Light green and light red for weaker momentum.
Trade Labels:
Green labels for entries.
Red labels for exits, with percentage PnL displayed.
Use Cases
Momentum-Based Entries:
Detects shifts in momentum from bearish to bullish for precise trade entry points.
Trend Reversal Detection:
Identifies when bullish momentum weakens, signaling an exit opportunity.
Visual Simplicity:
Offers an intuitive way to track trends with its bar chart-style oscillator and clear trade labels.
This indicator doesn't indicate that it will work perfectly. More updates on the way.
Adaptive Linear Regression ChannelOverview
The Adaptive Linear Regression Channel Script is an advanced, multi-functional trading tool crafted to help traders pinpoint market trends, identify potential reversals, assess volatility, and establish dynamic levels for profit-taking and position exits. By incorporating key concepts such as linear regression , standard deviation , and other volatility measures like the ATR , the script offers a comprehensive view of market behavior beyond traditional deviation metrics.
This dynamic model continuously adapts to changing market conditions, adjusting in real-time to provide clear visualizations of trends, channels, and volatility levels. This adaptability makes the script invaluable for both trend-following and counter-trend strategies, giving traders the flexibility to respond effectively to different market environments.
Background
What is Linear Regression?
Definition : Linear regression is a statistical technique used to model the relationship between a dependent variable (target) and one or more independent variables (predictors).
In its simplest form (simple linear regression), the relationship between two variables is represented by a straight line (the regression line).
y = mx + b
where :
- y is the target variable (price)
- m is the slope
- x is the independent variable (time)
- b is the intercept
Slope of the Regression Line
Definition: The slope (m) measures the rate at which the dependent variable (y) changes as the independent variable (x) changes.
Interpretation:
- A positive slope indicates an uptrend.
- A negative slope indicates a downtrend.
Uses in Trading:
- Identifying the strength and direction of market trends.
- Assessing the momentum of price movements.
R-squared (Coefficient of Determination)
Definition: A measure of how well the regression line fits the data, ranging from 0 to 1.
Calculation :
R2 = 1− (SS tot/SS res)
where:
- SSres is the sum of squared residuals.
- SStot is the total sum of squares.
Interpretation:
- Higher R2 indicates a better fit, meaning the model explains a larger proportion of the variance in the data.
Uses in Trading:
- Higher R-squared values give traders confidence in trend-based signals.
- Low R-squared values may suggest that the market is more random or volatile.
Standard Deviation
Definition: Standard Deviation quantifies the dispersion of data points in a dataset relative to the mean. A low standard deviation indicates that data points tend to be close to the mean, while a high standard deviation indicates that the data points are spread out over a larger range of values.
Calculation
σ=√∑(xi−μ)2/N
Where
- σ is the standard deviation.
- ∑ is the summation symbol, indicating that the expression that follows should be summed over all data points.
- xi, this represents the i-th data point in the dataset.
- μ\mu, this represents the mean(average) of all the data points in the dataset.
- (xi−μ)2, this is the squared difference between each data point and the mean.
- N is the total number of data points in the dataset.
- **Interpretation**
- A higher standard deviation indicates greater volatility.
- Useful for identifying overbought/oversold conditions in markets.
Key Features
Dynamic Linear Regression Channels:
The script automatically generates adaptive regression channels that expand or contract based on the current market volatility. This real-time adjustment ensures that traders are always working with the most relevant data, making it easier to spot key support and resistance levels.
The channel width itself serves as an indicator of market volatility, expanding during periods of heightened uncertainty and contracting during more stable phases. Additionally, the channel width is trained on previous channel widths , allowing the script to adapt and provide a more accurate view of volatility trends of the asset. Traders can also customize the script to train on less historical data , enabling a more recent view of volatility , which is particularly useful in fast-moving or changing markets.
Dynamic Profits and Stops:
What is it?
Dynamic profit levels allow traders to adjust take-profit targets based on real-time market conditions. Unlike static levels, which remain fixed regardless of market changes, these adaptive levels leverage past volatility data to create more flexible profit-taking strategies.
How does it work?
The script determines these levels using previously stored deviation values. These deviations are categorized into quantiles (like Q1, Q2, Q3, etc.) to classify current market conditions. As new deviation data is recorded, the profit levels are adjusted dynamically to reflect changes in market volatility. This approach helps to refine profit targets, especially when using regression channels with standard deviation rather than traditional ATR bands.
Why is it valuable?
By utilizing adaptive profit levels, traders can optimize their exits based on the current volatility landscape. For instance, when volatility increases, the dynamic levels expand, allowing trades to capture larger price movements. Conversely, during low volatility, profit targets tighten to lock in gains sooner, reducing exposure to market reversals. This flexibility is especially beneficial when combined with adaptive regression channels that respond to changes in standard deviation.
Slope-Based Trend Analysis:
One of the core elements of this script is the slope of the regression line , which helps define the direction and strength of the trend. Positive slopes indicate bullish momentum, while negative slopes suggest bearish conditions. The slope's steepness gives traders insight into the market's momentum, allowing them to adjust their strategies based on the strength of the trend.
Additionally, the script uses the slope to create a color gradient , which visually represents the intensity of the market's momentum. The gradient peaks at one color to show the maximum bullish momentum experienced in the past, while another color represents the maximum bearish momentum experienced in the past. This color-coded visualization makes it easier for traders to quickly assess the market's strength and direction at a glance.
Volatility Heatmap:
The integrated heatmap provides an intuitive, color-coded visualization of market volatility. The heatmap highlights areas where price action is expanding or contracting, giving traders a clear view of where volatility is rising or falling. By mapping out deviations from the regression line, the heatmap makes it easier to spot periods of high volatility that could lead to major market moves or potential reversals.
Deviation Concepts:
The script tracks price deviations from the regression line when a new range is formed, providing valuable insights when the price significantly deviates from the expected trend. These deviations are key in identifying potential breakout points or trend shifts .
This helps traders understand when the market is overextended or when a pullback may be imminent, allowing them to make more informed trading decisions.
Adaptive Model Properties:
Unlike static indicators, this script adapts over time . As the market changes, it stores historical data related to channel widths , slope dynamics , and volatility levels , adjusting its analysis accordingly to stay relevant to current market conditions.
Traders have the ability to train the model on all available data or specify a set number of bars to focus on more recent market activity. This flexibility allows for more tailored analysis , ensuring that traders can work with data that best fits their trading style and time horizon.
This continuous learning approach ensures that traders always have the most up-to-date insight into the market's structure.
Table
The table displays key metrics in real time to provide deeper insights into market behavior:
1. Deviation & Slope : Shows the current deviation if set to standard deviation or atr if set to atr(values used to calculated the channel widths) and the trend slope, helping to gauge market volatility and trend direction.
2. Rate of Change : For both deviation/atr and slope, the table also calculates the rate of change of their rates—essentially capturing the acceleration or deceleration of trends and volatility. This helps identify shifts in market momentum early.
3. R-squared : Indicates the strength and reliability of the trend fit. A higher value means the regression line better explains the price movements.
4. Quantiles : Uses historical deviation data to categorize current market conditions into quartiles (e.g., Q1, Q2, Q3). This helps classify the market's current volatility level, allowing traders to adjust strategies dynamically.
By combining these metrics, the table offers a comprehensive, real-time snapshot of market conditions, enabling more informed and adaptive trading decisions.
Settings
Here’s a breakdown of the script's settings for easy reference:
Linear Regression Settings
Show Dynamic Levels :Toggle to display dynamic profit levels on the chart.
Deviation Type :Select the method for calculating deviation—options include ATR (Average True Range) or Standard Deviation.
Timeframe :Sets the specific timeframe for the regression analysis (default is the chart’s timeframe).
Period :Defines the number of bars used for calculating the regression line (e.g., 50 bars).
Deviation Multiplier :Multiplier used to adjust the width of the deviation channel around the regression line.
Rate of Change :Sets the period for calculating the rate of change of the slope (used for momentum analysis).
Max Bars Back :Limits the number of historical bars to analyze (0 means all available data).
Slope Lookback :Number of bars used to calculate the slope gradient for trend detection.
Slope Gradient Display :Toggle to enable gradient coloring based on slope direction.
Slope Gradient Colors :Set colors for positive and negative slopes, respectively.
Slope Fill :Adjusts the transparency of the slope gradient fill.
Volatility Gradient Display :Toggle to enable gradient coloring based on volatility levels.
Volatility Gradient Colors :Set colors for low and high volatility, respectively.
Volatility Fill :Adjusts the transparency of the volatility gradient fill.
Table Settings
Show Table :Toggle to display the metrics table on the chart.
Table Position :Choose where to position the table (e.g., top-right, middle-center, etc.).
Font Size :Set the size of the text in the table. Options include Tiny, Small, Normal, Large, and Huge.
Support & resistance - DHJ : BUY/SELL Signal//@version=5
indicator(" Support & resistance - DHJ : Support/Resistance, EMA Crossover, Previous Day High/Low", shorttitle = "Support & resistance - DHJ", overlay=true, max_boxes_count=50)
// User Inputs
int lookbackPeriod = input.int(20, "Lookback Period", minval=1, group="Settings")
int vol_len = input.int(2, "Delta Volume Filter Length", tooltip="Higher input, will filter low volume boxes", group="Settings")
float box_withd = input.float(1, "Adjust Box Width", maxval=1000, minval=0, step=0.1, group="Settings")
// Define the EMAs
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
// Plot the EMAs
plot(ema9, color=color.blue, linewidth=1)
plot(ema21, color=color.red, linewidth=1)
// Crossover conditions
longCondition = ta.crossover(ema9, ema21)
shortCondition = ta.crossunder(ema9, ema21)
// Plot buy/sell signals
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Previous day high and low
var float pdHigh = na
var float pdLow = na
if (ta.change(time("1D")))
pdHigh := high
pdLow := low
plot(pdHigh, color=color.green, linewidth=1, title="Previous Day High")
plot(pdLow, color=color.red, linewidth=1, title="Previous Day Low")
// Delta Volume Function
upAndDownVolume() =>
posVol = 0.0
negVol = 0.0
var isBuyVolume = true
switch
close > open => isBuyVolume := true
close < open => isBuyVolume := false
if isBuyVolume
posVol += volume
else
negVol -= volume
posVol + negVol
// Function to identify support and resistance boxes
calcSupportResistance(src, lookbackPeriod) =>
// Volume
Vol = upAndDownVolume()
vol_hi = ta.highest(Vol / 2.5, vol_len)
vol_lo = ta.lowest(Vol / 2.5, vol_len)
var float supportLevel = na
var float supportLevel_1 = na
var float resistanceLevel = na
var float resistanceLevel_1 = na
var box sup = na
var box res = na
var color res_color = na
var color sup_color = na
var float multi = na
var bool brekout_res = na
var bool brekout_sup = na
var bool res_holds = na
var bool sup_holds = na
// Find pivot points
pivotHigh = ta.pivothigh(src, lookbackPeriod, lookbackPeriod)
pivotLow = ta.pivotlow(src, lookbackPeriod, lookbackPeriod)
// Box width
atr = ta.atr(200)
withd = atr * box_withd
// Find support levels with Positive Volume
if (not na(pivotLow)) and Vol > vol_hi
supportLevel := pivotLow
supportLevel_1 := supportLevel - withd
topLeft = chart.point.from_index(bar_index - lookbackPeriod, supportLevel)
bottomRight = chart.point.from_index(bar_index, supportLevel_1)
sup_color := color.from_gradient(Vol, 0, ta.highest(Vol, 25), color(na), color.new(color.green, 30))
sup := box.new(
top_left = topLeft,
bottom_right = bottomRight,
border_color = color.green,
border_width = 1,
bgcolor = sup_color,
text = "Vol: " + str.tostring(math.round(Vol, 2)),
text_color = chart.fg_color,
text_size = size.small
)
// Find resistance levels with Negative Volume
if (not na(pivotHigh)) and Vol < vol_lo
resistanceLevel := pivotHigh
resistanceLevel_1 := resistanceLevel + withd
topLeft = chart.point.from_index(bar_index - lookbackPeriod, resistanceLevel)
bottomRight = chart.point.from_index(bar_index, resistanceLevel_1)
res_color := color.from_gradient(Vol, ta.lowest(Vol, 25), 0, color.new(color.red, 30), color(na))
res := box.new(
top_left = topLeft,
bottom_right = bottomRight,
border_color = color.red,
border_width = 1,
bgcolor = res_color,
text = "Vol: " + str.tostring(math.round(Vol, 2)),
text_color = chart.fg_color,
text_size = size.small
)
// Adaptive Box Len
sup.set_right(bar_index + 1)
res.set_right(bar_index + 1)
// Break of support or resistance conditions
brekout_res := ta.crossover(low, resistanceLevel_1)
res_holds := ta.crossunder(high, resistanceLevel)
sup_holds := ta.crossover(low, supportLevel)
brekout_sup := ta.crossunder(high, supportLevel_1)
// Change Color of Support to red if it was break, change color of resistance to green if it was break
if brekout_sup
sup.set_bgcolor(color.new(color.red, 80))
sup.set_border_color(color.red)
sup.set_border_style(line.style_dashed)
if sup_holds
sup.set_bgcolor(sup_color)
sup.set_border_color(color.green)
sup.set_border_style(line.style_solid)
if brekout_res
res.set_bgcolor(color.new(color.green, 80))
res.set_border_color(color.new(color.green, 0))
res.set_border_style(line.style_dashed)
if res_holds
res.set_bgcolor(res_color)
res.set_border_color(color.new(color.red, 0))
res.set_border_style(line.style_solid)
// Calculate support and resistance levels and their breakouts
= calcSupportResistance(close, lookbackPeriod)
// Check if Resistance becomes Support or Support Becomes Resistance
var bool res_is_sup = na
var bool sup_is_res = na
switch
brekout_res => res_is_sup := true
res_holds => res_is_sup := false
switch
brekout_sup => sup_is_res := true
sup_holds => sup_is_res := false
// Plot Res and Sup breakouts and holds
plotchar(res_holds, "Resistance Holds", "◆", color = #e92929, size = size.tiny, location = location.abovebar, offset = -1)
plotchar(sup_holds, "Support Holds", "◆", color = #20ca26, size = size.tiny, location = location.belowbar, offset = -1)
plotchar(brekout_res and res_is_sup , "Resistance as Support Holds", "◆", color = #20ca26, size = size.tiny, location = location.belowbar, offset = -1)
plotchar(brekout_sup and sup_is_res , "Support as Resistance Holds", "◆", color = #e92929, size = size.tiny, location = location.abovebar, offset = -1)
// Break Out Labels
if brekout_sup and not sup_is_res
label.new(
bar_index , supportLevel ,
text = "Break Sup",
style = label.style_label_down,
color = #7e1e1e,
textcolor = chart.fg_color,
size = size.small
)
if brekout_res and not res_is_sup
label.new(
bar_index , resistanceLevel ,
text = "Break Res",
style = label.style_label_up,
color = #2b6d2d,
textcolor = chart.fg_color,
size = size.small
)
Bollinger Bands Strategy 8:30a to 1:00aBollinger Bands Strategy I modified to only take trades during the hours of 8:30a to 1:00a Eastern Time.
Merged MACD + SMA 200 and 3-Minute Scalping Strategy병합된 MACD + SMA 200 및 3분 스캘핑 전략 설명서^^
이 스크립트는 두 가지 전략인 MACD + SMA 200 전략과 3분 스캘핑 전략을 하나의 Pine Script 코드로 병합한 것입니다. 이 전략은 두 전략의 매수 및 매도 조건을 결합하여 더 강력한 거래 신호를 제공합니다.
입력 변수
source: 가격 데이터의 소스(기본값: 종가)
fastLength: MACD의 빠른 이동평균 기간(기본값: 12)
slowLength: MACD의 느린 이동평균 기간(기본값: 26)
signalLength: MACD 신호선의 이동평균 기간(기본값: 9)
ma200Length: 200일 이동평균선의 기간(기본값: 200)
enableBarColor: 바 색상을 활성화할지 여부(기본값: 참)
enableMAs: 이동평균선을 표시할지 여부(기본값: 참)
enableBGColor: 배경 색상을 활성화할지 여부(기본값: 참)
maxIdLossPcnt: 최대 일중 손실 비율(기본값: 50%)
지표 계산
MACD 지표 계산
fastMA: 빠른 이동평균선 (SMA)
slowMA: 느린 이동평균선 (SMA)
ma200: 200일 이동평균선 (SMA)
macd: MACD 값 (fastMA - slowMA)
signal: MACD 신호선 (macd의 SMA)
hist: MACD 히스토그램 (macd - signal)
3분 스캘핑 전략 계산
radiusTrend: 레이디어스 트렌드 지표 (EMA 20)
스토캐스틱 오실레이터
k: %K 값
d: %D 값 (%K의 SMA)
색상 설정
MAtrendcolor: 200일 이동평균선의 추세에 따른 색상 (상승: 녹색, 하락: 빨간색)
trendcolor: MACD와 이동평균선의 관계에 따른 색상
bartrendcolor: 바의 색상 설정
bgColor: 배경 색상 설정 (매수/매도 신호에 따라 녹색 또는 빨간색 반투명 배경)
차트 요소 표시
배경 색상(bgcolor): 매수 또는 매도 신호에 따라 배경 색상을 변경합니다.
바 색상(barcolor): 추세에 따라 바의 색상을 설정합니다.
이동평균선(plot): 빠른 MA, 느린 MA, 200일 MA, 레이디어스 트렌드를 차트에 표시합니다.
신호 표시(plotshape): 매수 및 매도 조건이 충족될 때 차트에 "LONG" 또는 "SHORT" 레이블을 표시합니다.
매매 조건
MACD + SMA 200 전략 조건
매수 조건(macdLongCondition):
MACD 히스토그램이 0을 상향 돌파하고
MACD 값이 0보다 크며
빠른 MA가 느린 MA보다 크고
과거의 종가가 200일 MA보다 큰 경우
매도 조건(macdShortCondition):
MACD 히스토그램이 0을 하향 돌파하고
MACD 값이 0보다 작으며
빠른 MA가 느린 MA보다 작고
과거의 종가가 200일 MA보다 작은 경우
3분 스캘핑 전략 조건
매수 조건(scalpLongCondition):
종가가 레이디어스 트렌드보다 크고
종가가 200일 MA보다 크며
%K가 %D를 상향 돌파하는 경우
매도 조건(scalpShortCondition):
종가가 레이디어스 트렌드보다 작고
종가가 200일 MA보다 작으며
%K가 %D를 하향 돌파하는 경우
결합된 매매 조건
매수 조건(longCondition): MACD 전략 또는 스캘핑 전략의 매수 조건 중 하나라도 충족될 경우
매도 조건(shortCondition): MACD 전략 또는 스캘핑 전략의 매도 조건 중 하나라도 충족될 경우
전략 실행
매수 조건이 충족되면:
strategy.entry("LongEntry", strategy.long, comment="Bullish")를 통해 매수 포지션 진입
매도 조건이 충족되면:
strategy.entry("ShortEntry", strategy.short, comment="Bearish")를 통해 매도 포지션 진입
리스크 관리:
strategy.risk.max_intraday_loss를 사용하여 최대 일중 손실을 계정 자산의 일정 비율로 제한
사용 방법
스크립트 적용: 트레이딩뷰(TradingView) 차트에 이 Pine Script 코드를 추가합니다.
입력 값 조정: 자신의 거래 스타일에 맞게 입력 변수들을 조정합니다.
전략 테스트: 백테스트를 통해 전략의 성과를 확인하고 필요에 따라 파라미터를 수정합니다.
실전 적용: 전략이 만족스러운 결과를 보이면 실거래에 적용합니다. 항상 리스크 관리에 유의하세요.
Quantum Oscillator Pine v6 - Aynet
This Pine Script™ code, built with version 6, implements the Quantum Oscillator - Aynet, a normalized oscillator designed for visualizing price dynamics within a specific fractal range. The code emphasizes visual clarity with a rainbow color scheme for the oscillator line and adaptive threshold bands.
Key Features:
Quantum Oscillator Calculation:
The oscillator value (quantum_oscillator) is derived from the current price position relative to the highest (fractal_high) and lowest (fractal_low) prices over a customizable depth (quantum_depth).
Normalized to a 0-100 range.
Adaptive Threshold Bands:
Upper Band: Calculated using the Golden Ratio Threshold (quantum_upper_band).
Lower Band: A complementary lower boundary (quantum_lower_band).
Rainbow Color Mapping:
The oscillator is dynamically color-coded based on value:
0-20: Red
20-40: Orange
40-60: Yellow
60-80: Green
80-100: Blue
Visualization:
The Quantum Oscillator is plotted with a rainbow color line.
Dashed horizontal lines mark the upper and lower threshold bands.
Background highlights:
Green when the oscillator is below the lower band.
Red when the oscillator is above the upper band.
V6 Emphasis:
Utilizes Pine Script™ version 6, ensuring compatibility with the latest language features and improvements.
Clean, modern syntax for enhanced readability and efficiency.
This indicator is visually appealing and provides insights into price dynamics within a fractal range, ideal for adaptive market analysis.
IlluminateThe Illuminate script predicts the potential range of Bitcoin's top and bottom prices based on a logarithmic regression model, referencing Bitcoin's historical price trends and halvings. This script is designed to provide valuable insights into Bitcoin's price dynamics and long-term trends using principles derived from the "Bitcoin Law."
Key Features
Power Law Trend Lines
Primary Trend:
Projects the general growth trajectory of Bitcoin prices over time based on a logarithmic power law.
Resistance Line:
Identifies a potential upper limit of Bitcoin prices during market peaks.
Includes an offset trendline for an additional buffer zone.
Support Line:
Represents a possible bottom for Bitcoin prices during market downturns.
Offset trendlines highlight potential zones of price fluctuation near the support line.
Fill Zones:
Between resistance and offset: Semi-transparent Red.
Between support and offset: Semi-transparent Green/Blue.
Bitcoin Halving Events
Automatically marks significant Bitcoin halving dates with yellow vertical lines and labeled annotations.
Current and future halvings (approximate) are included.
Trending Phase Indication
A dynamic visual color fill highlights different phases of Bitcoin's price evolution based on a 4-year cycle.
Colors: Red, Green, Blue, Orange (indicating each phase).
"Trending Phase" label provides insight into the current phase.
Interactive Inputs
Show/Hide Resistance: Toggle resistance trend lines.
Show/Hide Support: Toggle support trend lines.
Show/Hide Halving Dates: Toggle visibility of halving annotations.
Customizable Parameters
Fine-tune parameters (A and n) for the main trend line to match your analysis needs.
How to Use
Overlay Analysis:
Add this script to your TradingView chart for direct overlay on Bitcoin's price data.
Interpret the Zones:
Use the resistance and support lines as potential upper and lower bounds for price movements.
Analyze fill zones for areas of likely price oscillation.
Halving Significance:
Observe price behavior before and after halving dates, which historically influence market trends.
Long-Term Perspective:
The model is optimized for long-term projections, making it suitable for strategic, rather than short-term, trading decisions.
Disclaimer:
This indicator is for educational purposes only and should not be used as investment advice. Always do your own research and consult with a financial advisor before making trading decisions.
B-Xtrender Simplified-BUY/SELL print Thanks to @puppytherapy for creating the original B-Xtrender indicator, available at this link: B-Xtrender by Puppytherapy.
This is a modified version of the original script, which now includes Buy and Sell arrows directly plotted on the chart for clear entry signals. The core logic of the indicator remains intact, with enhancements for simplicity and usability.
Overview:
The B-Xtrender Simplified indicator is a trend-following tool designed to identify potential buy and sell opportunities based on momentum and trend confluence. It combines short-term and long-term RSI-based oscillators with exponential moving averages to detect trend shifts and provide clear, actionable signals on the chart.
This simplified version focuses on clean visuals and provides buy and sell signals using arrows, ensuring an uncluttered chart. The indicator is suitable for traders who want a straightforward tool to assist with entry signals in trending markets.
Key Components:
Short-Term Oscillator:
Measures short-term momentum using the RSI of the difference between two EMAs (Short - L1 and Short - L2).
Provides early signals for trend reversals and momentum shifts.
Long-Term Oscillator:
Evaluates broader trend strength using the RSI of a single EMA (Long - L1).
Acts as a filter to ensure signals align with the overall market trend.
Smoothed Oscillator (T3):
Applies a smoothing algorithm to the short-term oscillator to reduce noise.
Ensures the signals are more reliable and less prone to false alarms.
How It Works:
Buy Signal (Green Arrow Below Candles):
Triggered when:
The short-term oscillator is above 0 (indicating upward momentum).
The smoothed short-term oscillator (maShortTermXtrender) is rising (momentum confirmation).
The long-term oscillator is above 0 (trend confirmation).
Sell Signal (Red Arrow Above Candles):
Triggered when:
The short-term oscillator is below 0 (indicating downward momentum).
The smoothed short-term oscillator (maShortTermXtrender) is falling (momentum confirmation).
The long-term oscillator is below 0 (trend confirmation).
Alerts:
Buy and sell signals generate alerts for traders to take immediate action when conditions are met.
Customization Options:
Short-Term Parameters:
Short - L1, Short - L2, Short - L3 control the responsiveness of the short-term oscillator.
Long-Term Parameters:
Long - L1, Long - L2 adjust the sensitivity of the long-term trend filter.
Default values ensure the indicator works effectively in most market conditions, but they can be fine-tuned for specific instruments or timeframes.
Strengths:
Clarity: Uses clean buy/sell arrows for visual simplicity.
Confluence-Based: Ensures alignment between short-term momentum and long-term trend before signaling.
Real-Time Alerts: Alerts for both buy and sell signals allow for timely decision-making.
Usage Tips:
Confirm Trend:
Use the indicator on a higher timeframe (e.g., 1-hour or daily) to confirm the overall trend direction.
Combine with Other Tools:
Enhance accuracy by combining the indicator with support/resistance levels, volume analysis, or other technical indicators.
Risk Management:
Always use stop-loss orders to protect against adverse market movements.
Maintain a risk-to-reward ratio of at least 1:2.
Ideal For:
Traders seeking clear and straightforward entry signals.
Trend-following strategies in liquid markets.
Beginners who want an easy-to-interpret tool for identifying momentum-based trades.
This simplified version of the B-Xtrender retains the original power of the indicator while focusing on clean visuals and actionable signals for trend-following traders.
Bollinger Bands Strategy 9:30a to 1:00aBollinger Bands Strategy modified to only take trades between 9:30a to 1:00a Eastern Time. Best results I've found on BTCUSD 5 minute chart, change the Input length to 16
MTF Fibonacci Grid -Aynet
Multi-Timeframe Fibonacci Grid - Code Summary
This Pine Script creates a multi-timeframe Fibonacci grid indicator with customizable Fibonacci levels and multiple timeframes. The script calculates Fibonacci retracement levels for selected timeframes and plots them on the chart. It also adds visual signals for potential long and short opportunities when the price crosses specific levels.
Key Features
Customizable Timeframes:
The user can toggle timeframes (1m, 5m, 15m, 1h, 4h, 1D) to include them in the Fibonacci grid calculation.
Custom Fibonacci Levels:
Supports customizable Fibonacci retracement levels (0.236, 0.382, 0.500, 0.618, 0.786) via inputs.
Visual Styling:
User-configurable line styles (solid, dashed, dotted), colors for each Fibonacci level, and the option to show labels for the levels.
Option to fill areas between Fibonacci levels for better visualization.
Dynamic Level Calculation:
For each selected timeframe, the script calculates the high-low range and computes the Fibonacci levels.
Levels are updated dynamically based on the high and low values of the chosen timeframes.
Signal Plots:
A long signal is plotted when the price crosses above the lowest Fibonacci level.
A short signal is plotted when the price crosses below the highest Fibonacci level.
Dynamic Requests:
Uses request.security() to fetch high and low values for each timeframe and performs calculations for the selected timeframes.
Visualization and Outputs
Fibonacci Levels:
Horizontal lines represent Fibonacci levels, colored based on user input.
Levels are extended to the right for easier tracking.
Labels:
Displays the Fibonacci percentage, timeframe, and exact price level for each line.
Signals:
Green triangle (below the bar): Long signal (price crosses above the lowest Fibonacci level).
Red triangle (above the bar): Short signal (price crosses below the highest Fibonacci level).
Filled Areas:
Optionally fills areas between adjacent Fibonacci levels for better chart clarity.
Customization Options
Timeframes:
Enable or disable individual timeframes via checkboxes.
Fibonacci Levels:
Modify retracement levels directly in the settings.
Style:
Configure label visibility, text size, line style, and colors.
Fill:
Option to enable or disable area filling between levels.
Use Case
This script is ideal for traders looking to visualize key Fibonacci retracement levels across multiple timeframes and identify potential support or resistance zones. It helps track confluences between different timeframes and provides visual entry/exit signals.
Advanced Range Filter-AynetKey Features
Range Sizing Methods:
Supports various calculation methods, including:
Points: Fixed numerical value.
Pips: Ideal for Forex pairs.
% of Price: Scales range dynamically based on price.
ATR: Volatility-based sizing using Average True Range.
Average Change: Original sizing method using average price change.
Standard Deviation: Measures price volatility.
Absolute: User-defined fixed range.
Filter Types:
Type 1: Original filtering logic.
Type 2: Alternative smoothing logic for more responsive outputs.
Smoothing:
Optional EMA smoothing applied to the filter values.
Dynamic Visuals:
Plots filtered price with upper/lower bands.
Colors bars based on trend direction (bullish, bearish, neutral).
Advanced Averaging:
Conditional EMA logic enables averaging only when the filter value changes.
Trend Output:
Exports trend information (1 for bullish, -1 for bearish) for use in other scripts.
Usage
Trend Identification:
Observe the filtered price line to identify trends while ignoring minor price noise.
Use the bar coloring scheme to visualize trends directly on the chart.
Dynamic Bands:
The upper and lower bands represent the price range that triggers filter movements.
Custom Alerts:
Set up alerts for trend changes by monitoring the trend variable.
Use in Other Scripts:
Import trend information (externalTrend) into custom strategies or other indicators.
Conclusion
This advanced Range Filter Indicator removes minor price action noise and highlights trends with precision. It’s highly customizable, offering flexibility in how ranges and filter values are calculated, with dynamic visualization to make trends clear and actionable. Perfect for traders who prefer clarity and noise reduction in price action analysis.
Sri Yantra MTF - AynetSummary of the Code
Indicator Purpose:
This Pine Script draws a multi-timeframe (MTF) Sri Yantra pattern on the chart using geometrical lines.
It dynamically adapts based on selected resolutions.
Key Features:
Base Resolution (baseRes) and Pattern Resolution (patternRes): Allows selecting different timeframes for the calculations and drawing.
Size Multiplier (sizeMult) and Width (barOffset): Determines the dimensions of the pattern.
Pattern Drawing: Includes nested triangles and squares to replicate the Sri Yantra pattern.
Visualization Components:
The outer square is defined with rangeSize to set its dimensions.
Multiple nested triangles are drawn to create symmetrical patterns inside the square.
Horizontal lines enhance the structure.
Customization Options:
Line Color and Width: Adjustable via user inputs.
Info Table: Displays the selected resolutions.
This code dynamically generates the Sri Yantra pattern while allowing user control over pattern size, resolution, and aesthetics. If you need further adjustments or clarifications, let me know!
T3 with Arrows (by Houston St.Claire)the arrows indicate trend reversals - first time a close below and first time a close above.
Bollinger Bands + AO Divergences (With Hidden)_Crusader_ArisScalping script efficient on the 1m and 5m time frame using the Bollinger Bands and the Awesome Oscillator
MegaGas Bollinger Bands with Divergence and Circle SignalsIndicator: MegaGas Bollinger Bands with Divergence and Circle Signals
This indicator combines Bollinger Bands, RSI analysis, and Divergence detection to provide a comprehensive view of potential market signals. It is designed to identify trend reversals, momentum shifts, and overbought/oversold conditions, offering both buy/sell signals and visual alerts on the chart.
Super Scalping Indicator (Heikin Ashi Optimized)The Super Scalping Indicator is a custom trading indicator designed to assist traders in identifying potential buy and sell signals using a combination of technical analysis tools. This indicator is optimized for Heikin Ashi candles, which smooth out price data to highlight trends more clearly.
Key Features
MACD (Moving Average Convergence Divergence): Identifies momentum changes by comparing two exponential moving averages (EMAs).
RSI (Relative Strength Index): Measures the speed and change of price movements to identify overbought and oversold conditions.
Bollinger Bands: Provides a relative definition of high and low prices by using a moving average and standard deviations.
Volume Spike Detection: Highlights significant changes in trading volume, which can precede price movements.
Buy and Sell Signals: Combines the above indicators to generate potential entry and exit points.
Overbought and Oversold Markers: Visual cues for extreme RSI conditions.
Indicator Components
Inputs
EMA Lengths: fast_length and slow_length determine the periods for the fast and slow EMAs in the MACD calculation.
Signal Line Length: signal_length sets the period for the MACD signal line.
RSI Length: rsi_length defines the period for the RSI calculation.
Overbought/Oversold Levels: upper_rsi and lower_rsi set the thresholds for RSI conditions.
Bollinger Bands Parameters: bb_length and bb_std control the Bollinger Bands' moving average period and standard deviation multiplier.
Volume Multiplier: volume_multiplier is used to detect significant volume spikes.
Calculations
Heikin Ashi Data:
Since the chart is set to Heikin Ashi candles, the standard open, high, low, and close variables reference Heikin Ashi values.
Variables ha_open, ha_high, ha_low, and ha_close are assigned these values for clarity.
MACD Calculation:
fast_ema: Fast EMA of ha_close.
slow_ema: Slow EMA of ha_close.
macd_line: Difference between fast_ema and slow_ema.
signal_line: EMA of macd_line.
Signal Conditions
Buy Condition:
MACD line crosses above the signal line.
RSI is below the lower_rsi threshold.
ha_close is below the lower Bollinger Band.
Volume spike is detected.
Sell Condition:
MACD line crosses below the signal line.
RSI is above the upper_rsi threshold.
ha_close is above the upper Bollinger Band.
Volume spike is detected.
Overbought/Oversold Conditions:
Overbought: RSI exceeds upper_rsi.
Oversold: RSI falls below lower_rsi.
Plotting
Bollinger Bands:
Plots upper_band and lower_band with shaded area in between.
Buy and Sell Signals:
Buy: Green upward-pointing triangles below price bars.
Sell: Red downward-pointing triangles above price bars.
Overbought/Oversold Markers:
Overbought: Purple circles above price bars.
Oversold: Teal crosses below price bars.
Alerts
Buy Alert: Triggered when buy conditions are met.
Sell Alert: Triggered when sell conditions are met.
How to Use the Indicator
Set Chart to Heikin Ashi Candles:
Select "Heikin Ashi" from the chart type options.
Disclaimer
Not Investment Advice: This indicator is a tool for analysis and does not constitute financial advice.
Test Thoroughly: Always test on a demo account before live trading.
Use in Conjunction: Combine this tool with other forms of analysis for best results.
Developed by: Mohd Faizan Othman
Contact: @ibudata on Twitter / x
Support My Work: Donations are welcome at Ethereum address: 0x0F1397469a0333c899aad52b4ada89Bb816ADFd7.
Tendance avec Vague Colorée et TP (Avec Lissage)Je teste une strat sur les bandes de bollinger et les EMA avec envoie de signaux
MM8 Professional Regression Histogram
The MM8 Professional Regression Histogram is a cutting-edge TradingView script designed to provide traders with advanced visual insights using regression analysis. This tool is particularly useful for identifying price trends and volatility zones with precision. Its unique approach combines a regression channel with a histogram representation, enabling users to better understand price behavior and distribution.
Key Features:
Dynamic Regression Channel:
Utilizes linear regression to calculate a price channel over a customizable period (Length).
Automatically adjusts the width of the channel using a Multiplier based on market volatility.
Supports user-defined Line Styles (solid, dashed, dotted) for clear visualization.
Gradient-Based Channel Visualization:
The upper and lower channel lines are color-coded with a gradient that transitions between user-specified colors.
This provides a visually intuitive way to understand price movement within the channel.
Interactive Histogram:
Displays a histogram representing price distribution across segmented bins within the channel.
The histogram dynamically updates based on the number of bins (Bins Number) and reflects the density of price action in each section.
Customizable histogram color for better integration with individual chart setups.
Custom Styling Options:
Flexible options to tailor the appearance, including:
Channel colors (upper and lower).
Histogram bin color.
Toggle the histogram display on or off.
Accurate and Real-Time Calculations:
Implements robust mathematical techniques for regression analysis.
Dynamically recalculates at each bar close to ensure the most accurate representation of the market.
Applications:
Trend Analysis: The regression channel helps identify prevailing market trends by tracking price movement and its deviation from the channel center.
Volatility Detection: The histogram bins provide a visual representation of volatility within the channel, highlighting areas of price congestion and low volatility.
Scalping and Range Trading: With its granular segmentation, the tool is perfect for scalpers and range traders seeking to pinpoint high-probability trade zones.
Enhanced Decision Making: By combining regression channels with histogram visualization, traders gain a comprehensive understanding of both trend direction and price distribution.
Why Choose MM8 Professional Regression Histogram ?
This tool is built on state-of-the-art financial modeling principles, making it a unique addition to any trader's toolkit. Whether you are a beginner or an advanced trader, this script offers a level of precision and customization rarely seen in traditional indicators.
Make informed decisions and gain a competitive edge in the market with MM8 Regression Histogram. Your path to smarter trading starts here.
EMA 20/50 Cedric Follow the current trend accurately on Weekly timefame - Aligns with the fundamentals most of the time so stop wasting your money on those softwares
8 /15 EMA Crossover with 9 EMA High/Low8 /15 EMA Crossover with 9 EMA High/Low
GIVING BUY AND SELL SIGNALS, WITH HIGH ACCURACY
Advanced Scalping by VVSКак это работает:
• ATR оценивает рыночную волатильность. Чем выше ATR, тем шире будет стоп-лосс, что помогает учитывать высокую волатильность.
• Индикатор рисует линии стоп-лоссов в реальном времени на графике, что позволяет трейдеру видеть, где находится его уровень защиты от убытков.
Этот подход помогает адаптировать стоп-лоссы к текущей рыночной ситуации и улучшить управление рисками при скальпинге.