Daily Range Dividerthis is a daily range divider that draws a customizable vertical line at 12:00am EST opening candle
Cycles
MC Geopolitical Tension Events📌 Script Title: Geopolitical Tension Events
📖 Description:
This script highlights key geopolitical and military tension events from 1914 to 2024 that have historically impacted global markets.
It automatically plots vertical dashed lines and labels on the chart at the time of each major event. This allows traders and analysts to visually assess how markets have responded to global crises, wars, and significant political instability over time.
🧠 Use Cases:
Historical backtesting: Understand how market responded to past geopolitical shocks.
Contextual analysis: Add macro context to technical setups.
🗓️ List of Geopolitical Tension Events in the Script
Date Event Title Description
1914-07-28 WWI Begins Outbreak of World War I following the assassination of Archduke Franz Ferdinand.
1929-10-24 Wall Street Crash Black Thursday, the start of the 1929 stock market crash.
1939-09-01 WWII Begins Germany invades Poland, starting World War II.
1941-12-07 Pearl Harbor Japanese attack on Pearl Harbor; U.S. enters WWII.
1945-08-06 Hiroshima Bombing First atomic bomb dropped on Hiroshima by the U.S.
1950-06-25 Korean War Begins North Korea invades South Korea.
1962-10-16 Cuban Missile Crisis 13-day standoff between the U.S. and USSR over missiles in Cuba.
1973-10-06 Yom Kippur War Egypt and Syria launch surprise attack on Israel.
1979-11-04 Iran Hostage Crisis U.S. Embassy in Tehran seized; 52 hostages taken.
1990-08-02 Gulf War Begins Iraq invades Kuwait, triggering U.S. intervention.
2001-09-11 9/11 Attacks Coordinated terrorist attacks on the U.S.
2003-03-20 Iraq War Begins U.S.-led invasion of Iraq to remove Saddam Hussein.
2008-09-15 Lehman Collapse Bankruptcy of Lehman Brothers; peak of global financial crisis.
2014-03-01 Crimea Crisis Russia annexes Crimea from Ukraine.
2020-01-03 Soleimani Strike U.S. drone strike kills Iranian General Qasem Soleimani.
2022-02-24 Ukraine Invasion Russia launches full-scale invasion of Ukraine.
2023-10-07 Hamas-Israel War Hamas launches attack on Israel, sparking war in Gaza.
2024-01-12 Red Sea Crisis Houthis attack ships in Red Sea, prompting Western naval response.
Luma DCA Simulator (BTC only)Luma DCA Simulator – Guide
What is the Luma DCA Simulator?
The Luma DCA Tracker shows how regular Bitcoin investments (Dollar Cost Averaging) would have developed over a freely selectable period – directly in the chart, transparent and easy to follow.
Settings Overview
1. Investment amount per interval
Specifies how much capital is invested at each purchase (e.g. 100).
2. Start date
Defines the point in time from which the simulation begins – e.g. 01.01.2020.
3. Investment interval
Determines how frequently investments are made:
– Daily
– Weekly
– Every 14 days
– Monthly
4. Language
Switches the info box display between English and German.
5. Show investment data (optional)
If activated, the chart will display additional values such as total invested capital, BTC amount, current value, and profit/loss.
What the Chart Displays
Entry points: Each DCA purchase is marked as a point in the price chart.
Average entry price: An orange line visualizes the evolving DCA average.
Info box (bottom left) with a live summary of:
– Total invested capital
– Total BTC acquired
– Average entry price
– Current portfolio value
– Profit/loss in absolute terms and percentage
Note on Accuracy
This simulation is for illustrative purposes only.
Spreads, slippage, fees, and tax effects are not included.
Actual results may vary.
Technical Note
For daily or weekly intervals, the chart timeframe should be set to 1 day or lower to ensure all purchases are accurately included.
Larger timeframes (e.g. weekly or monthly charts) may result in missed investments.
Currency Handling
All calculations are based on the selected chart symbol (e.g. BTCUSD, BTCEUR, BTCUSDT).
The displayed currency is automatically determined by the chart used.
Yelober - Intraday ETF Dashboard# How to Read the Yelober Intraday ETF Dashboard
The Intraday ETF Dashboard provides a powerful at-a-glance view of sector performance and trading opportunities. Here's how to interpret and use the information:
## Basic Dashboard Reading
### Color-Coding System
- **Green values**: Positive performance or bullish signals
- **Red values**: Negative performance or bearish signals
- **Symbol colors**: Green = buy signal, Red = sell signal, Gray = neutral
### Example 1: Identifying Strong Sectors
If you see XLF (Financials) with:
- Day % showing +2.65% (green background)
- Symbol in green color
- RSI of 58 (not overbought)
**Interpretation**: Financial sector is showing strength and momentum without being overextended. Consider long positions in top financial stocks like JPM or BAC.
### Example 2: Spotting Weakness
If you see XLK (Technology) with:
- Day % showing -1.20% (red background)
- Week % showing -3.50% (red background)
- Symbol in red color
- RSI of 35 (approaching oversold)
**Interpretation**: Technology sector is showing weakness across multiple timeframes. Consider avoiding tech stocks or taking short positions in names like MSFT or AAPL, but be cautious as the low RSI suggests a bounce may be coming.
## Advanced Interpretations
### Example 3: Sector Rotation Detection
If you observe:
- XLE (Energy) showing +2.10% while XLK (Technology) showing -1.50%
- Both sectors' Week % values showing the opposite trend
**Interpretation**: This suggests money is rotating out of technology into energy stocks. This rotation pattern is actionable - consider reducing tech exposure and increasing energy positions (look at XOM, CVX in the Top Stocks column).
### Example 4: RSI Divergences
If you see XLU (Utilities) with:
- Day % showing +0.50% (small positive)
- RSI showing 72 (overbought, red background)
**Interpretation**: Despite positive performance, the high RSI suggests the sector is overextended. This divergence between price and indicator suggests caution - the rally in utilities may be running out of steam.
### Example 5: Relative Strength in Weak Markets
If SPY shows -1.20% but XLP (Consumer Staples) shows +0.30%:
**Interpretation**: Consumer staples are showing defensive strength during market weakness. This is typical risk-off behavior. Consider defensive positions in stocks like PG, KO, or PEP for protection.
## Practical Application Scenarios
### Day Trading Setup
1. **Morning Market Assessment**:
- Check which sectors are green pre-market
- Focus on sectors with Day % > 1% and RSI between 40-70
- Identify 2-3 stocks from the Top Stocks column of the strongest sector
2. **Midday Reversal Hunting**:
- Look for sectors with symbol color changing from red to green
- Confirm with RSI moving away from extremes
- Trade stocks from that sector showing similar pattern changes
### Swing Trading Application
1. **Trend Following**:
- Identify sectors with positive Day % and Week %
- Look for RSI values in uptrend but not overbought (45-65)
- Enter positions in top stocks from these sectors, using daily charts for confirmation
2. **Contrarian Setups**:
- Find sectors with deeply negative Day % but RSI < 30
- Look for divergence (price making new lows but RSI rising)
- Consider counter-trend positions in the stronger stocks within these oversold sectors
## Reading Special Conditions
### Example 6: Risk-Off Environment
If you observe:
- XLP (Consumer Staples) and XLU (Utilities) both green
- XLK (Technology) and XLY (Consumer Disc) both red
- SPY slightly negative
**Interpretation**: Classic risk-off rotation. Investors are moving to safety. Consider defensive positioning and reducing exposure to growth sectors.
### Example 7: Market Breadth Analysis
Count the number of sectors in green vs. red:
- If 7+ sectors are green: Strong bullish breadth, consider aggressive long positioning
- If 7+ sectors are red: Weak market breadth, consider defensive positioning or shorts
- If evenly split: Market is indecisive, focus on specific sector strength instead of broad market exposure
Remember that this dashboard is most effective when combined with broader market analysis and appropriate risk management strategies.
Mariam Smart FlipPurpose
This tool identifies high-probability intraday reversals by detecting when price flips through the daily open after strong early-session commitment.
How It Works
A valid flip occurs when:
The previous daily candle is bullish or bearish
The first hour today continues in the same direction
Then, the price flips back through the daily open with a minimum break threshold (user-defined)
This setup is designed to catch liquidity grabs or fakeouts near the daily open, where early buyers or sellers get trapped after showing commitment
Signal Logic
Buy Flip
Previous day bearish → first hour bearish → price flips above open
Sell Flip
Previous day bullish → first hour bullish → price flips below open
Features
Configurable flip threshold in percentage
Signals only activate after the first hour ends
Daily open line displayed on chart
Simple triangle markers with no visual clutter
Alerts ready to use for automation or notifications
Usage Tips
Use "Once Per Bar" alert mode to get notified immediately when the flip happens
Works best in active markets like FX, indices, or crypto
Adjust threshold based on asset volatility
Suggested stop loss: use the previous daily high for sell flips or the previous daily low for buy flips
Suggested take profit: secure at least 30 pips to aim for a 1:3 risk-to-reward ratio on average
BTC Buy/Sell SignalUse in higher time frames (weekly works best)
Condition Interpretation:
Red Shading: Indicates a scenario where Copper/Gold is strong (above zero), Copper/Bitcoin is weak (below zero), and the difference between them is pronounced (Smoothed MA Difference above Copper/Gold Z-Score).
Green Shading: Indicates the opposite, where Copper/Gold is weak, Copper/Bitcoin is strong, and the difference is below the Copper/Gold Z-Score.
The zones only indicate that the trader should consider buying or selling. Use with another indicator to confirm.
Smart Pro Strategy – Buy/Sell + Elliott + Squeeze + Dashboard📊 Smart Momentum Pro – Complete Intraday Strategy for Stocks, Crypto, and Indices
✅ What’s Included:
• Buy/Sell signals based on price action, volume, and momentum
• Elliott Wave detection (1, 3, 5, A, B, C)
• Live market summary table with trend direction and volatility
• Fibonacci-based reversal zone
• Squeeze alert system with visual chart notifications
• Smart EMA 8/21/50/200 tracking
• Fully designed for black charts and red/green candles
• Perfect for BTC, ETH, SPY, HIMS, and more
🧠 Timeframes: Ideal for 5min, 15min, 1h, and Daily charts.
PRO Investing - LevelPRO Investing - Level
📊 Dynamic Support/Resistance
This indicator plots the PRO Investing Level, defined as the midpoint between the highest high and lowest low over the past 252 trading days (default lookback period, equivalent to ~1 year). It acts as a key mean-reversion reference level, useful for identifying potential support/resistance zones or market equilibrium levels.
Features:
🕰️ Option to display only today’s level or historical levels.
⚙️ Customizable lookback period for flexibility across timeframes and strategies.
📉 Teal line plotted directly on the chart, highlighting this institutional-grade level.
Ideal for traders looking to anchor price action to significant historical ranges—particularly useful in mean-reversion, breakout, or volatility compression strategies.
Multi-Indicator Switch PanelAdaptive Entry Toolkit
This powerful indicator combines three high-quality trading systems into one modular, easy-to-use panel. Each system is independently toggleable, enabling full customization based on your trading style and market conditions.
📦 INCLUDED MODULES:
1. RSI Pullback Signals
Identifies momentum exhaustion and possible reversal zones using the Relative Strength Index.
Conditions tuned to detect when RSI pulls back after reaching oversold (for buys) or overbought (for sells) levels.
Highlights potential early entry points in trending markets.
2. Double EMA Pullback
Detects pullbacks in strong trends using a fast and slow EMA (default: 50 & 200).
Buy/Sell signals generated when price crosses back over the faster EMA in the direction of the larger trend.
Great for trend continuation entries.
🧠 ADVANCED FEATURES
Fully customizable inputs for each module
Alerts for every signal (RSI pullback, EMA cross, breakout from suppression)
Minimalistic and lightweight for real-time use
Overlay-based for clean integration with your price chart
🧰 Best Used For:
Anticipating breakouts
Trend continuation setups
Low-volatility squeeze detection
Confluence-based entries
Log Regression Oscillator (caN)fi(ki)=>'ra'
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © fikira
//@version=6
indicator('Log Regression Oscillator', max_bars_back=5000, max_labels_count=500, max_lines_count=500, overlay=false)
________________________________________________________________________________________________________________________ ='
⎞ Settings ⎛
(__--------__) '
cGREEN = #089981, cRED = #F23645, cGRAY = #757a79
threshold = input.int (300 , minval=150)
proactive = input.bool (false )
GRE = input.color(cGREEN , 'Bull' , group='Style' )
RED = input.color(cRED , 'Bear' , group='Style' )
GRY = input.color(cGRAY , 'Unconfirmed Bull/Bear' , group='Style' )
showDsh = input.bool ( true , 'Show Dashboard' , group='Dashboard' )
dshLoc = str.replace(str.lower(input.string('Top Right', 'Location', group='Dashboard', options= )), ' ', '_')
txtSize = str.lower(input.string('Normal' , 'Size' , group='Dashboard', options= ) )
________________________________________________________________________________________________________________________ :='
⎞ Constants and general variables ⎛
(__-------------------------------__) '
INV = color(na)
n = bar_index
________________________________________________________________________________________________________________________ :='
⎞ Functions ⎛
(__---------__) '
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()
//Closed form solution to best fit log function
log_reg(log_x, log_x2, log_y) =>
sum_log_x = log_x . sum()
sum_y = log_y . sum()
sum_log_x_y = dot(log_x ,log_y)
sum_log_x_sq = log_x2 . sum()
n_ = log_x .size()
//Closed-form solutions for a and b
a = (n_ * sum_log_x_y - sum_log_x * sum_y)
/ (n_ * sum_log_x_sq - math.pow(sum_log_x , 2))
b = ( sum_y - a * sum_log_x ) / n_
//Variables declared for draw()
var arrayarr = array.new(4, na)
proActH = false, proActL = false
var lastHi = 0., var lastLi = 0.
draw(aTop_x, aTop_x2, aTop_y, aBot_x, aBot_x2, aBot_y, top_points, prc_points, btm_points, refit) =>
var label labH = na, var label labL = na
vTop = 0.
vBtm = 0.
if refit
top_points.clear(), prc_points.clear(), btm_points.clear()
= log_reg(aTop_x, aTop_x2, aTop_y), arr.set(0, a_top), arr.set(1, b_top)
= log_reg(aBot_x, aBot_x2, aBot_y), arr.set(2, a_btm), arr.set(3, b_btm)
for i = 0 to n
top = math.exp(a_top * math.log(i) + b_top)
btm = math.exp(a_btm * math.log(i) + b_btm)
avg = math.avg(top, btm)
if i == n
vTop := top
vBtm := btm
ix = n - i
if ix < 4999
hi = high
lo = low
cl = close
getC = hi > avg ? hi : lo < avg ? lo : cl
prc_points.push(chart.point.from_index(i, 100 * math.max(-1.5, math.min(1.5, (getC - btm) / (top - btm)))))
for lab in label.all
lab.delete()
firstH = proactive ? true : false
firstL = proactive ? true : false
color colH = na, color colL = na
sz = prc_points.size()
if aTop_x.size() > 0
for i = aTop_x.size() -1 to 0
idx = int(math.exp(aTop_x.get(i)))
if idx < sz and idx > n - 5000 and idx >= 0
if firstH
if aTop_x.last() != lastHi
colH := GRY
firstH := false
else
colH := RED
else
colH := RED
top = math.exp(a_top * math.log(idx) + b_top)
btm = math.exp(a_btm * math.log(idx) + b_btm)
label.new(idx , 100 *
math.max(-1.5, math.min(1.5, (high - btm)
/ (top - btm)
) ), '●', textcolor = colH, color=INV, size=8)
if aBot_x.size() > 0
for i = aBot_x.size() -1 to 0
idx = int(math.exp(aBot_x.get(i)))
if idx < sz and idx > n - 5000 and idx >= 0
if firstL
if aBot_x.last() != lastLi
colL := GRY
firstL := false
else
colL := GRE
else
colL := GRE
top = math.exp(a_top * math.log(idx) + b_top)
btm = math.exp(a_btm * math.log(idx) + b_btm)
label.new(idx , 100 *
math.max(-1.5, math.min(1.5, (low - btm)
/ (top - btm)
) ), '●', textcolor = colL, color=INV, size=8
, style = label.style_label_up)
else
top = math.exp(arr.get(0) * math.log(n) + arr.get(1))
btm = math.exp(arr.get(2) * math.log(n) + arr.get(3))
avg = math.avg(top, btm)
vTop := top
vBtm := btm
hi = high, lo = low, cl = close
getC = hi > avg ? hi : lo < avg ? lo : cl
prc_points.push(chart.point.from_index(n, 100 * math.max(-1.5, math.min(1.5, (getC - btm) / (top - btm)))))
for poly in polyline.all
poly.delete()
if barstate.islast
labH.delete(), labH := label.new(n, 100, str.tostring(vTop, format.mintick), color=color.new(chart.fg_color, 85), textcolor=RED, style=label.style_label_lower_left, size=12)
labL.delete(), labL := label.new(n, 0, str.tostring(vBtm, format.mintick), color=color.new(chart.fg_color, 85), textcolor=GRE, style=label.style_label_upper_left, size=12)
polyline.new(prc_points.size() >= 5000 ? prc_points.slice(prc_points.size()-4999, prc_points.size()-1) : prc_points, line_color=chart.fg_color)
________________________________________________________________________________________________________________________ :='
⎞ Variables ⎛
(__---------__) '
//bool trigerring fit
refit = false
var top_points = array.new(0)
var prc_points = array.new(0)
var btm_points = array.new(0)
//Variables arrays
var peaks_y = array.new(0)
var peaks_x = array.new(0)
var peaks_x2 = array.new(0)
var btms_y = array.new(0)
var btms_x = array.new(0)
var btms_x2 = array.new(0)
var tb = table.new(dshLoc, 4, 8
, bgcolor = #1e222d
, border_color = #373a46
, border_width = 1
, frame_color = #373a46
, frame_width = 1)
________________________________________________________________________________________________________________________ :='
⎞ Exec ⎛
(__----__) '
//Top Bottom detection
max = ta.max(high)
var min = low
min := max == high ? low
: math.min(low , min)
barsmax = ta.barssince(high == max)
barsmin = ta.barssince(low == min)
if barsmax == threshold
nmax = n-barsmax
if peaks_x .size() > 0 and peaks_x.last() != lastHi
peaks_y .set(-1, math.log( max) )
peaks_x .set(-1, math.log(nmax) )
peaks_x2.set(-1, math.pow(math.log(nmax), 2))
else
peaks_y .push( math.log(max) )
peaks_x .push( math.log(nmax) )
peaks_x2.push( math.pow(math.log(nmax), 2))
lastHi := math.log(nmax)
refit := true
else
min := math.min(low , min)
if barsmin == threshold
nmin = n-barsmin
if btms_x .size() > 0 and btms_x.last() != lastLi
btms_y .set(-1, math.log(min) )
btms_x .set(-1, math.log(nmin) )
btms_x2 .set(-1, math.pow(math.log(nmin), 2))
else
btms_y .push( math.log( min) )
btms_x .push( math.log(nmin) )
btms_x2.push( math.pow(math.log(nmin), 2))
lastLi := math.log(nmin)
refit := true
chMax = ta.change(max) , chMin = ta.change(min)
if (chMax != 0 or chMin != 0) and proactive and not refit and n > threshold
= log_reg(peaks_x, peaks_x2, peaks_y)
= log_reg( btms_x, btms_x2, btms_y)
top = math.exp(a_top * math.log(n) + b_top)
btm = math.exp(a_btm * math.log(n) + b_btm)
if 100 * ((high - btm) / (top - btm)) > 90
if peaks_x.last() == lastHi
peaks_y .push(math.log(max))
peaks_x .push(math.log(n))
peaks_x2.push(math.log(n)
*math.log(n))
else
peaks_y .set(-1, math.log(max))
peaks_x .set(-1, math.log(n))
peaks_x2.set(-1, math.log(n)
* math.log(n))
arr.set(0, a_top), arr.set(1, b_top)
arr.set(2, a_btm), arr.set(3, b_btm)
refit := true
proActH := true
if 100 * ((low - btm) / (top - btm)) < 10
if btms_x.last() == lastLi
btms_y .push(math.log(min))
btms_x .push(math.log(n))
btms_x2.push(math.log(n)
*math.log(n))
else
btms_y .set(-1, math.log(min))
btms_x .set(-1, math.log(n))
btms_x2.set(-1, math.log(n)
* math.log(n))
arr.set(0, a_top), arr.set(1, b_top)
arr.set(2, a_btm), arr.set(3, b_btm)
refit := true
proActL := true
enough = peaks_x.size() > 1 and btms_x.size() > 1
if enough
draw(peaks_x, peaks_x2, peaks_y, btms_x, btms_x2, btms_y, top_points, prc_points, btm_points, refit)
else
if barstate.islast
txt = ''
if peaks_x.size() < 2
txt += str.format('{0} Top Swing', peaks_x.size())
if btms_x .size() < 2
if txt != ''
txt += ', '
txt += str.format('{0} Bottom Swing', btms_x .size())
txt += ' Change "Threshold" or timeframe for more Swings'
tb.cell(0, 0, txt, text_color=chart.fg_color, text_size=txtSize)
________________________________________________________________________________________________________________________ :='
⎞ Plot ⎛
(__----__) '
plot(n%2==0? 30 : na,'30' , color=color.new(chart.fg_color, 50), style=plot.style_linebr, display=display.pane)
plot(n%2==0? 70 : na,'70' , color=color.new(chart.fg_color, 50), style=plot.style_linebr, display=display.pane)
_100 = plot(100, 'na(100)', display=display.none)
_70 = plot( 70, 'na(70)' , display=display.none)
_60 = plot( 60, 'na(60)' , display=display.none)
_50 = plot( 50, 'na(50)' , display=display.none)
_40 = plot( 40, 'na(40)' , display=display.none)
_30 = plot( 30, 'na(30)' , display=display.none)
_00 = plot( 0, 'na(0)' , display=display.none)
fill(_100, _70, 100, 70, color.new(RED, 50), INV)
fill( _60, _50, 60, 50, INV, color.new(chart.fg_color, 85))
fill( _50, _40, 50, 40, color.new(chart.fg_color, 85), INV)
fill( _30, _00, 30, 0, INV, color.new(GRE, 75))
________________________________________________________________________________________________________________________ :='
⎞ End ⎛
(__---__) '
Ichimoku AdvancedGreetings. I present to you an improved version of the indicator from LuxAlgo - Ichimoku Theories.
I am grateful to them for the work they have done, since I myself have no experience in programming on Pine Script.
I have supplemented their indicator with such functions as:
Multi-timeframe Tenkan and Kijun lines - you will always know where on the lower timeframe there is a stronger resistance/support.
Ichimoku line formation areas - they can be used as a visualization of the number of bars that appear in the near lines, and for forecasting when the growth of the lines is caused by the fading of candles. They can also be used as measures for setting stop orders.
3-line pattern detector - Marker showing when the price is above/below the lines Tenkan ----> Kijun ----> Senkou A.
Please note that the calculation takes into account the CLOSING price of the candle.
3 Chikou Span lines - for those who use the 3 Chikou Span strategy -9, -26, -52 from the current bar ----> forward.
Points of the expected next direction of the Tenkan, Kijun, Senkou A and B lines and Senkou A and B with 0 offset.
Senkou A and B lines with 0 offset - for visualization of possible resistance/support
Calculation of the angle of inclination of the Ichimoku lines - for better perception of the trend strength. A 90° scale is used for measurement, where 0 is the horizontal position of the line
Measuring the distance from the current price to the Tenkan and Kijun lines - for better interpretation of the next possible price movements
Table - all key points for opening a position are displayed in the table. But please CONSIDER THE CONTENT and THE THEORY OF CYCLES AND WAVES by Goichi Hosoda.
May the take profit be with you!
Luma DCA Tracker (BTC)Luma DCA Tracker (BTC) – User Guide
Function
This indicator simulates a regular Bitcoin investment strategy (Dollar Cost Averaging). It calculates and visualizes:
Accumulated BTC amount
Average entry price
Total amount invested
Current portfolio value
Profit/loss in absolute and percentage terms
Settings
Investment per interval
Fixed amount to be invested at each interval (e.g., 100 USD)
Start date
The date when DCA simulation begins
Investment interval
Choose between:
daily, weekly, every 14 days, or monthly
Show investment data
Displays additional chart lines (total invested, value, profit, etc.)
Chart Elements
Orange line: Average DCA entry price
Grey dots: Entry points based on selected interval
Info box (bottom left): Live summary of all key values
Notes
Purchases are simulated at the closing price of each interval
No fees, slippage, or taxes are included
The indicator is a simulation only and not linked to an actual portfolio
Touch 30 EMA & 150 EMA - Candle Signal//@version=5
indicator("Touch 30 EMA & 150 EMA - Candle Signal", overlay=true)
// Calculate EMAs
ema30 = ta.ema(close, 30)
ema150 = ta.ema(close, 150)
// Candle types
isGreen = close > open
isRed = close < open
// Candle touches both EMAs (either open-high-low-close range includes both)
touchesBothEMAs = low <= ema30 and high >= ema30 and low <= ema150 and high >= ema150
// Signals
greenArrow = isGreen and touchesBothEMAs
redArrow = isRed and touchesBothEMAs
// Plot arrows
plotshape(greenArrow, title="Green Candle Touch", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)
plotshape(redArrow, title="Red Candle Touch", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)
// Plot EMAs for reference
plot(ema30, color=color.orange, title="EMA 30")
plot(ema150, color=color.blue, title="EMA 150")
Copper to Bitcoin RatioRatio: Divides copper price by Bitcoin price (copper / bitcoin). Since copper is in USD per pound and Bitcoin is in USD, the ratio is unitless but reflects copper’s value relative to Bitcoin.
Plotting: The ratio is plotted as a blue line, with an optional 20-period simple moving average (red line) for smoothing.
This can reflect market sentiment (e.g., industrial demand vs. crypto speculation).
Copper to Gold Ratioratio = copper / gold: Calculates the ratio by dividing copper price by gold price.
plot(ratio): Plots the ratio as a blue line.
ma = ta.sma(ratio, 20): Adds a 20-period simple moving average (optional) to smooth the ratio, plotted as a red line.
A rising Copper/Gold ratio often signals economic expansion (strong copper demand relative to gold), while a falling ratio may indicate economic uncertainty or recession fears, as gold outperforms copper.
The ratio is also used as a leading indicator for 10-year U.S. Treasury yields, with a rising ratio often correlating with higher yields.
Adaptive Quadratic Kernel EnvelopeThis study draws a fair-value curve from a quadratic-weighted (Nadaraya-Watson) regression. Alpha sets how sharply weights decay inside the look-back window, so you trade lag against smoothness with one slider. Band half-width is ATRslow times a bounded fast/slow ATR ratio, giving an instant response to regime shifts without overshooting on spikes. Work in log space when an instrument grows exponentially, equal percentage moves then map to equal vertical steps. NearBase and FarBase define a progression of adaptive thresholds, useful for sizing exits or calibrating mean-reversion logic. Non-repaint mode keeps one-bar delay for clean back-tests, predictive mode shows the zero-lag curve for live decisions.
Key points
- Quadratic weights cut phase error versus Gaussian or SMA-based envelopes.
- Dual-ATR scaling updates width on the next bar, no residual lag.
- Log option preserves envelope symmetry across multi-decade data.
- Alpha provides direct control of curvature versus noise.
- Built-in alerts trigger on the first adaptive threshold, ready for automation.
Typical uses
Trend bias from the slope of the curve.
Entry timing when price pierces an inner threshold and momentum stalls.
Breakout confirmation when closes hold beyond outer thresholds while volatility expands.
Stops and targets anchored to chosen thresholds, automatically matching current noise.
Confluence Pannel📊 RSI / MACD / ADX Info Panel — Indicator Overview
This Pine Script v6 indicator is a compact visual dashboard that displays real-time insights from three popular technical indicators — RSI, MACD, and ADX — in a color-coded panel at the top-right of your TradingView chart.
🔍 What It Shows
✅ RSI (Relative Strength Index)
Measures momentum and potential overbought/oversold conditions.
Green background: RSI is above 50 (bullish momentum).
Red background: RSI is below 50 (bearish momentum).
Extra label:
"OVER BOUGHT" if RSI > input threshold (default 70)
"OVER SOLD" if RSI < input threshold (default 30)
✅ MACD (Moving Average Convergence Divergence)
Indicates trend strength and direction.
Green background: MACD line is above signal line → Bullish
Red background: MACD line is below signal line → Bearish
Label displays: "Bullish" or "Bearish"
✅ ADX (Average Directional Index)
Measures the strength of the trend, not its direction.
Background and label color changes:
🔴 Red: ADX < 20 → "Bad" (no trend)
🟠 Orange: 20 ≤ ADX < 25 → "Weak" (choppy trend)
🟢 Green: 25 ≤ ADX < 30 → "Good" (valid trend)
🔵 Blue: ADX ≥ 30 → "Best" (strong trend)
🧠 How to Use It
Add to Chart: Paste the script into TradingView’s Pine Editor, click “Add to Chart,” and you’ll see a table appear in the top-right corner.
Interpret Quickly: Use the panel to quickly assess:
Is momentum building or fading? (RSI)
Is there a trend direction? (MACD)
Is the trend strong enough to trade? (ADX)
Make Fast Trade Decisions:
Look for all green/blue for optimal bullish conditions.
Mixed colors may indicate range-bound or weakening setups.
Use it as a confluence check before entering trades.
Day of Week Highlighter# 📅 Day of Week Highlighter - Global Market Edition
**Enhanced visual trading tool that highlights each day of the week with customizable colors across all major global financial market timezones.**
## 🌍 Global Market Coverage
This indicator supports **27 major financial market timezones**, including:
- **Asia-Pacific**: Tokyo, Sydney, Hong Kong, Singapore, Shanghai, Seoul, Mumbai, Dubai, Auckland (New Zealand)
- **Europe**: London, Frankfurt, Zurich, Paris, Amsterdam, Moscow, Istanbul
- **Americas**: New York, Chicago, Toronto, São Paulo, Buenos Aires
- **Plus UTC and other key financial centers**
## ✨ Key Features
### 🎨 **Fully Customizable Colors**
- Individual color picker for each day of the week
- Transparent overlays that don't obstruct price action
- Professional color scheme defaults
### 🌐 **Comprehensive Timezone Support**
- 27 major global financial market timezones
- Automatic daylight saving time adjustments
- Perfect for multi-market analysis and global trading
### ⚙️ **Flexible Display Options**
- Toggle individual days on/off
- Optional day name labels with size control
- Clean, professional appearance
### 📊 **Trading Applications**
- **Market Session Analysis**: Identify trading patterns by day of week
- **Multi-Market Coordination**: Track different markets in their local time
- **Pattern Recognition**: Spot day-specific market behaviors
- **Risk Management**: Avoid trading on historically volatile days
## 🔧 How to Use
1. **Add to Chart**: Apply the indicator to any timeframe
2. **Select Timezone**: Choose your preferred market timezone from the dropdown
3. **Customize Colors**: Set unique colors for each day in the settings panel
4. **Enable/Disable Days**: Toggle specific days on or off as needed
5. **Optional Labels**: Show day names with customizable label sizes
## 💡 Pro Tips
- Use different color intensities to highlight your preferred trading days
- Combine with other session indicators for comprehensive market timing
- Perfect for swing traders who want to identify weekly patterns
- Ideal for international traders managing multiple market sessions
## 🎯 Perfect For
- Day traders tracking intraday patterns
- Swing traders analyzing weekly cycles
- International traders managing multiple markets
- Anyone wanting better visual organization of their charts
**Works on all timeframes and instruments. Set it once, trade with confidence!**
---
*Compatible with Pine Script v6 | No repainting | Lightweight performance*
SlopeDirectionLine_TWSlopeDirectionLine_TW
___________________________
Tried to copy a MT4 indicator
Market Sessions Indicator by NomadTradesCustomisable Market session indicator
This indicator visually marks the high and low price levels for the Asia, London, and New York trading sessions directly on the chart, using distinct horizontal lines and color-coding for each session. Each session’s high and low are labelled for easy identification, allowing traders to quickly assess key support and resistance levels established during major global market hours. The indicator is designed for clear session demarcation, helping users identify price reactions at these significant levels and supporting multi-session analysis for intraday and swing trading strategies
Weekly High/Low + Breakout Probabilities (Debug Fixed)This script will tell you which day created the high or low of the week, the probability of it being that day and the probability that a day will break last weeks H/L
Holy Grail (100% Win Rate)tldr:
1. Here you go folks – no repaint, no dodgy stuff, and 100% win rate
2. DO NOT TRADE THIS
________________________________________
Key points:
• Assets to trade: SPY, NASDAQ, DAX, FTSE, Bitcoin
• Time Frame: 1D or higher
________________________________________
What does the script do?
The script buys a certain amount of the asset every time we're in a pullback, and sells when we make a new All-Time High (ATH). More specifically, it waits for the first green candle after the lowest point of the pullback, and then adds to the position. We assume that when we see a green candle, the pullback is over. If we go even lower – we wait for another green candle. The script sells on the first red candle after an ATH.
The pullback is identified using a simple moving average (MA) – if we're below the MA, we're in a pullback.
You can set the MA length in the settings. I considered adding different types of MAs, but decided against it as it wouldn't change much in terms of the general idea.
You can also set the percentage of your account to invest on the very first candle – this is an initial pre-filling of the position, so you have something to sell if the price goes straight up after you start trading. If you think we’re in a bear market and the only way is up, you might want to set a higher number. On the other hand, if you believe we’re near the top of a bull market, set a lower one.
You can set the percentage of the position to sell on each red candle after ATH under Settings → Input → Exit % . Similarly, you can set the percentage to buy on each green candle after a pullback low under Settings → Properties → Order Size . Since bull markets tend to last longer than bear market pullbacks, you’ll typically want Exit % to be larger than Order Size — though this may vary depending on your initial pre-fill.
________________________________________
Why these assets?
These are assets that are expected to go up over the long run. I call them “number go up” assets. Meaning: no matter where they are now, at some point in the future they’ll make a new ATH. That’s why this might not work on individual stocks like Nvidia or Tesla — there’s no guarantee they won’t go bust tomorrow. We all remember big companies from the past (Enron, Lehman Brothers, etc.) that collapsed unexpectedly.
With SPY, you're betting on the American economy. And the American economy will go up at least because of inflation. If you believe inflation will continue, then you believe we’ll eventually see a new ATH in SPY. It may take years — like from 2007 to 2013 — but it happened. And there was a bull run after that.
And if you think the American economy will never grow again — well, if that’s true, we’ll all have much bigger problems than trading scripts.
________________________________________
Why this time frame?
Because, as mentioned, it may take a long time to reach a new ATH. You can use a shorter time frame, but that requires a higher TradingView subscription plan to view multi-year data.
Also, if you choose a shorter time frame, you should reduce the Order Size and Exit % accordingly, because the script will jump in on every new green candle after a pullback. On a 1-minute chart, that could mean 100x more entries compared to daily. Conversely, if you go to a higher time frame, increase the sizes — otherwise, too much of your capital will just sit unused.
________________________________________
So if everything is so great and it has a real 100% win rate – why not trade it?
If you turn on the “buy & hold equity” curve, you’ll see that the profit from all closed trades (with a 100% win rate) is smaller than if you had simply bought the asset and held it for years.
Real-world slippage and fees will reduce your actual profits even more.
If you’re unlucky and start trading at the very top of a bull market, it might take 10 years before even a single trade is closed.
Some assets that seem like they can only go up long-term... might not. Take Bitcoin. Many believe it can only go up in the long term, but it could still die — just like anything else. The only reason I included it is because many people treat it as a “number go up” asset. And I know some will try to trade it. You've been warned. But I don’t want to start holy wars in the holy grail description (pun intended), so let’s move on.
________________________________________
What if, after all this, you do decide to trade this strategy?
Why would you? Maybe not for profit, but just to impress your friends with a 100% win rate. Or maybe you skipped the entire explanation above and just want to jump in because it sounds like a sure win.
Whatever your reason, first you should research the asset’s historical max time (in years) between ATHs. That’s how long you might need to keep a trade open. My other script – Cycles Analysis – might help with this.
Second, experiment with the input parameters. There aren't many, so it should be easy to find what works best for your asset. You can also enable “Show stats table” in settings – it’ll help you see how many entries/exits the script makes, which will help you find the right Order Size to Exit % ratio.
Yes, this might lead to over-optimization — but hey, if we’re at this stage, who cares, right?
That said, I did find some rare cases where specific parameter setups caused performance to dip below 100% due to a mandatory close at the wrong time.
Also, since trades can last for years, don’t use this with futures — you'd have to keep rolling them over. Use ETFs or similar long-holdable assets.
________________________________________
The final word
In short, this is a glorified “Buy the Dip” strategy. It only works long-term on a very limited set of assets, and in most cases performs worse than just buying and holding for the same period.
I created this script as a teaching tool — to show new traders that win rate isn’t everything. Even if the win rate is 100%. Trust me: it’s extremely hard to beat the market (especially without leverage), and this script is just more proof of that.