EL OJO DE DIOS - FINAL (ORDEN CORREGIDO)//@version=6
indicator("EL OJO DE DIOS - FINAL (ORDEN CORREGIDO)", overlay=true, max_boxes_count=500, max_lines_count=500, max_labels_count=500)
// --- 1. CONFIGURACIÓN ---
grpEMA = "Medias Móviles"
inpShowEMA = input.bool(true, "Mostrar EMAs", group=grpEMA)
inpEMA21 = input.int(21, "EMA 21", minval=1, group=grpEMA)
inpEMA50 = input.int(50, "EMA 50", minval=1, group=grpEMA)
inpEMA200 = input.int(200, "EMA 200", minval=1, group=grpEMA)
grpStrategy = "Estrategia"
inpTrendTF = input.string("Current", "Timeframe Señal", options= , group=grpStrategy)
inpADXFilter = input.bool(true, "Filtro ADX", group=grpStrategy)
inpADXPeriod = input.int(14, "Período ADX", group=grpStrategy)
inpADXLimit = input.int(20, "Límite ADX", group=grpStrategy)
inpRR = input.float(2.0, "Riesgo:Beneficio", group=grpStrategy)
grpVisuals = "Visuales"
inpShowPrevDay = input.bool(true, "Máx/Mín Ayer", group=grpVisuals)
inpShowNY = input.bool(true, "Sesión NY", group=grpVisuals)
// --- 2. VARIABLES ---
var float t1Price = na
var bool t1Bull = false
var bool t1Conf = false
var line slLine = na
var line tpLine = na
// Variables Prev Day
var float pdH = na
var float pdL = na
var line linePDH = na
var line linePDL = na
// Variables Session
var box nySessionBox = na
// --- 3. CÁLCULO ADX MANUAL ---
f_calcADX(_high, _low, _close, _len) =>
// True Range Manual
tr = math.max(_high - _low, math.abs(_high - _close ), math.abs(_low - _close ))
// Directional Movement
up = _high - _high
down = _low - _low
plusDM = (up > down and up > 0) ? up : 0.0
minusDM = (down > up and down > 0) ? down : 0.0
// Smoothed averages
atr = ta.rma(tr, _len)
plus = 100.0 * ta.rma(plusDM, _len) / atr
minus = 100.0 * ta.rma(minusDM, _len) / atr
// DX y ADX
sum = plus + minus
dx = sum == 0 ? 0.0 : 100.0 * math.abs(plus - minus) / sum
adx = ta.rma(dx, _len)
adx
// --- 4. CÁLCULO DE DATOS ---
ema21 = ta.ema(close, inpEMA21)
ema50 = ta.ema(close, inpEMA50)
ema200 = ta.ema(close, inpEMA200)
// MTF Logic
targetTF = inpTrendTF == "Current" ? timeframe.period : inpTrendTF == "15m" ? "15" : "60"
// CORRECCIÓN AQUÍ: Uso de argumentos nominales (gaps=, lookahead=) para evitar errores de orden
f_getSeries(src, tf) =>
tf == timeframe.period ? src : request.security(syminfo.tickerid, tf, src, gaps=barmerge.gaps_on, lookahead=barmerge.lookahead_off)
tf_close = f_getSeries(close, targetTF)
tf_high = f_getSeries(high, targetTF)
tf_low = f_getSeries(low, targetTF)
tf_ema21 = ta.ema(tf_close, inpEMA21)
tf_ema50 = ta.ema(tf_close, inpEMA50)
// Calcular ADX
float tf_adx = f_calcADX(tf_high, tf_low, tf_close, inpADXPeriod)
// Cruces
bool crossUp = ta.crossover(tf_ema21, tf_ema50)
bool crossDown = ta.crossunder(tf_ema21, tf_ema50)
bool crossSignal = crossUp or crossDown
bool adxOk = inpADXFilter ? tf_adx > inpADXLimit : true
// --- 5. LÓGICA DE SEÑALES ---
if crossSignal and adxOk and barstate.isconfirmed
t1Price := tf_ema21
t1Bull := tf_ema21 > tf_ema50
t1Conf := false
if not na(slLine)
line.delete(slLine)
slLine := na
if not na(tpLine)
line.delete(tpLine)
tpLine := na
label.new(bar_index, high + (ta.atr(14)*0.5), text="CRUCE T1", color=t1Bull ? color.green : color.red, textcolor=color.white, size=size.small)
bool touch = false
if not na(t1Price) and not t1Conf
if t1Bull
touch := low <= t1Price and close >= t1Price
else
touch := high >= t1Price and close <= t1Price
if touch and barstate.isconfirmed
t1Conf := true
float atr = ta.atr(14)
float sl = t1Bull ? low - (atr*0.1) : high + (atr*0.1)
float dist = math.abs(t1Price - sl)
float tp = t1Bull ? t1Price + (dist * inpRR) : t1Price - (dist * inpRR)
label.new(bar_index, t1Price, text="ENTRADA", color=color.yellow, textcolor=color.black, size=size.small)
slLine := line.new(bar_index, sl, bar_index + 15, sl, color=color.red, style=line.style_dashed, width=2)
tpLine := line.new(bar_index, tp, bar_index + 15, tp, color=color.green, style=line.style_dashed, width=2)
// --- 6. GRÁFICO ---
col21 = ema21 > ema21 ? color.teal : color.maroon
col50 = ema50 > ema50 ? color.aqua : color.fuchsia
col200 = ema200 > ema200 ? color.blue : color.red
plot(inpShowEMA ? ema21 : na, "EMA21", color=col21, linewidth=2)
plot(inpShowEMA ? ema50 : na, "EMA50", color=col50, linewidth=2)
plot(inpShowEMA ? ema200 : na, "EMA200", color=col200, linewidth=2)
bgcolor(ema50 > ema200 ? color.new(color.green, 95) : color.new(color.red, 95))
// --- 7. SESIÓN NY ---
isNYSummer = (month(time) == 3 and dayofmonth(time) >= 14) or (month(time) > 3 and month(time) < 11)
hourOffset = isNYSummer ? 4 : 5
nyHour = (hour - hourOffset) % 24
bool isSession = nyHour >= 6 and nyHour < 11
if isSession and inpShowNY
if na(nySessionBox)
nySessionBox := box.new(bar_index, high, bar_index, low, bgcolor=color.new(color.blue, 92), border_color=color.new(color.white, 0))
else
box.set_right(nySessionBox, bar_index)
box.set_top(nySessionBox, math.max(high, box.get_top(nySessionBox)))
box.set_bottom(nySessionBox, math.min(low, box.get_bottom(nySessionBox)))
if not isSession and not na(nySessionBox)
box.delete(nySessionBox)
nySessionBox := na
// --- 8. MÁX/MÍN AYER ---
hCheck = request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on)
lCheck = request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on)
if not na(hCheck)
pdH := hCheck
if not na(lCheck)
pdL := lCheck
if barstate.islast and inpShowPrevDay
line.delete(linePDH)
line.delete(linePDL)
if not na(pdH)
linePDH := line.new(bar_index - 50, pdH, bar_index, pdH, color=color.green)
if not na(pdL)
linePDL := line.new(bar_index - 50, pdL, bar_index, pdL, color=color.red)
alertcondition(crossSignal, "Cruce T1", "Cruce Tendencia 1")
alertcondition(touch, "Entrada Confirmada", "Entrada Confirmada")
Indikatoren und Strategien
Donchian Channels (Multi Time Frame) x 3)📊 MTF Donchian Channels Pro — Triple Timeframe Structure
MTF Donchian Channels Pro is a professional-grade multi-timeframe market structure indicator designed to help traders visualize trend, momentum, and execution zones on a single chart.
This tool allows you to plot up to three independent Donchian Channels, each with its own configurable timeframe and lookback length, giving you instant insight into multi-timeframe alignment and breakout conditions.
By stacking higher, medium, and lower timeframe channels, traders can eliminate noise, improve timing, and trade in the direction of dominant market structure.
🔧 Key Features
✅ Up to 3 independent Donchian Channels
✅ Individual timeframe selection for each channel
✅ Adjustable lookback length per channel
✅ Optional show/hide per channel
✅ Midline (basis) for structure reference
✅ Clean visual fills for fast interpretation
✅ Works on all markets and timeframes
🎯 How to Use
This indicator is designed to support multi-timeframe trading systems.
Example configuration:
• Channel 1 → Lower timeframe (Execution)
• Channel 2 → Medium timeframe (Momentum)
• Channel 3 → Higher timeframe (Structure)
Long Bias Example
Price above higher timeframe channel
Pullback into mid timeframe range
Breakout on lower timeframe channel
Short Bias Example
Price below higher timeframe channel
Retrace into structure
Breakdown on execution timeframe
When all channels align, probability increases.
📈 Best Use Cases
✔ Futures Scalping
✔ Options Day Trading
✔ Forex & Crypto
✔ Swing Trading
✔ Prop Firm Evaluations
✔ Trend-Following Systems
⚠️ Risk Disclaimer
This indicator is a market structure visualization tool and does not provide financial advice. Always use proper risk management and confirm with your own strategy.
My Candle (HTF Overlay)
This indicator overlays Higher Timeframe (HTF) candles, such as Daily or Weekly, onto your current chart background. It allows you to grasp the larger trend while trading on lower timeframes.
- Accurate Historical Data: By utilizing "lookahead", this script ensures that the High and Low of the HTF candles align perfectly with the price action on historical charts.
- Gap Filling: Includes an option to fill data gaps for a smoother visual experience.
- Customization: You can easily change the timeframe and adjust the transparency of colors to suit your chart theme.
1. Add to the chart.
2. Open settings to select your target timeframe (e.g., "1 Day" or "1 Week").
3. Adjust the "Gap" and "Transparency" settings as needed.
MA Band Area (Objective Zone)This indicator can be useful for you to create areas of dynamic purchase, you just need to contextualise when to stop in range, on smaller time frames it is very powerful but also for long term with stock it is very precise
Trend-Based Fibs: Static Labels at StartThis indicator automatically projects Fibonacci extension levels and "Golden Zones" starting from the opening price of a new period (Daily or Weekly). By using the previous period’s range (High-Low) as the basis for volatility, it provides objective price targets and reversal zones for the current session.
How it Works Unlike standard Fibonacci Retracements that require manual drawing from swing highs to lows, this tool uses a fixed anchor method: The Range: It calculates the total range of the previous day or week.
The Anchor: It sets the current period's opening price as the "Zero Line."The Projection: It applies Fibonacci ratios ($0.236$, $0.5$, $0.786$, $1.0$, and $1.618$) upward and downward from that opening price.
Key Features Automated Levels: No more manual drawing. Levels reset and recalculate automatically at the start of every Daily or Weekly candle. Bullish & Bearish Zones: Instantly see extensions for both directions. The "Golden Zones": Highlighted boxes represent the high-probability $0.236$ to $0.5$ zones for both long and short continuations. Previous Period Levels: Optional toggles to show the previous High and Low, which often act as major support or resistance.
Integrated EMAs: Includes two customizable Exponential Moving Averages (default 20 and 100) to help you stay on the right side of the trend.
Clean Visuals: Labels are pinned to the start of the period to keep your charts uncluttered while lines extend dynamically as time progresses.
How to Trade with it Trend Continuation: If price opens and holds above the $0.236$ bullish level, look for the $0.618$ and $1.0$ levels as targets.
Reversals: Watch for price exhaustion at the $1.618$ extension, especially if it aligns with an EMA or a Previous High/Low.
Gap Plays: Excellent for "Opening Range" strategies where you use the first close of the day as the pivot point for the extensions.
Custom Stochastic Momentum Index (SMI)📊 Custom Stochastic Momentum Index (SMI)
Custom Stochastic Momentum Index (SMI) is a refined momentum oscillator designed to identify trend strength, reversals, and overbought/oversold conditions with higher accuracy than traditional stochastic indicators.
This version gives traders full control over smoothing and signal calculation, making it suitable for intraday, swing, and positional trading across all markets.
🔹 Key Features
Fully customizable %K Length
Adjustable %K Smoothing and Double Smoothing
Configurable %D Period
User-selectable %D Moving Average Type
SMA
EMA
WMA
RMA
Fixed and proven levels:
Overbought: +40
Oversold: −40
Automatic shaded zones above overbought and below oversold levels
Clear K–D crossover labels for precise entry and exit timing
Clean, non-repainting logic
📈 How to Use
Bullish Setup
Look for %K crossing above %D near or below −40
Bearish Setup
Look for %K crossing below %D near or above +40
Trend Confirmation
Trade crossovers in the direction of the higher-timeframe trend
Works best when combined with:
Price Action
Support & Resistance
Market Structure / SMC concepts
🎯 Best For
Intraday traders
Swing traders
Momentum-based strategies
Confirmation with structure or breakout systems
⚠️ Disclaimer
This indicator is for educational and analytical purposes only.
It does not provide financial advice. Always use proper risk management.
US Stock Market Performance by Sector[Dots3Red]This indicator displays the annual performance of the U.S. stock market by sector.
Selected major sectors
IND – Industrials
TECH – Technology
HTH – Healthcare
FIN – Financials
COMM – Communication Services
CONSCYC – Consumer Cyclical
CONSSTAP – Consumer Staples
ENERGY – Energy
REAL ESTATE – Real Estate
BASMAT – Basic Materials
The data is presented in a table below the main chart.
Green cell — the sector was bullish during that year
Red cell — the sector was bearish during that year
The table automatically sorts sectors by performance, placing the best-performing sector at the top for each year.
NOTE:
Annual performance is calculated starting from 2020 by default (arbitrarily chosen) and can be adjusted by the user.
PRO AI SUPER TREND JEETUNSE ENGINEIts super super super trend on the tradingview one of the best money making indicator
Adaptive Regime Master: The Dual-Engine FrameworkAdaptive Regime Master: The Dual-Engine Framework
Overview
The Adaptive Regime Master: The Dual-Engine Framework is a sophisticated technical analysis tool designed to solve the "Indicator Paradox"—the reality that trend-following tools fail in sideways markets, and mean-reversion tools fail in strong trends.
Instead of forcing a single mathematical model onto an ever-changing market, this framework utilizes a Master Switch logic. It continuously analyzes market volatility and directional strength to dynamically toggle between two specialized trading engines. By identifying the current "Market Regime," the indicator automatically reconfigures its visual interface and signal logic to match the environment.
The Dual-Engine Architecture
The framework operates on a logic-gate system powered by the Average Directional Index (ADX) :
1. The Momentum Engine (Trendy Regime):
Activation: Triggered when ADX rises above the 25 threshold, signaling a confirmed trend.
Logic: Utilizes a combination of Exponential Moving Averages (EMA) for trend-following and MACD Histogram for momentum confirmation.
Visuals: The chart de-clutters to show only the EMA trend-line and momentum-based signals.
2. The Mean-Reversion Engine (Choppy Regime):
Activation: Triggered when ADX falls below 25, signaling a range-bound or consolidating market.
Logic: Switches to Bollinger Bands and the Relative Strength Index (RSI) to identify overextended price action at the range extremes.
Visuals: The EMA disappears, and the chart displays Bollinger Bands to help users visualize the "value area" and potential reversal zones.
Key Features
Alternating Signal Logic: Built-in state management ensures that signals always alternate (Buy → Sell → Buy). This prevents "signal clustering" and provides a clean, actionable roadmap for the user.
Dynamic ATR-Based Protection: The indicator calculates Stop Loss (SL) and Take Profit (TP) levels using the Average True Range (ATR) . Crucially, the multipliers adjust based on the regime: wider stops for volatile trends and tighter stops for quiet ranges.
Intrabar Execution Guard: To prevent "false exits," the framework includes a calculation safeguard that prevents SL/TP triggers on the same candle as the entry, ensuring the trade has room to breathe.
Real-Time Regime Dashboard: An on-chart table provides an immediate summary of the current ADX value, the active engine mode, and the current position status.
Visual Regime Indicator: Background color changes dynamically—Blue for Trend Mode, Orange for Range Mode.
Comprehensive Alert System: Built-in alerts for Long Entry, Short Entry, TP Hit, and SL Hit events.
How to Use
Identify the Background: A Blue background indicates the Momentum Engine is active; an Orange background indicates the Mean-Reversion Engine is active.
Execution: Follow the BUY and SELL labels. The framework handles the logic of whether it is a "breakout" or a "reversal" based on the active engine.
Risk Management: Once a signal appears, Red (SL) and Lime (TP) crosses will appear on the chart. These are your mathematical boundaries for the trade.
The Exit: The position is considered closed when price hits the SL/TP markers (indicated by orange/yellow crosses) or when an opposing signal is generated.
Monitor the Dashboard: Use the top-right table to track the current regime, ADX value, active mode, and position status in real-time.
Input Parameters
ADX Length: Period for ADX calculation (default: 14)
ADX Smoothing: Smoothing period for ADX (default: 14)
ADX Trend Threshold: Threshold to distinguish trend from range (default: 25)
EMA Length: Period for the Exponential Moving Average (default: 20)
BB Length: Period for Bollinger Bands (default: 20)
BB Multiplier: Standard deviation multiplier for Bollinger Bands (default: 2.0)
RSI Length: Period for RSI calculation (default: 14)
ATR Length: Period for Average True Range (default: 14)
ATR Mult (Trend): ATR multiplier for stop loss in trend mode (default: 1.5)
ATR Mult (Range): ATR multiplier for stop loss in range mode (default: 0.8)
Min SL % (of price): Minimum stop loss as percentage of price (default: 0.5%)
Pros and Cons
Pros:
Versatility: Performs in all market conditions, reducing the need for multiple separate indicators.
Reduced Fakeouts: Filters out "trend signals" during flat markets and "reversal signals" during parabolic moves.
Visual Clarity: Only shows the indicators relevant to the current market state, reducing cognitive load and chart clutter.
Automated Risk-Reward: Automatically plots 1:2 Risk-Reward levels based on current volatility.
Professional-Grade Logic: Implements state management to prevent signal conflicts and ensure clean alternating entries.
Multi-Timeframe Compatibility: Works on any timeframe, though optimized for intraday and swing trading.
Cons:
Lagging Nature: Like all ADX-based systems, there is a slight lag when the market transitions from a range to a trend.
Threshold Sensitivity: The default ADX threshold of 25 may need tuning for extremely low-volatility assets or different timeframes.
Not a "Holy Grail": While it filters many bad trades, sudden fundamental news or black swan events can still bypass technical logic.
Requires Discipline: Users must follow the signals and respect the SL/TP levels for the framework to be effective.
Learning Curve: New users may need time to understand the regime-switching concept and trust the automated logic.
Why Use This Framework?
Most traders lose money because they apply the wrong tool to the wrong market. They use RSI to "sell the top" of a breakout, or use Moving Averages to "buy the dip" in a sideways grind. The Adaptive Regime Master removes the emotional guesswork by mathematically defining the market state and forcing the strategy to adapt.
This is a professional-grade framework for traders who value:
Logic over emotion
Discipline over impulse
Chart cleanliness over indicator overload
Adaptive systems over static strategies
Whether you're a scalper, day trader, or swing trader, this framework provides a systematic approach to reading market conditions and executing high-probability setups with predefined risk management.
Best Practices
Never forget to adjust Stop Loss and Take Profit level related to the interval you (will) use. (Default parameters are optimized for 60m)
Always backtest the indicator on your specific asset and timeframe before live trading
Adjust the ADX threshold based on the volatility characteristics of your market
Use the framework in conjunction with proper position sizing and account risk management
Pay attention to the regime dashboard—avoid forcing trades when the market is transitioning between regimes
Set up alerts for all signal types to avoid missing opportunities
Consider fundamental analysis and news events alongside technical signals
Detailed Disclaimer
FINANCIAL RISK WARNING:
Trading foreign exchange, stocks, indices, cryptocurrencies, and commodities on margin carries a high level of risk and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in any financial instrument, you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment; therefore, you should not invest money that you cannot afford to lose.
NO INVESTMENT ADVICE:
The "Adaptive Regime Master: The Dual-Engine Framework" is an educational tool designed to assist in technical analysis. It does not constitute investment advice, financial advice, trading advice, or a recommendation to buy or sell any security or financial instrument. All content provided by this indicator is for informational and educational purposes only.
PAST PERFORMANCE:
Past performance is not indicative of future results. Hypothetical or simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading and may not be impacted by brokerage and other slippage fees. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight.
NO GUARANTEE:
No representation is being made that any account will or is likely to achieve profits or losses similar to those shown in any backtests or forward tests. The author and developers of this indicator make no warranties, expressed or implied, regarding the accuracy, completeness, or reliability of the information provided.
USER RESPONSIBILITY:
Users should perform their own due diligence and test the logic on a demo or paper trading account before applying it to live capital. You are solely responsible for your own investment and trading decisions. The author and developers assume no responsibility for any financial losses, damages, or adverse consequences incurred through the use of this tool.
ACCEPTANCE OF TERMS:
Use of this indicator constitutes acceptance of these terms and acknowledgment that you understand the risks involved in trading financial instruments.
REGULATORY NOTICE:
This indicator is not affiliated with, endorsed by, or approved by any financial regulatory authority. Always consult with a licensed financial advisor before making investment decisions.
200 EMA Scalping 1 MinuteOnly Scalping in 1 Minute Super accurate, low faults, Strict rule based management, in Nifty 50
asia range baskets as an indicatorasia range baskets as an indicator. you can see all the baskets or remove them to filter out noise
tunnel of 5 as an indicatorthis is the tunnel of 5 concept but in an indicator format that can selectively tracks baskets. but can reduce to 2 pairs.
200 EMA Scalping 1 Minute (Only Nifty 1 Min Scalping)Only for scalping in 1 minute timeframe in Nifty 50.
Sharpe Ratio [Alpha Extract]A sophisticated risk-adjusted return measurement system that calculates annualized Sharpe Ratio with dynamic color-coded visualization distinguishing return quality across positive and negative performance regimes. Utilizing rolling period calculations with smoothed moving average comparison, this indicator delivers institutional-grade performance assessment with overbought/oversold threshold detection for extreme risk-adjusted return conditions. The system's four-tier color classification combined with histogram fills and background highlighting provides comprehensive visual feedback on whether current returns justify their volatility risk across varying market cycles.
🔶 Advanced Sharpe Ratio Calculation Engine
Implements classic Sharpe Ratio methodology measuring mean daily return divided by return standard deviation with annualization factor for consistent interpretation. The system calculates daily percentage returns, computes rolling mean and standard deviation over configurable periods, applies square root of 365 scaling for annualized comparison, and generates unbounded ratio values where higher positive readings indicate superior risk-adjusted performance.
// Core Sharpe Ratio Framework
Daily_Return = close / close - 1
Mean_Return = ta.sma(Daily_Return, Period)
StdDev_Return = ta.stdev(Daily_Return, Period)
Sharpe_Ratio = (Mean_Return / StdDev_Return) * sqrt(365)
🔶 Dynamic Four-Tier Color Classification
Features sophisticated color logic distinguishing between strong positive returns (green), weakening positive returns (yellow), weakening negative returns (orange), and strong negative returns (red) based on relationship to smoothed average. The system compares current Sharpe against SMA-smoothed baseline, applying green when positive and accelerating, yellow when positive but decelerating, orange when negative but improving, and red when negative and deteriorating for nuanced regime assessment.
🔶 Smoothed Baseline Comparison Framework
Implements SMA smoothing of Sharpe Ratio with configurable period to establish momentum reference line for trend determination within risk-adjusted returns. The system calculates simple moving average of raw Sharpe values, uses this smoothed line as directional benchmark, and determines whether current risk-adjusted performance is strengthening or weakening relative to recent average for color classification logic.
🔶 Extreme Threshold Detection System
Provides overbought and oversold level identification with configurable upper and lower bounds marking exceptional risk-adjusted return extremes. The system defaults to +4.3 for overbought threshold (extremely favorable risk-return profile) and -2.3 for oversold threshold (severely unfavorable risk-return profile), applying dashed horizontal reference lines and background highlighting when Sharpe breaches these statistical extremes requiring attention.
🔶 Histogram Fill Visualization Architecture
Creates gradient-filled histogram between Sharpe Ratio line and zero baseline using dynamic color matching with 30% transparency for intuitive positive/negative return distinction. The system fills area above zero with bullish colors (green/yellow) and below zero with bearish colors (orange/red), providing immediate visual confirmation of whether returns are compensating for volatility risk or destroying risk-adjusted value.
🔶 Background Zone Highlighting Framework
Implements subtle background coloring when Sharpe enters extreme overbought or oversold zones, alerting traders to statistically significant risk-adjusted return conditions. The system applies semi-transparent red background when ratio exceeds +4.3 (exceptionally strong risk-adjusted returns potentially unsustainable) and green background when below -2.3 (severely poor risk-adjusted returns potentially reversionary), creating visual alerts without obscuring price action.
🔶 Annualization Methodology Integration
Utilizes standard square root of time scaling (sqrt(365)) to convert rolling period Sharpe calculations into annualized format for cross-temporal comparison. The system applies this mathematical transformation ensuring Sharpe values represent expected annual risk-adjusted returns regardless of calculation period length, enabling consistent interpretation whether using 100-day or 200-day rolling windows.
🔶 Zero-Line Reference System
Provides critical zero-line plot serving as boundary between positive risk-adjusted returns (capital allocation justified by return/risk profile) and negative risk-adjusted returns (strategy destroying value on risk-adjusted basis). The system emphasizes this threshold as decision point where values above zero suggest continuation while values below zero indicate reconsideration of exposure.
🔶 Momentum-Based Color
Transitions Implements intelligent color switching logic that considers both absolute Sharpe value and its momentum relative to smoothed average, creating four distinct regimes for granular performance assessment. The system enables identification of bullish acceleration (green), bullish deceleration (yellow), bearish improvement (orange), and bearish acceleration (red) for nuanced position management beyond simple positive/negative classification.
🔶 Configurable Period Optimization
Features adjustable calculation period and smoothing length enabling optimization across different trading timeframes and volatility regimes. The system defaults to 150-period calculation (approximately 6-7 months of daily data) with 30-period smoothing, but allows customization from short-term tactical assessment to long-term strategic evaluation based on investment horizon and strategy requirements.
🔶 Performance Optimization Framework
Employs efficient rolling calculations with streamlined daily return processing and optimized standard deviation computation for smooth real-time updates. The system includes minimal computational overhead through single-pass mean and variance calculations, enabling consistent performance across extended historical periods while maintaining accuracy of risk-adjusted return measurements.
This indicator delivers sophisticated risk-adjusted return analysis through classic Sharpe Ratio methodology with enhanced visual classification distinguishing return quality and momentum. Unlike simple return-focused indicators, Sharpe Ratio penalizes volatility ensuring traders evaluate whether returns justify the risk undertaken. The system's four-tier color coding, smoothed baseline comparison, and extreme threshold detection make it essential for portfolio managers and systematic traders seeking objective performance assessment beyond raw price gains. High positive Sharpe values indicate efficient return generation relative to volatility risk, while negative values signal value destruction on risk-adjusted basis requiring strategy reassessment. The indicator excels at identifying periods when risk-taking is rewarded (green zones) versus periods when volatility exceeds returns (red zones) across cryptocurrency, forex, and equity markets for optimal capital allocation decisions.
Weekday open ConnectorIndicator connecting open candles between 2 days of the week. For example if you want to see weekend price action, in setting you select Saturday and Monday. Connected lines are red if Saturday opened higher than Monday, green in opposite case.
Position Size FTWhy you should use this indicator:
It gives you the exact position size in seconds, based on your equity, your risk %, and your real stop location, so you don’t guess.
It keeps your risk consistent even when the stop is wider or tighter, so one “normal” trade can’t become a big loss.
It blocks stupid mistakes like reusing the last size, moving the stop, or oversizing when you feel confident.
It makes drawdown control automatic: drop from 1% to 0.5% or 0.25% and the tool enforces it without you negotiating with yourself.
This tool is your “no excuses” position sizer.
You tell it your account size and how much you’re willing to lose on one trade. Then, for every chart, it calculates the position size that matches your stop distance. So your risk stays the same even when the stop is wide or tight.
If you use it on every chart, you stop doing the two things that destroy accounts: guessing size and oversizing.
Account Equity ($)
Set this to your current account value. Update it at least once a week, or after a big win or loss. If this number is wrong, every size it prints will be wrong.
Risk per Trade (%)
This is the percent you are willing to lose if the stop gets hit.
My recommendation if you trade my system
0.25% if you’re new, or if you’re not consistent yet. This keeps you alive while you learn.
0.5% as your normal size when you’re trading well.
1% only when your account is at an all time high and the market is clean.
0.25% when you are in a drawdown (especially if you are down more than 10%) and the market feels messy.
Max Position Size (%)
This is a safety cap. Even if the math says you can take a huge position, the tool will limit it.
I recommend 25%.
It stops you from loading too much into one trade, especially on tight stops where position size can explode.
LOD/HOD Lookback Bars
This tells the tool which low or high to use for the stop reference.
Use 1 if you are using the current day Low of Day or High of Day.
Use 2 if you are using the previous day Low of Day or High of Day.
If you switch between those two in your strategy, you should switch this setting to match the setup. Otherwise the sizing will be off.
Table Position, Text Size, Text Color
This is just display.
Pick a corner that doesn’t block your chart.
Keep Text Size on Normal.
Use black text if your chart background is light, and white text if your background is dark.
My clean default setup
Account Equity = your real number
Risk per Trade = 0.5%
Max Position Size = 25%
Lookback Bars = 1 most of the time, 2 when the setup calls for previous day levels
Table Position = anywhere you like, keep it out of the way
The simple rule
If the tool is on the chart, sizing becomes automatic. If sizing is automatic, discipline gets easier. And if discipline gets easier, you stop donating money to the market.
Relative Strength Scatter PlotThis is a modication to the indicator ably coded by LOAMEX but with some minor modifications and uses Australian Stock Exchange indices instead of US. This makes it easier for those to use in other countries becasue it has the template for adding indices and the benchmark.
Refer to the LOAMEX indicator for information or the text in this open source pinescript.
The plot shows the relative strength of various indices to a benchmark index, in this case, the ASX XJO200. Indices or sectors located close to the top right hand quadrant are showing the best out performance and thus make up the best source to create your watchlist.
Similarly, you can put stocks in your portfolio into the indicator and see which ones are closest to the upper right of the plot. Those residing in the bottom left quadrant need to be pruned from your portfolio or watched more carefully with closer stop losses.
SMA Cross Counter - MTF SmoothTitle Idea
SMA Cross Counter - MTF Smooth (Find the 50-Bar Sweet Spot)
Description
Overview
This indicator tracks and displays the number of bars elapsed since the current 20SMA crossed the Higher Timeframe (HTF) 20SMA. By quantifying the "age" of a trend, it is designed to help traders identify high-probability pullbacks with objective precision.
Strategy: The 50-Bar Sweet Spot
This script is built around a specific tactical observation:
The Target: A "One-Cushion Granville Setup" occurring approximately 50 bars after the crossover is often a high-probability "Sweet Spot." At this stage, the trend is usually well-established but still possesses significant momentum.
The Edge: By monitoring the counter in the bottom-right corner, you can move away from subjective "feel" and objectively judge the trend's maturity. It helps you avoid the high volatility of an early cross and the exhaustion risks of a late-stage trend (e.g., over 100 bars).
Key Features
Automatic MTF Selection The reference timeframe updates automatically as you switch charts.
1m chart → 5m SMA
5m chart → 30m (or 15m) SMA
15m chart → 1h SMA
Daily chart → Weekly SMA, and so on.
Smooth MTF Visualization Eliminates the "stepped/staircase" effect common in MTF indicators. It connects higher-TF data points with smooth, diagonal lines, maintaining a clean chart and showing the true slope of the trend.
Real-Time Bar Counter Resets to "0" at the exact moment of a crossover and increments by 1 with every new bar.
Settings
5m Chart Reference: Choose between 30m or 15m as the HTF source when trading on a 5m chart.
SMA Period: Defaults to 20, but fully adjustable to fit your specific strategy.
タイトル案
SMA Cross Counter - MTF Smooth (50本目のスイートスポット判定)
説明文(日本語)
概要
このインジケーターは、現在の20SMAが上位足の20SMAと交差してからの「経過バー数」をリアルタイムでカウントし、右下のテーブルに表示します。 単なるクロスの確認ではなく、トレンドの「経過時間」を数値化することで、押し目買い・戻り売りの精度を極限まで高めるために開発されました。
戦略:50本目のスイートスポット
本インジケーターは、以下のトレード理論をベースに設計されています。
狙い目: SMA同士がクロスしてから50本程度経過したタイミングでの「ワンクッショングランビル」は、トレンドの勢いが安定し、かつ伸び代が最も残されている**「スイートスポット」**となる可能性が高い。
メリット: 右下のカウンターを見るだけで、感覚に頼らず「今がトレンドの何合目か」を客観的に判断できます。クロス直後の不安定な時期や、100本を超えたトレンド終盤の失速リスクを避けるのに有効です。
主な機能
自動タイムフレーム選定 (Auto-MTF) チャートの時間軸を切り替えるだけで、表示中の足に合わせて最適な上位足を自動選択します。(例:5分足なら30分足SMA、15分足なら1時間足SMAなど)
滑らかな上位足ライン MTF特有の「階段状のギザギザ」を排除。上位足の確定値を直線で結ぶため、チャートを美しく保ちつつ、正確なトレンドの傾きを確認できます。
リアルタイム・カウンター SMAがクロスした瞬間に「0」へリセット。以降、1本ごとに加算されます。
設定項目
5分足チャート時の参照先: 上位足を「30分」にするか「15分」にするかを切り替え可能。
SMA期間: デフォルトは20。ご自身の手法に合わせて調整してください。
HTF Flip Close Levels, Daily Weekly Monthly TASHTF Flip Close Levels (D/W/M) — Support & Resistance Tool
This indicator automatically plots Daily, Weekly, and Monthly support & resistance levels based on higher-timeframe candle close behaviour.
🔹 What this tool does
The script detects HTF momentum flips using closed candles only:
Support is created when:
A red candle is followed by a green candle
The level is drawn at the close of the red candle
Resistance is created when:
A green candle is followed by a red candle
The level is drawn at the close of the green candle
This creates objective, rule-based horizontal levels derived purely from price behavior, not indicators.
🔹 Features
✅ Plots Daily, Weekly, and Monthly levels simultaneously
✅ Works on any timeframe (1m, 5m, 1H, Daily, Weekly, etc.)
✅ Keeps full historical levels, not just the most recent ones
✅ Optional auto-hide tapped levels (when price touches them)
✅ Tap detection:
Wick touch
or Close cross/touch
✅ Levels are always based on HTF candle closes, never wicks
✅ Designed to stay consistent across timeframe changes
🔹 How to use it (IMPORTANT)
This indicator:
❌ Does NOT predict market direction
❌ Does NOT generate buy/sell signals
❌ Does NOT tell you when to enter or exit
It is a context & confluence tool.
You should use these levels together with:
Market structure
Trend analysis
Volume / orderflow / CVD
Your own entry model
Your own risk management
Think of these levels as areas of interest, not automatic trade signals.
🔹 Best use cases
Confluence with:
Local support/resistance
VWAP / Anchored VWAP
Range highs/lows
Liquidity zones
Reversal or continuation patterns
Identifying:
HTF reaction zones
Decision points
Areas where other traders are likely watching
⚠️ Disclaimer
This indicator is a technical analysis tool only.
It is NOT financial advice.
It does NOT guarantee profits.
All trading decisions and risk are your responsibility.
Use it as part of a complete trading system, not as a standalone strategy.
PEGY RatioThe basic metrics that all indicators descend from are for each bar the Open, High, Low, Close and Volume where the Close is often noted as Price. Then the Price/Earnings ratio entered trading. Price/Earnings is often noted as P/E ratio or PE.
The first major formalisation and widespread use of the P/E ratio came in 1934, when Benjamin Graham and David Dodd introduced it in their landmark book "Security Analysis". Their work established the P/E ratio as a core tool in fundamental analysis and value investing.
Graham’s influence was profound: he used the P/E ratio to help investors judge whether a stock was overpriced or underpriced, and his teachings shaped generations of value investors, including Warren Buffett.
The P/E ratio evolved into modern variants like forward P/E and Shiller CAPE.
There’s no single P/E cutoff that definitively marks a “growth” or “income” stock, but investors commonly treat P/E below about 10–15 as value/income oriented and P/E above about 20–25 as growth oriented. It is important to watch the P/E trend. If the P/E is a low value and reducing in value, then the company may be failing, and it is not good to invest in.
P/E is a relative signal, not an absolute rule. A high P/E usually means the market expects above average future earnings growth; a low P/E often signals lower growth expectations, higher current yield, or elevated risk. Benchmarks vary by sector and cycle: what’s “high” for utilities is low for software. Historical market averages (e.g., S&P 500) help frame whether a multiple is elevated or depressed.
The next step was the PEG ratio which was first introduced in 1969 by Mario Farina, who described it in his book "A Beginner’s Guide to Successful Investing in the Stock Market".
The concept later gained widespread popularity thanks to Peter Lynch, who championed it in his 1989 bestseller "One Up on Wall Street", arguing that a “fairly priced” company tends to have a PEG of about 1. Over 1 is overpriced and below is a bargain.
Later the PEGY ratio, a variation of the PEG ratio that added dividend yield into the valuation came into prominence so that mature, dividend paying companies are treated “fairly” . The PEGY ratio emerged in the 1990s as analysts and portfolio managers began adapting the PEG ratio for dividend paying companies. The concept is a natural extension of Peter Lynch’s PEG logic: If growth matters, and dividends matter, combine them into one valuation metric.
PEGY (Price/Earnings Growth% and Dividend Yield) is a straightforward modification of the PEG ratio that adds dividend yield to the growth term so that mature, dividend paying companies aren’t penalized by low growth rates alone. The formula is typically written as:
PEGY=(Price/Earnings)/(Earnings growth %+Dividend yield%)
Peter Lynch (One Up on Wall Street, 1989) is the most cited printed source that describes a dividend adjusted PEG concept and applies it as a practical screening rule for investors. PEGY is in Chapter “Some Fabulous Numbers”.
If earnings are negative, then the PEGY ratio will be negative, and it is best to invest in companies that make money. That is, positive PEGY ratio.
The PEGY ratio can have different ratios depending upon whether historical data is used (Mario Farina preference) or whether forward looking earnings (Peter Lynch preference) is used in the calculations.
Enough for the history lesson. You can quickly go through your watchlist and determine which stocks have a PEGY Ratio from 0 to 1 and eliminate the others. Then whittle down that list to find stocks travelling from bottom left to upper right on the page. Use any other indicators on that reduced list that your tradng plan uses and there you have your list of stocks in which to invest.
STOCHRSI+WRsotch RSI indicator
WR indicator
2 in 1
use this indicator
we can see stoch RSI and WR% on 1 chart
stoch RSI above 0 , 0 to 100
WR% under 0, -100 to 0
if price on the uptrend
when stoch RSI below 20 , better buy
WR% below -80, better buy
if price is downtrend
when stoch RSI above 80 , better sell
WR% above -20, better sell
UTC+7 Time Highlight// // Input
// session1 = input.session("0600-0601", "Time Slot 1 (UTC+7)")
// session2 = input.session("0800-0801", "Time Slot 2 (UTC+7)")






















