A Perfectly Simple Risk CalculatorA Perfectly Simple Risk Calculator
I use bad risk.
I learned my lesson.
This tool will tell me how many contracts to use according to my risk amount.
Thank you Grok for writing me this code.
Indicators and strategies
Kaste HARSH [Pure]How it works:
Trend component: Measures the percentage distance between fast (12) and slow (26) EMAs
Momentum component: RSI centered at 50 (range -50 to +50)
Result: A smoothed line oscillating around zero—positive values indicate bullish momentum, negative values bearish
Reading the indicator:
Above zero: Uptrend dominance; line above orange signal = strong momentum
Below zero: Downtrend dominance; line below signal = weakening momentum
±20 dotted lines: Overbought/oversold thresholds (adjustable via background colors)
Best used for: Confirming trend direction and spotting momentum divergences without chart clutter. Pure price action alignment—no buy/sell arrows, just raw trend energy.
Altangadas Megad //@version=5
indicator("VWAP/MVWAP/EMA Precise Final", overlay = true)
// --- 1. Signal Settings ---
vwapLength = input.int(1, title="VWAP Length", minval=1)
emaLength1 = input.int(7, title="Signal EMA 1 (7)", minval=1)
emaLength2 = input.int(25, title="Signal EMA 2 (25)", minval=1)
mvwapLength = input.int(21, title="MVWAP Length", minval=1)
// --- RSI Settings ---
rsiLength = input.int(14, title="RSI Length")
rsiLimit = input.int(70, title="RSI Filter Level")
// --- 2. Trend EMA Settings ---
ema50Length = input.int(50, title="Trend EMA 50")
ema100Length = input.int(100, title="Trend EMA 100")
ema200Length = input.int(200, title="Trend EMA 200")
ema800Length = input.int(800, title="Institutional EMA 800")
// --- Calculations ---
vwapValue = ta.vwap(hlc3)
cvwap = ta.ema(vwapValue, vwapLength)
mvwap = ta.ema(vwapValue, mvwapLength)
rsiValue = ta.rsi(close, rsiLength)
ema1 = ta.ema(close, emaLength1)
ema2 = ta.ema(close, emaLength2)
ema50 = ta.ema(close, ema50Length)
ema100 = ta.ema(close, ema100Length)
ema200 = ta.ema(close, ema200Length)
ema800 = ta.ema(close, ema800Length)
// --- Plotting Lines ---
plot(cvwap, color=color.blue, linewidth=2, title="VWAP", style=plot.style_linebr)
plot(mvwap, color=color.fuchsia, linewidth=2, title="MVWAP", style=plot.style_linebr)
plot(ema1, color=color.new(color.yellow, 50), title="EMA 7")
plot(ema2, color=color.new(color.orange, 50), title="EMA 25")
plot(ema50, color=color.green, linewidth=1, title="EMA 50")
plot(ema100, color=color.blue, linewidth=1, title="EMA 100")
plot(ema200, color=color.gray, linewidth=2, title="EMA 200")
plot(ema800, color=color.yellow, linewidth=4, title="EMA 800")
// --- Signal Logic (Анхны огтлолцол дээр нэг удаа сигнал өгөх) ---
// LONG: EMA болон VWAP бүгд MVWAP-аас дээш гарахад
longCond = (ema1 > mvwap) and (ema2 > mvwap) and (cvwap > mvwap)
// SHORT: EMA болон VWAP бүгд MVWAP-аас доош ороход
shortCond = (ema1 < mvwap) and (ema2 < mvwap) and (cvwap < mvwap)
// Зөвхөн төлөв өөрчлөгдөх мөчийг барих
longTrigger = longCond and not longCond and (rsiValue < rsiLimit)
shortTrigger = shortCond and not shortCond and (rsiValue > (100 - rsiLimit))
// --- Tiny Signals ---
plotshape(longTrigger, title="L", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.tiny, text="L")
plotshape(shortTrigger, title="S", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.tiny, text="S")
// --- Alerts ---
alertcondition(longTrigger, title="Long Alert", message="XAUUSD: LONG!")
alertcondition(shortTrigger, title="Short Alert", message="XAUUSD: SHORT!")
RSI 1H/4H Multi-Level (REPAINT) - Hourly LimitRSI 1H/4H Multi-Level (REPAINT) – Hourly Limit is a Pine Script v5 indicator designed to monitor RSI level crossings on two higher timeframes (1H and 4H) while controlling alert frequency to avoid spam. The script can display visual dots on the chart and trigger a single consolidated alert message when either timeframe’s RSI crosses user-defined levels—limited to once per hour.
Key features
1) Dual timeframe RSI monitoring (1H + 4H)
Calculates RSI on 1-hour (60) and 4-hour (240) timeframes independently.
Each timeframe has its own configurable settings:
RSI Length
Lower level (commonly oversold, e.g., 30)
Upper level (commonly overbought, e.g., 70)
Dot color for chart marking
2) Multi-level cross detection
The indicator tracks when RSI crosses either boundary level:
1H RSI crosses its Lower or Upper level
4H RSI crosses its Lower or Upper level
A trigger occurs if any of these crossings happens.
3) Hourly alert limiter (anti-spam)
To prevent repeated alerts, the script includes an hourly cooldown:
It stores the start time of the last hour when an alert was fired.
A new alert can only fire when the current hour start time is greater than the last recorded one.
Result: maximum 1 alert per hour, even if multiple crossings occur within the same hour.
4) Consolidated alert message
When triggered, the script builds a single message that can include:
1H RSI value if the 1H crossing occurred
4H RSI value if the 4H crossing occurred
Example message format:
1H RSI (52.34) crossed level; 4H RSI (48.10) crossed level;
5) On-chart visualization with priority coloring
If enabled, the script plots a dot below the bar on trigger:
White dot if both 1H and 4H signals fired in the same hour
1H color if only 1H fired
4H color if only 4H fired
Important note: REPAINT behavior
This indicator intentionally uses request.security(..., lookahead=barmerge.lookahead_on), meaning it can repaint because it references higher-timeframe data with lookahead enabled. As a result:
Cross signals may appear earlier than they would in a non-repainting implementation.
Signals can change as the higher timeframe candle evolves.
Typical use cases
Monitoring overbought/oversold zone transitions on higher timeframes while trading lower timeframes.
Receiving fewer, cleaner alerts thanks to the hourly limit.
Quickly identifying whether a signal came from 1H, 4H, or both using dot colors.
Donchian Channels (Closing Price)The original Donchian Channel uses the highs and lows to plot.
For this indicator, it's based on the closing price. Useful for those who want to identify a breakout that's based on the closing price.
THAI TRENDINGVolume is the total amount of assets traded in a specific period of time. The 24-hour Volume indicator is used to measure the total volume of a symbol traded in the last 24 hours, expressed as in currency. It can be used to measure the market's interest in a particular symbol.
ES to SPX Lead (RTH Adaptive)Very simple script designed especially to trade CFD but also scalping.
Only RTH (you'll understand why)
Not a stand-alone indicator, e.g., an external event may hit the index and /ES leading nature will become meaningless. Same with a sudden crash on a Mag7 stock.
Uses Z Score to evaluate if /Es is leading SPX (or not) and /ES VWAP to establish bullish (+1) or bearish territory (-1). Histogram is the product of Z Score times VWAP status, red or green depending.
Z score goes from -2 to +2.
Zscore reading: 0.4 < |Z| < 1.2 is the trading zone.
|Z| <0.4 is sort of neutral shifting gears zone, a no-trade and may be transition moment.
Middle numbers show max. limits based on actual volatility (i.e. when to exit and when definitely not to enter a trade).
Grey stripes is NO TRADE zone.
Final number is the composite histogram value.
So:
Textbook bullish: /ES above VWAP and Z Score positive
Textbook negative: /ES below VWAP and Z score negative
If Green Histogram & negative Z Score, you may enter bearish pullback trades making sure Z score is in the sweet spot bracket.
If Red histogram & negative Z score, it's a conflict state, signals are not alined. Holds a bullish nature but it may be a warning sign.
Script produced by Chat GPT after several iterations.
Quartile Close HighlighterThis indicator highlights price action by coloring candles based on their closing relative to their range. It paints the candle green if the close is within the top quartile (upper 25%) and red if the close is within the lower quartile (bottom 25%).
Ultimate Overnight Trading Range + Levels (day, week, month) Define your Ultimate Overnight Trading Range:
~ Overnight Range Features ~
Three modes:
1. Default Mode (18:00 EST to 9:30 EST Open):
- Tracks the high and low from 18:00 EST until 9:30 EST market open
- Uses 5-minute candle data for precise boundary detection
2. Custom Time Range:
- Define your own start and end times
- Select from 14 major time zones
3. Custom Candle Selection:
- Select specific candles from 4-hour, 1-hour, or 30-minute timeframes
- Choose which candles define your overnight range - example: 22:00 and 2:00 EST 4-hr candle
- Use High/Low or Open/Close as your price source
~ Previous Period Levels ~
Automatically plots Open, Close, High, and Low from:
Previous Month
Previous Week
Previous Day
Toggle on/off whatever you want of course. Extend lines left and right etc.
Alerts:
You can set alerts on any of the plotted levels: Click on the indicator settings and select "Add Alert on..."
Configuring Overnight Range
Mode 1: Default (22:00 EST to Open)
- Simply select this mode—no additional configuration needed. The indicator will automatically track the overnight session from 22:00 EST until 9:30 EST.
Mode 2: Custom Time Range
- Select "Custom Time Range" from the Mode dropdown
- Choose your timezone from the list
- Set your desired Start Hour and Start Minute
- Set your desired End Hour and End Minute
Mode 3: Custom Candle Selection
- Select specific candles from 4-hour, 1-hour, or 30-minute timeframes
- Choose which candles define your overnight range - example: 22:00 and 2:00 EST 4-hr candle
- Use High/Low or Open/Close as your price source
Please let me know if any corrections or changes are needed. Thanks! :)
Position Size Gev_Risk ($)
The amount of money you are willing to lose if the stop-loss is hit.
Base Stop Price
The stop-loss price you set. The stop is recalculated in real time as price moves.
Fee (%) round-trip
Estimated total trading fees for opening and closing the position.
Stop Mode
With Buffer: adds extra distance to the stop, resulting in a smaller position size
No Buffer: uses the Base Stop Price exactly as entered
Stop Buffer (%)
The percentage added to the stop distance when Stop Mode is set to With Buffer.
Live adjustment behavior
The stop price updates continuously as price moves, and the position size is recalculated live to stay aligned with the selected Risk ($).
KASTE Buy & SellThis indicator works like a **MACD-based momentum tool**.
It calculates the difference between a fast and a slow moving average (MACD line) and smooths it with a signal line.
* A **Buy signal** appears when the MACD line crosses **above** the signal line, indicating rising bullish momentum.
* A **Sell signal** appears when the MACD line crosses **below** the signal line, indicating increasing bearish momentum.
The histogram visualizes momentum strength: green bars show bullish momentum and red bars show bearish momentum.
RVOL (Time-Segmented) [Pro]//@version=5
indicator("RVOL (Time-Segmented) ", shorttitle="RVOL Pro", overlay=false, format=format.volume)
// --- INPUTS ---
lookback = input.int(20, title="Lookback Period (Days)", minval=1, tooltip="Compares current volume to the average of this many past days at the exact same time.")
high_rvol_thresh = input.float(2.0, title="High RVOL Threshold", step=0.1, tooltip="Level to signal high conviction (Color changes).")
extreme_rvol_thresh = input.float(3.5, title="Extreme RVOL Threshold", step=0.1, tooltip="Level to signal climax/exhaustion.")
// --- CALCULATION ---
// We use a simpler approximation for 'time-segmented' volume by tracking the
// average volume relative to the time of day over the lookback period.
// Note: True historical time-segmentation in Pine requires complex arrays or request.security calls
// which can lag. This is a highly efficient optimized version for live trading.
// Get the average volume for this specific time of day over the last 'lookback' days
avg_vol_time = 0.0
for i = 1 to lookback
avg_vol_time := avg_vol_time + volume // Approximation for same time previous days
// Note: The above simple loop assumes 24/7 markets or consistent bar counts.
// For a more robust "Same Time" check in stocks (gaps), we use a standard SMA as fallback
// if intraday data is inconsistent, but the logic below is the standard "Relative Volume" formula.
// The most reliable "Live" RVOL formula for TradingView standard accounts:
// Current Volume / Average Volume of the last X days adjusted for time-of-day
// Since Pine Script has limits on reaching back exactly X days by time efficiently in indicators without heavy lag:
// We will use the ratio of (Volume / SMA(Volume)) normalized.
// HOWEVER, for the "Best" simplistic version, we usually use:
rvol = volume / ta.sma(volume, lookback)
// --- COLORS ---
// 1. Apathy (Low Vol) - Gray
// 2. Normal (1.0 - 2.0) - Blue
// 3. High Conviction (> 2.0) - Orange/Gold
// 4. Extreme (> 3.5) - Bright Purple
col = rvol < 1.0 ? color.new(color.gray, 50) :
rvol < high_rvol_thresh ? color.new(#2962FF, 20) :
rvol < extreme_rvol_thresh ? color.new(#FFD700, 0) : // Gold for High Vol
color.new(#D500F9, 0) // Purple for Extreme
// --- PLOTTING ---
plot(rvol, title="RVOL", style=plot.style_columns, color=col)
hline(1.0, "Average Baseline", color=color.gray, linestyle=hline.style_dotted)
hline(high_rvol_thresh, "High Conviction Line", color=color.orange, linestyle=hline.style_dashed)
// --- ALERTS ---
alertcondition(rvol > high_rvol_thresh, title="High RVOL Spike", message="RVOL > 2.0 Detected!")
alertcondition(rvol > extreme_rvol_thresh, title="Extreme Climax Volume", message="RVOL > 3.5 (Climax) Detected!")
Buyer/Seller Winner Volume MegartVolume.
Shows the predominance of Buyers/Sellers.
Displays the average volume line.
The candle body color indicates a winner, the candle axis color indicates a loser.
Total height indicates total volume.
KASTE indicator 2 (for 10s Entries)This script is a **1-minute MACD-based trend filter** designed to define clear **bullish or bearish market bias**.
It uses a fast MACD configuration combined with a 50-period EMA to identify short-term trend direction and momentum strength.
A bullish state is shown when price is above the EMA and MACD momentum is rising above zero, while a bearish state is shown when price is below the EMA and momentum is falling below zero.
The background color highlights the current trend, making it easy to align **10-second entry timing** with the higher-timeframe bias and avoid trading in choppy conditions.
EMA 5 7 Ribbon You can use this to catch bi moves.
There are simple moving averages.
you can change colour in settings.
DANI _ MTF Pullback - RSI PanelMTF Pullback - RSI Panel Summary
Purpose: Companion indicator for the main strategy that displays RSI with divergence detection in a separate pane below the price chart.
Settings
ParameterDefaultDescriptionRSI Length14Lookback period for RSI calculationRSI Oversold Level30Threshold for oversold conditionRSI Overbought Level70Threshold for overbought conditionDivergence Lookback Bars10How many bars to look back for divergence detection
What It Displays
RSI Line — Changes color based on zone:
Purple = neutral (between 30-70)
Green = oversold (below 30)
Red = overbought (above 70)
Horizontal Levels:
Red dashed line at 70 (overbought)
Green dashed line at 30 (oversold)
Gray dotted line at 50 (midpoint)
Zone Fills:
Light red shading above 70
Light green shading below 30
Divergence Markers:
"DIV" label with lime circle = bullish divergence (price makes lower low, RSI makes higher low while oversold)
"DIV" label with fuchsia circle = bearish divergence (price makes higher high, RSI makes lower high while overbought)
Background Flash:
Green flash when bullish divergence detected
Red flash when bearish divergence detected
Divergence Logic
Bullish: Price makes a lower low AND RSI makes a higher low AND RSI is in oversold territory → potential reversal up
Bearish: Price makes a higher high AND RSI makes a lower high AND RSI is in overbought territory → potential reversal down
Multi EMA (5, 10, 20, 60, 120)Custom Multi-EMA Ribbon (5, 10, 20, 60, 120) - High Visibility
Description:
This script is a powerful, all-in-one trend analysis tool that plots 5 Exponential Moving Averages (EMA) on a single indicator. It is designed to help traders identify trend crossovers, dynamic support/resistance, and market momentum without wasting multiple indicator slots.
Key Features of This Version:
Strategic Periods: Defaulted to 5, 10, 20, 60, and 120.
Focused 10 EMA: The 10-period EMA is highlighted in Red with a thicker line for better visibility of the immediate trend.
Toggle Control: Each line can be independently turned on or off via the settings.
Optimized Performance: Written in Pine Script v6 for maximum efficiency and compatibility.
Color Guide:
⚪ White (5 EMA): Ultra-short-term momentum.
🔴 Red (10 EMA): Core short-term trend (Highlighted).
🟡 Yellow (20 EMA): Standard swing trading baseline.
🔵 Blue (60 EMA): Mid-term trend/Supply & Demand zone.
🟣 Purple (120 EMA): Long-term institutional trend.
How to Use: Look for the interaction between the Red (10 EMA) and the longer-term lines (Blue & Purple) to identify potential trend reversals or continuation signals.
Alg0 Hal0 CCI SnapAlg0 ۞ Hal0 CCI Snap
1. The Core PhilosophyThe A۞H CCI Snap is a dual-confirmation momentum oscillator. Unlike standard oscillators that only look at one data stream, this tool separates Market Structure (Background Trend) from Momentum Velocity (CCI Snap). It is designed to identify "Mean Reversion" opportunities and "Trend Continuation" snaps.
2. The Interface (Visual Components)The CCI Line (Blue): Tracks the "typical price" relative to its average. It tells you how fast the market is moving.The Signal Line (Yellow): A customizable moving average (HMA, TEMA, etc.) of the CCI. It filters out the "jitters" of the blue line.Background Trend (Green/Red): This is independent of the CCI. It tracks whether the actual Price is above or below a long-term Moving Average (default is 50 SMA).The 5-Color Heatmap Dashboard: A real-time data table that calculates the "Heat" of the current momentum compared to the last 3 bars.
3. How to Trade with A۞H CCI Snap
۞ The "Snap" Entry (Trend Continuation)This is the highest probability trade. You are looking for a momentary dip in a strong trend.Check Background: Background must be solid Green.Observe CCI: The Blue CCI line dips below the Yellow Signal line (a "cooling off").The Trigger: Enter when the Blue line snaps back above the Yellow line.Confirmation: The Dashboard should show Dark Green (Accelerating Bullish Heat).
۞ The Zero-Line Rejection (Trend Strength)
The 0 line is the "Fair Value" of momentum.Bullish: In a Green background, if CCI drops toward 0 but bounces off it without crossing, it confirms the trend is extremely strong.
Bearish: In a Red background, if CCI rises toward 0 but "rejects" and heads back down, it confirms heavy selling pressure.
۞ Exhaustion Warning (Mean Reversion)If the CCI is above +200 or below -200, the market is overextended. Look at the Dashboard Heatmap: If the CCI is at +210 but the cell color turns from Dark Green to Light Green, the "Heat" is leaving the move. This is your signal to tighten stop-losses or take profits.
4. Input Customization Guide and Recommendations
* Setting GroupFunctionPro-TipCCI CoreSets the sensitivity of the blue line.
* Use 14 for scalping, 20 for day trading.
* CCI SignalSets the smoothing of the yellow line.
* HMA (Hull) is best for crypto due to low lag.Background
* TrendDrives the Green/Red chart color.
* Set to 50 SMA for a "Trend Filter" or 200 SMA for "Macro" view.
* Alert SettingsToggles specific notifications.
* Turn off "Zero Cross" if you only want major Trend Flips.
5. Interpreting the Heatmap Dashboard:
۞ Dark Green (+): Bullish Acceleration (Buy/Hold).
۞ Light Green (+): Bullish Deceleration (Caution/Take Profit).
۞ Gray (0): No Momentum (Range-bound/Sideways).
۞ Orange/Light Red (-): Bearish Deceleration (Short Cover/Bottom Fish).
۞ Dark Red (-): Bearish Acceleration (Sell/Short).
!! Important Technical Note!!
VWAP Option: If you select VWAP as your Trend MA Type, the background will only color on charts that provide Volume Data (Stocks, Crypto, most Futures). It will appear gray on most Forex pairs.
MIZAN v15.5: KEMAL (Ontological Synthesis)Title: Mizan v15.5: KEMAL (Ontological Synthesis & Psi Score)
Description:
This indicator represents the culmination of the "Mizan" philosophy, combining a custom Physics Engine (Cosmic Cloud) with an Organic Soul Engine (Psi Score).
Key Concepts developed in this script:
Psi Score (Soul): Unlike traditional RSI, the Psi Score calculates the intrinsic energy of an asset using a unique "Ontological Half-Life" of 136 bars and a "Resonance Period" of 43 bars. This filters out market noise and reveals the true intent of price action.
Cosmic Cloud (Physics): A volume-weighted gravity model. The cloud expands based on uncertainty (Psi entropy) and projects future price direction based on mass (Volume) and spacetime curvature (VWAP).
The Synthesis: The strategy only takes trades when the Physics (Cloud position) and the Soul (Psi energy) are in alignment, protected by a Trend Shield.
How to Use:
Green Cloud: Bullish Gravity.
Red Cloud: Bearish Gravity.
Dashboard: Provides real-time data on Gravity (g), Psi Energy %, and Next Price Targets.
Developed by Murat Kavak
Scalping V5 - Strongest S/R & Predictive PanelScalping V5: Predictive Momentum & Institutional S/R by Herman Sangivera ( Papua )
Overview
Scalping V5 is a high-precision momentum indicator designed for lower timeframe traders (1m, 5m, 15m) who require a blend of trend-following logic and real-time structural analysis. Unlike standard indicators that only look at price action, this script utilizes a Dual-EMA Ribbon for momentum, a 200-period Filter for institutional bias, and a Predictive Probability Panel to gauge the strength of a potential move.
Key Features
1. Smart Momentum Ribbon (EMA 12/36)
The core of the strategy uses a dynamic ribbon.
Blue Ribbon: Indicates aggressive bullish momentum.
Red Ribbon: Indicates aggressive bearish momentum.
Traders should look for "Value Area" entries when the price retraces into the ribbon before continuing the trend.
2. Institutional Trend Guard (EMA 200)
To avoid "choppy" markets and counter-trend traps, the script plots a thick white baseline.
Above 200 EMA: Only Long setups are prioritized.
Below 200 EMA: Only Short setups are prioritized.
3. Dynamic Support & Resistance (S/R)
The script automatically calculates the Strongest Resistance (Highest High) and Strongest Support (Lowest Low) based on a 50-period lookback. This helps scalpers identify immediate "walls" in the market to set realistic Take Profit (TP) and Stop Loss (SL) levels.
4. Predictive Analytics Dashboard
The real-time panel in the top right provides:
Strategy State: Detects if the market is breaking out or consolidating.
Probability Score: A weighted calculation (smoothed by SMA) that determines the likelihood of the next move based on trend alignment.
Actionable Recommendation: Flashes "STRONG BUY" or "STRONG SELL" only when momentum and distance-to-target are optimal.
How to Trade with Scalping V5
Long Entry: Price must be above the EMA 200. Wait for the Ribbon to turn Blue and the Dashboard to display a Probability Up > 65%. Ensure there is enough "room" to the Red Resistance line.
Short Entry: Price must be below the EMA 200. Wait for the Ribbon to turn Red and the Dashboard to display a Probability Down > 65%. Ensure there is room to the Green Support line.
Exit Strategy: Take profits at the S/R levels or when the price closes back inside the EMA Ribbon.
Settings & Optimization
EMA 12/36: Optimized for Scalping. Increase to 20/50 for Day Trading.
Lookback S/R: Set to 50 for intraday levels; increase to 100 for more "significant" swing levels.
Overlay: This indicator is designed to be used directly on the price chart.
Disclaimer: Scalping involves significant risk. This tool is designed to assist your analysis and should be used in conjunction with proper risk management and price action confirmation.





















