NQ Position Size CalculatorNQ Position Size Line Calculator is designed specifically for Nasdaq 100 futures (NQ) and micro futures (MNQ) traders who want to maintain disciplined risk management. This visual tool eliminates the guesswork from position sizing by displaying distance lines and contract calculations directly on your chart.
The indicator creates horizontal lines at 10-tick intervals from your stop loss level, showing you exactly how many contracts to trade at each distance to maintain your predetermined risk amount. Whether you're trading regular NQ contracts or micro MNQ contracts, this calculator ensures you never risk more than intended while providing instant visual feedback for optimal position sizing decisions.
How to Use the Indicator
Step 1: Configure Your Settings
Stop Loss Price: Enter your exact stop loss level (e.g., 20000.00)
Risk Amount ($): Set your maximum dollar risk per trade (e.g., $500)
Contract Type: Choose between:
NQ (Regular): $5 per tick - for larger accounts
MNQ (Micro): $0.50 per tick - for smaller accounts or conservative sizing
Display Options:
Max Lines: Number of distance lines to show (default: 30)
Show Labels: Toggle tick distance and contract count labels
Line Color: Customize the color of distance lines
Label Size: Choose tiny, small, or normal label sizes
Step 2: Read the Visual Display
Once configured, the indicator displays:
Stop Loss Line:
Thick yellow line marking your exact stop loss level
Yellow label showing the stop loss price
Distance Lines:
Dashed red lines at 10-tick intervals above and below your stop loss
Lines appear on both sides for long and short position planning
Labels (if enabled):
Green labels (right side): For long positions above your stop loss
Red labels (left side): For short positions below your stop loss
Format: "20T 5x" means 20 ticks distance, 5 contracts maximum
Step 3: Use the Information Tables
The indicator provides two helpful tables:
Position Size Table (top-right):
Shows common tick distances (10, 20, 40, 80, 160 ticks)
Displays risk per contract at each distance
Contract count for your specified risk amount
Total risk with rounded contract numbers
Settings Table (bottom-right):
Confirms your current risk amount
Shows selected contract type
Displays current settings for quick reference
Step 4: Apply to Your Trading
For Long Positions:
Look at the green labels on the right side of your chart
Find your desired entry level
Read the label to see: distance in ticks and maximum contracts
Example: "30T 8x" = 30 ticks from stop, buy 8 contracts maximum
For Short Positions:
Look at the red labels on the left side of your chart
Find your desired entry level
Read the label for tick distance and contract count
Example: "40T 6x" = 40 ticks from stop, sell 6 contracts maximum
Step 5: Trading Execution
Before Entering a Trade:
Identify your stop loss level and input it into the indicator
Choose your entry point by looking at the distance lines
Note the contract count from the corresponding label
Verify the risk amount matches your trading plan
Execute your trade with the calculated position size
Risk Management Features:
Contract rounding: All position sizes are rounded down (never up) to ensure you don't exceed your risk limit
Zero position filtering: Lines only show where position size is at least 1 contract
Dual-sided display: Plan both long and short opportunities simultaneously
Сферы применения Pine
Multi-Time Period Charts with Wicks - ENEXSLWe wanted to see the candle wicks on the official Multi-Time Period Charts indicator.
This version has wick calculations added. Please see www.tradingview.com for the original indicator breakdown.
In short, this indicator will reference larger time periods and draw a candle with the wick around a smaller timeframe chart..
EMAs + LSMA Cross Alert (Mejorado)his indicator is designed to identify buy and sell signals based on the behavior of multiple exponential moving averages (EMAs) and a Least Squares Moving Average (LSMA). It includes 5 EMAs and one LSMA, with visual and alert features.
📌 Components:
EMA 4 (purple)
EMA 9 (Fuchsia)
EMA 21 (blue)
EMA 50 (Green)
EMA 200 (maroon)
LSMA 30 (Orange)
🔍 Signal Logic:
✅ Buy Signal:
The LSMA (30) must be below both EMA 4 and EMA 9.
A bullish crossover occurs: EMA 4 crosses above EMA 9.
Only one signal is triggered per crossover, avoiding repeated alerts during trend continuation.
❌ Sell Signal:
The LSMA (30) must be above both EMA 4 and EMA 9.
A bearish crossover occurs: EMA 4 crosses below EMA 9.
Only one signal is triggered per crossover, avoiding repeated alerts during trend continuation.
🖥️ Visual Features:
Option to show/hide each EMA and the LSMA.
Buy/Sell markers appear at cross points.
A white background highlight marks the candle where the signal occurs (optional).
Visuals scale dynamically with the chart zoom and axes.
🔔 Alerts:
Custom alert conditions for Buy and Sell.
Alerts can trigger push notifications to the TradingView mobile app, email, or webhook.
Configured to avoid repeating alerts unless the trend resets and a new valid crossover occurs.
Daily 10-ATR & %ATR (Top Right)Better version to be able to see ATR and the percentage it has moved at a glance, no charting just the numbers
ATR Label (Top Right)Final version easier to run daily ATR first, then move to lower time frames, only purpose is to see the ATR quick
Rolling Log Returns [BackQuant]Rolling Log Returns
The Rolling Log Returns indicator is a versatile tool designed to help traders, quants, and data-driven analysts evaluate the dynamics of price changes using logarithmic return analysis. Widely adopted in quantitative finance, log returns offer several mathematical and statistical advantages over simple returns, making them ideal for backtesting, portfolio optimization, volatility modeling, and risk management.
What Are Log Returns?
In quantitative finance, logarithmic returns are defined as:
ln(Pₜ / Pₜ₋₁)
or for rolling periods:
ln(Pₜ / Pₜ₋ₙ)
where P represents price and n is the rolling lookback window.
Log returns are preferred because:
They are time additive : returns over multiple periods can be summed.
They allow for easier statistical modeling , especially when assuming normally distributed returns.
They behave symmetrically for gains and losses, unlike arithmetic returns.
They normalize percentage changes, making cross-asset or cross-timeframe comparisons more consistent.
Indicator Overview
The Rolling Log Returns indicator computes log returns either on a standard (1-period) basis or using a rolling lookback period , allowing users to adapt it to short-term trading or long-term trend analysis.
It also supports a comparison series , enabling traders to compare the return structure of the main charted asset to another instrument (e.g., SPY, BTC, etc.).
Core Features
✅ Return Modes :
Normal Log Returns : Measures ln(price / price ), ideal for day-to-day return analysis.
Rolling Log Returns : Measures ln(price / price ), highlighting price drift over longer horizons.
✅ Comparison Support :
Compare log returns of the primary instrument to another symbol (like an index or ETF).
Useful for relative performance and market regime analysis .
✅ Moving Averages of Returns :
Smooth noisy return series with customizable MA types: SMA, EMA, WMA, RMA, and Linear Regression.
Applicable to both primary and comparison series.
✅ Conditional Coloring :
Returns > 0 are colored green ; returns < 0 are red .
Comparison series gets its own unique color scheme.
✅ Extreme Return Detection :
Highlight unusually large price moves using upper/lower thresholds.
Visually flags abnormal volatility events such as earnings surprises or macroeconomic shocks.
Quantitative Use Cases
🔍 Return Distribution Analysis :
Gain insight into the statistical properties of asset returns (e.g., skewness, kurtosis, tail behavior).
📉 Risk Management :
Use historical return outliers to define drawdown expectations, stress tests, or VaR simulations.
🔁 Strategy Backtesting :
Apply rolling log returns to momentum or mean-reversion models where compounding and consistent scaling matter.
📊 Market Regime Detection :
Identify periods of consistent overperformance/underperformance relative to a benchmark asset.
📈 Signal Engineering :
Incorporate return deltas, moving average crossover of returns, or threshold-based triggers into machine learning pipelines or rule-based systems.
Recommended Settings
Use Normal mode for high-frequency trading signals.
Use Rolling mode for swing or trend-following strategies.
Compare vs. a broad market index (e.g., SPY or QQQ ) to extract relative strength insights.
Set upper and lower thresholds around ±5% for spotting major volatility days.
Conclusion
The Rolling Log Returns indicator transforms raw price action into a statistically sound return series—equipping traders with a professional-grade lens into market behavior. Whether you're conducting exploratory data analysis, building factor models, or visually scanning for outliers, this indicator integrates seamlessly into a modern quant's toolbox.
SessionShades: London & NY CTSessionShades: London & NY CT is a lightweight TradingView indicator that visually highlights the London and New York trading sessions using a shaded background — no clutter, no blocks.
🔹 Time Zone: Central Time – automatically adjusts for DST
🔹 Sessions Highlighted:
• London: 2:00 AM – 11:00 AM CT
• New York: 7:00 AM – 4:00 PM CT
🔹 Customizable Colors: Easily change the shading colors and transparency
🔹 Intraday Use: Best viewed on intraday charts (1h, 30m, 15m, etc.)
This tool helps intraday traders and forex scalpers stay aware of key market hours with zero distraction. No indicators — just clean, visual session awareness.
Live Price Watermark (Flashing Overlay)Displays the current price as a large, centered watermark directly on your chart. The text color updates dynamically:
- Green when price rises
- Red when price falls
- Translucent black when unchanged
All SMAs Bullish/Bearish ScreenerTitle: All SMAs Bullish/Bearish Screener: Uncover Powerful Trend Alignment
Description:
Are you tired of sifting through countless charts, desperately trying to find stocks that are truly trending? Do you seek clear, unequivocal signals that scream "Buy!" or "Sell!" based on robust price action? Look no further. Introducing the "All SMAs Bullish/Bearish Screener," a powerful yet elegantly simple Pine Script indicator designed to pinpoint stocks where the current price is in absolute harmony (or discord) with a comprehensive suite of Simple Moving Averages.
The Power of Confluence: Why This Indicator Matters
In the dynamic world of trading, strong trends are often characterized by significant alignment across multiple timeframes. This indicator is built on the profound principle of Moving Average Confluence. Instead of just looking at one or two moving averages, this screener meticulously analyzes the relationship between the current closing price and six critical Simple Moving Averages (SMAs): the 5, 10, 20, 50, 100, and 200-period SMAs.
When the price is trading above ALL these moving averages – from the shortest-term (5-period) to the longest-term (200-period) – it's a powerful declaration of unwavering bullish momentum. This often signifies strong institutional buying, a clear accumulation phase, and a robust uptrend across all market horizons. Imagine easily identifying stocks like the one pictured (SAIL), where price confidently rides above every key average, signaling a prime opportunity.
Conversely, when the price is trading below ALL these moving averages, it indicates a severe and widespread bearish bias. This is a warning sign, often preceding further declines, suggesting strong distribution, and a downtrend that impacts every time horizon.
What This Script Delivers:
Unambiguous Trend Identification: Quickly identify stocks exhibiting exceptionally strong bullish or bearish trends. No more guessing – the alignment of all SMAs provides undeniable clarity.
Customizable SMA Lengths: Tailor the moving average periods to your specific trading style and preferred timeframes. Whether you prefer slightly different short, medium, or long-term averages, you have full control via user-friendly input settings.
Instant Visual Cues: The indicator visually highlights these rare and significant conditions directly on your chart:
A green triangle-up signal appears below the bar when all SMAs are bullish.
A red triangle-down signal appears above the bar when all SMAs are bearish.
The chart background color will subtly shift to lime green for bullish alignment and red for bearish alignment, providing immediate visual feedback at a glance.
Real-time Screener Capability (via TradingView Alerts): This is where the true power of this script shines for efficient trading. Set up custom alerts on TradingView for "All SMAs Bullish" or "All SMAs Bearish" conditions. Receive instant notifications (email, mobile, webhook) on any stock in your watchlist that meets these stringent criteria, allowing you to react swiftly to high-probability setups without constant chart monitoring. The alert message even tells you the ticker!
On-Chart Status Display: A clear, concise status message is displayed directly on your chart, indicating "Current Price is ABOVE ALL SMAs (Bullish)", "Current Price is BELOW ALL SMAs (Bearish)", or "SMAs are Mixed," ensuring you're always aware of the prevailing condition.
Who is This For?
This indicator is invaluable for:
Trend Followers: Identify robust trends early and ride them for significant gains.
Swing Traders: Spot strong directional momentum for intermediate-term trades.
Long-Term Investors: Confirm the health and direction of fundamental trends.
Screener Enthusiasts: Automate your market scanning to find the cleanest setups.
Stop wasting time on ambiguous charts. Leverage the "All SMAs Bullish/Bearish Screener" to gain an edge, simplify your analysis, and focus only on the highest conviction trend opportunities. Add it to your favorites today and transform your trading workflow!
#PineScript #TradingView #SMA #MovingAverage #TrendFollowing #StockScreener #TechnicalAnalysis #Bullish #Bearish #MarketScanner
Weinstein Stage Analysis HelperA helper script to visualize the Weinstein Stages intuitively along with other factors like
- Relative Strength
- Volume (On Balance Volume)
- RoE
- P/E
- Growth Rate
- EPS Growth Rate
TRADING GURU LIVE FLASHHi guys,
If you are looking to add some watermark into your charts. You can use this indicator.
You can add add a title and a subtitle, if you want to write in diferents lines, you can use as you can see in the script.
This is just a watermark, which follows my personal style an aesthetic when it comes to Pinescript tools. I like to keep my charts clean to focus on Time and price, and I love to have a reminder to remain disciplined.
Homo Faber Fortunae Suae is a Latin maxim which loosely translates to: Humans Are The Makers Of Their Own Destiny.
So make your own destiny, master yourself and the charts!
All the features are customizable: position, text size, text color, background.
Enjoy it.
EMA 9 & 150 Cross Arrow//@version=5
indicator("EMA 9 & 150 Cross Arrow", overlay=true)
// Input EMAs
emaShort = ta.ema(close, 9)
emaLong = ta.ema(close, 150)
// Detect Crosses
bullishCross = ta.crossover(emaShort, emaLong)
bearishCross = ta.crossunder(emaShort, emaLong)
// Plot EMAs
plot(emaShort, color=color.green, title="EMA 9")
plot(emaLong, color=color.red, title="EMA 150")
// Plot Arrows
plotshape(bullishCross, title="Bullish Cross", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)
plotshape(bearishCross, title="Bearish Cross", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)
Gold DynamicThis is a custom-made TradingView indicator designed to visualize "sequential price levels" based on a user-defined step value, dynamically centered around the current gold price. It draws horizontal lines at multiples of a chosen step value (e.g., 7) both above and below the current price.
Key Features:
Dynamic Price Levels: Lines are calculated relative to the live price, providing relevant support/resistance or structural levels for the current market context.
Customizable Step Value: Easily adjust the Sequence Step Value (e.g., 7, 10, 14) from the indicator settings to align with your trading theory.
Adjustable Line Count: Control the Number of Lines ABOVE Current Price and Number of Lines BELOW Current Price to show as many or as few levels as desired.
Extended Lines: Horizontal lines extend indefinitely to both the left (historical data) and right (future projection) for comprehensive visualization.
Clear Price Labels: Each line displays its exact price value, positioned at the far right of the chart for quick reference.
Customizable Appearance: Modify line color, width, and style (solid, dotted, dashed) to suit your charting preferences.
Exact Values: All displayed price labels are rounded to whole numbers for clear, precise visualization without decimal values.
This indicator is ideal for traders looking to apply a fixed-step price theory to their gold analysis.
US Stocks SPDRsSelect Sector SPDR ETFs - These are unique Exchange Traded Funds (ETFs) that divide the S&P 500 into eleven index funds that trade all day on NYSE Arca.
Day of Week HighlighterThis Indicator Helps Indian Traders or Any Traders to see Charts Days Highlights in their Charts..
AshishBediSPLThis Pine Script indicator, "AshishBediSPL," is designed to help you visualize and analyze the combined premium of a short straddle strategy using Call and Put options. It fetches real-time and historical data for your chosen index or stock (NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY, SENSEX, BANKEX, or RELIANCE) and a specified expiry date and strike price.
You can opt to view the combined premium of both Call and Put options, or analyze just the Call or Put premium individually. The indicator then allows you to overlay and generate trading signals based on a selection of popular technical indicators, including:
EMA Crossover: Identify trend changes with configurable fast and slow Exponential Moving Averages.
Supertrend: Determine the prevailing trend direction and potential reversal points.
VWAP (Volume Weighted Average Price): Track the average price traded based on volume, resetting daily.
RSI (Relative Strength Index): Gauge momentum and potential overbought/oversold conditions (note: RSI buy/sell logic is set to trigger on overbought/oversold levels, which can be interpreted for contrarian or trend-following strategies depending on your approach).
SMA (Simple Moving Average): Smooth price data to identify support and resistance.
The indicator plots the combined premium as a dynamic line, changing color based on its opening and closing values. Buy and Sell signals are clearly marked on the chart, and you can set up alerts to notify you of these trading opportunities.
This tool is ideal for traders looking to monitor straddle premiums and integrate multiple indicator-based signals into their analysis.
8H/12H Trend + RSI + MACD🧠 RSI 8/12H – The Indicator That Shows Reversals Before the Move Happens
Standard RSI (14) is too slow.
By the time it flashes a signal, the move is usually halfway done.
📍 RSI 8/12H is faster, sharper, and built to spot local reversals early – before the crowd sees them.
Why 8/12H Works:
✅ Detects overbought/oversold zones with precision
✅ Especially powerful on gold, oil, and indices
✅ Gives 1–2 clean, high-probability signals per week – no noise, no clutter
🔥 If you're tired of chasing late entries,
RSI 8/12H gives you the edge to get in before the breakout.
Don’t just watch where the market’s been.
Anticipate where it turns.
Multi-Timeframe Close Alert with Toggleyou can create alerts with this indicator for when a time frame closes