Educational
US Elections Democrate-Republicain (1920-2025)This script shows the different U.S. presidents and indicates whether each was Democratic or Republican. It allows users to analyze the market based on the president in office.
Major Wars with a signifiant economic impactThis indicator highlights major wars that have had a significant economic impact worldwide. It allows users to easily see their effects on the charts.
PPP – Info Table (Anchor + Corr/Alpha/Beta) v3PPP – Info Table (Anchor + Corr/Alpha/Beta)
- By P3 Analytics, run by Puranam Pradeep Picasso Sharma
🔎 Overview
This indicator creates a clean, dynamic information table on your chart that lets you quickly analyze how your chosen asset is performing relative to BTC, ETH, or any other benchmarks.
With a single glance, you can see:
% change from today’s open (for the anchor asset, BTC, and ETH)
Previous day % change (self + benchmarks)
Correlation, Beta, and Alpha statistics for the selected window (1W, 1M, 1Y)
Anchor values at any bar you choose (via Bars Back or Anchor Time)
Perfect for traders who want to measure coin strength vs benchmarks and make better rotation, risk, or hedging decisions.
📊 Key Metrics
Correlation (Corr): How closely the asset moves with the benchmark.
+1 = moves together, 0 = no relation, -1 = moves opposite.
Beta (β): Sensitivity of returns vs the benchmark.
β = 1 → moves 1:1 with BTC.
β > 1 → more volatile (amplifies BTC moves).
β < 1 → less volatile (defensive).
Alpha (α): Excess return beyond what Beta predicts.
Positive α = outperforming benchmark-adjusted expectation.
Negative α = underperforming.
⚙️ Features
Flexible Anchor Mode:
Bars Back → quickly step through bars.
Time → pin analysis to a specific historical candle.
Customizable Benchmarks: Default BTC & ETH (futures), but replaceable with any ticker.
Adjustable Stats Window:
1 Week, 1 Month, 1 Year (auto-scales if using chart timeframe).
Compact Mode for a smaller table layout.
Dark/Light Theme, font size, corner placement, transparency, and decimal control.
Runs efficiently with minimal chart clutter.
🧑💻 About P3 Analytics
This indicator is developed under P3 Analytics, a research & trading technology initiative led by Puranam Pradeep Picasso Sharma.
P3 Analytics builds tools that merge machine learning, statistics, and trading strategy into accessible products for traders across crypto, equities, forex, and commodities.
✅ How to Use
Add indicator to your chart.
In settings:
Pick your benchmarks (default = BTCUSDT.P, ETHUSDT.P).
Choose your anchor (Bars Back or Time).
Set window length for correlation/alpha/beta.
Read the table:
Left side = your asset.
Right side = benchmarks.
Colors: Green = positive % change, Red = negative.
🚀 Why Use This?
Quickly compare your asset vs BTC/ETH without juggling multiple charts.
Spot whether a coin is truly leading or just following BTC.
Identify outperformance (alpha) coins for rotation or trend plays.
Manage risk by knowing which assets are high beta (high leverage-like moves).
✦ Indicator by P3 Analytics
✦ Created & published by Puranam Pradeep Picasso Sharma
FVG valid MTF (Fair Value Gaps across Multiple Timeframes)This indicator automatically detects and displays Fair Value Gaps (FVGs) across multiple timeframes (1D, 4H, 1H, 30M, 15M, 5M).
✨ Features:
Detects valid FVGs only when they appear after three consecutive candles in the same direction (bullish or bearish).
Each gap is color-coded by direction (bullish / bearish) and changes color once mitigated.
Automatic timeframe label inside each FVG box.
Fully customizable:
Minimum & maximum FVG size (in ticks),
Extension length of boxes into the future (bars),
Maximum number of FVGs displayed per timeframe.
After mitigation, FVGs are visually updated, making it easy to see whether the market has respected the imbalance zone.
📊 Practical Use:
Identify areas of imbalance where strong price reactions often occur.
Monitor FVGs across multiple timeframes – from daily charts down to intraday.
Useful for defining support/resistance zones, entry levels, or trade exits.
⚙️ Settings:
Adjustable FVG colors for bullish, bearish, and mitigated states.
Independent limit on how many FVGs are displayed for each timeframe.
Optimized for clarity and chart performance.
GOLD – Dan Toma Patterns + Market Structure/OB [by Dragos] v3.2GOLD – Dan Toma Patterns + Market Structure/OB v3.2
(Panel x3 • Last R:R • Logical SL • HTF Filter)
All-in-one XAUUSD tool blending Dan Toma patterns (P1–P4) with Internal/External Market Structure, Order Blocks, fixed liquidity (PDH/PDL & sessions), breakout short, dip-buy on trend, a live signals panel, and auto-draw Entry/SL/TP for the last signal. Includes an HTF EMA filter (with slope) and logical Stop Loss to keep signals disciplined.
What it does
P1 – Trend Reverse SELL: structure shift (BOS down) + Supply rejection (wick/engulf) and/or RSI overbought.
P2 – Liquidity: hunts fixed liquidity: PDH/PDL and Asia/London/NY session highs/lows + wick rejection confirmation. BUY at PDL/session Lows, SELL at PDH/session Highs.
P3 – Breakout Short: tight range (ATR/ATRma below threshold) + break under range LL with volume spike.
P4 – Dip Buy: uptrend (EMA) + Demand + pullback to 61.8% (configurable) + RSI oversold.
Market Structure + OB: marks CHoCH/BOS on Internal/External and draws Order Blocks from the last opposite candle at the break (box cap & custom colors).
Auto R:R (last signal only): draws Entry/SL/TP1/TP2 (1.5R / 3R) for the most recent signal to keep the chart clean.
Logical SL: choose Pivot, SD Box, or %ATR and force correct placement (BUY: SL below entry / SELL: SL above entry).
HTF Filter: confirm direction with HTF EMA (custom TF/length), optional slope requirement (rising for BUY / falling for SELL).
Panel x3: compact panel with the last N signals (time, pattern, side, entry, SL, TP1, TP2); place it in any corner.
Quick workflow
HTF context: enable HTF filter (e.g., EMA 200 on H4) to lock a clean bias.
Structure & zones: let MS/OB mark CHoCH/BOS and Supply/Demand; look for confluence with PDH/PDL & session HLs.
Triggers:
SELL: P1/P2/P3 confluencing with Supply, BOS down, wick up, breakout volume.
BUY: P2/P4 in Demand, uptrend, pullback near 0.618, RSI OS.
Execution & management: confirm on bar close (optional repaintSafe), use logical SL, follow auto Entry/SL/TP lines of the last signal.
Panel: monitor fresh events (timestamp + details) for quick validation/journaling.
Key settings
General: XAU/GOLD filter, close-bar confirmation, optional candle labels, show Entry/SL/TP for the last signal only.
HTF: timeframe, EMA length, Need Slope toggle.
Structure/OB: Internal/External/Both/Off, swing lengths, OB lookback, max OB boxes.
Supply/Demand: pivot length (HH/LL) + wick fraction for imbalance detection.
Liquidity: PDH/PDL on/off, sessions (Asia/London/NY) and session HLs.
Breakout Short: range lookback, ATR/ATRma threshold, volume spike multiplier.
Dip Buy: EMA trend length, target Fibo retracement.
RSI/Volume: RSI length + OB/OS thresholds.
SL/TP: Pivot / SD Box / %ATR, ATR length & multiplier, forceLogicalSL.
Alerts (ready to use)
P1 – Trend Reverse SELL
P2 – Liquidity Short
P2 – Liquidity Buy
P3 – Breakout Short
P4 – Dip Buy
(Messages include current price; for auto-execution use your own bridge/automation.)
Recommendations
Timeframes: M5/M15 for entries, H1/H4 for context.
Look for 2–3 confluences (MS, OB, PDH/PDL/sessions, RSI/volume) before validating a signal.
Avoid flat, low-volume ranges or thin-liquidity periods.
Disclaimer
This is an analysis tool, not financial advice. Trading involves risk. Use strict risk management (risk < 1%/trade, R:R ≥ 1:2, mandatory SL) and test on demo/backtest before going live.
GOLD – OB Clean + Internal/External Market Structure [Dragos]GOLD – OB Clean + Internal/External Market Structure
All-in-one tool for XAUUSD that combines:
Clean Order Blocks (Supply/Demand) derived from the last opposite candle after a BOS (break of structure)
Internal & External Market Structure (CHoCH/BOS) with lines and labels
Visual zone management: right extension, mitigation (first touch), invalidation (close beyond), and 50% midline
How it works
Structure & BOS
Finds pivots (HH/LL) via Pivot len.
Triggers BOS when price crosses the last confirmed swing.
Order Blocks
On BOS, scans the last N bars for the opposite candle (bear for BOS up / bull for BOS down) and draws the OB:
Green = Demand, Red = Supply
Optional: use wicks (high/low) or just the body (open/close).
Mitigation: on first touch the zone fades or hides (per settings).
Invalidation: if price closes beyond the zone, it turns gray or gets removed (per settings).
Midline: 50% line for refined management (partial entries, R/R, etc.).
Internal / External Structure
Two structure layers: Internal (micro, shorter swing) and External (macro, longer swing).
Displays CHoCH/BOS with labels; External lines can be dashed for clarity.
Choose to show Internal, External, or Both.
Key Settings
Structure
Pivot len (swing HH/LL) — pivot sensitivity.
Order Blocks
Lookback N bars for the opposite candle
Use wicks — if on, zone uses high/low; otherwise just the body.
Zone Management
Extend zones to the right
Hide zone after mitigation (touch)
Fade zone after mitigation
Remove zone when invalidated
Show 50% line
Max zones stored
Colors: fill/border for Demand/Supply, 50% line color, Mitigated/Invalidated colors.
General
Only on XAU/GOLD (optional) — restricts execution to symbols containing “XAU”/“GOLD”.
Market Structure (tab)
Internal Swing Length / External Swing Length
Show Internal/External Market Structure (Both / Internal / External)
Colors for bullish/bearish MS
Usage Guide
Recommended timeframes: M5/M15 for entries, H1 for context.
Workflow:
Determine External (macro) direction.
Look for BOS and OB in the same direction on Internal.
Wait for mitigation (touch) inside the OB; the 50% line can be used for conservative entries.
Good confluences: sessions (killzones), volume spikes, extreme RSI, MAs (add as separate indicators if needed).
Visual Conventions
Demand: green; Supply: red.
Mitigated: faded yellow (or hidden if chosen).
Invalidated: gray (or removed).
50% line: gray.
Notes & Limits
Pine v6. Object caps follow TradingView limits (max_* = 500). On long histories, increase “Max zones stored” carefully.
BOS is computed when price crosses the last confirmed swing; some traders prefer “close-only” confirmation (can be customized if desired).
This tool does not auto-generate BUY/SELL signals; it’s a context & zones assistant.
Risk disclaimer: Trading involves risk. This tool is for educational analysis and does not guarantee profit. Use strict risk management (fixed SL, R:R ≥ 1:2, risk < 1% per trade).
Dow Theory Indicator## 🎯 Key Features of the Indicator
### 📈 Complete Implementation of Dow Theory
- Three-tier trend structure: primary trend (50 periods), secondary trend (20 periods), and minor trend (10 periods).
- Swing point analysis: automatically detects critical swing highs and lows.
- Trend confirmation mechanism: strict confirmation logic based on consecutive higher highs/higher lows or lower highs/lower lows.
- Volume confirmation: ensures price moves are supported by trading volume.
### 🕐 Flexible Timeframe Parameters
All key parameters are adjustable, making it especially suitable for U.S. equities:
Trend analysis parameters:
- Primary trend period: 20–200 (default 50; recommended 50–100 for U.S. stocks).
- Secondary trend period: 10–100 (default 20; recommended 15–30 for U.S. stocks).
- Minor trend period: 5–50 (default 10; recommended 5–15 for U.S. stocks).
Dow Theory parameters:
- Swing high/low lookback: 5–50 (default 10).
- Trend confirmation bar count: 1–10 (default 3).
- Volume confirmation period: 10–100 (default 20).
### 🇺🇸 U.S. Market Optimizations
- Session awareness: distinguishes Regular Trading Hours (9:30–16:00 EST) from pre-market and after-hours.
- Pre/post-market weighting: adjustable weighting factor for signals during extended hours.
- Earnings season filter: automatically adjusts sensitivity during earnings periods.
- U.S.-optimized default parameters.
## 🎨 Visualization
1. Trend lines: three differently colored trend lines.
2. Background fill: green (uptrend) / red (downtrend) / gray (neutral).
3. Signal markers: arrows, labels, and warning icons.
4. Swing point markers: small triangles at key turning points.
5. Info panel: real-time display of eight key metrics.
## 🚨 Alert System
- Trend turning to up/down.
- Strong bullish/bearish signals (dual confirmation).
- Volume divergence warning.
- New swing high/low formed.
## 📋 How to Use
1. Open the Pine Editor in TradingView.
2. Copy the contents of dow_theory_indicator.pine.
3. Paste and click “Add to chart.”
4. Adjust parameters based on trading style:
- Long-term investing: increase all period parameters.
- Swing trading: use the default parameters.
- Short-term trading: decrease all period parameters.
## 💡 Parameter Tips for U.S. Stocks
- Large-cap blue chips (AAPL, MSFT): primary 60–80, secondary 25–30.
- Mid-cap growth stocks: primary 40–60, secondary 18–25.
- Small-cap high-volatility stocks: primary 30–50, secondary 15–20.
CAP - KC/AC 2.20462 Converter// ───────────────────────────────────────────────────────────────────────────────
// Purpose: Conversion Indicator for ICE “C” (KC) and “C Metric” (AC) Contracts
//
// Background:
// - The Intercontinental Exchange (ICE) is phasing out the legacy Coffee “C” contract (symbol: KC),
// which has been quoted in U.S. cents per pound, and replacing it with the new Coffee “C Metric” contract (symbol: AC),
// quoted in U.S. dollars per metric ton :contentReference {index=0}.
// - The final KC futures expire in March 2028; AC contracts begin trading in September 2025 and use modern specifications
// including pricing per metric ton and flexible bulk delivery formats :contentReference {index=1}.
//
// Why this script matters:
// - Traders are accustomed to the KC pricing format (¢/lb); the AC contract’s USD/MT may create confusion.
// - This indicator visually converts the current chart price—whether from KC or AC contracts—directly into its equivalent unit,
// helping traders quickly assess parity and compare trends across both contract types.
// - It simplifies head-to-head comparison during this transition period, improving clarity on chart price behavior.
//
// Usage instructions:
// - If the symbol starts with "KC", the script divides the price by 2.20462 to convert from ¢/lb to approximate ¢/kg.
// - If the symbol starts with "AC", the script multiplies the price by 2.20462 to reverse the conversion.
// - The results (converted values) are displayed in a table for immediate visual clarity.
// ───────────────────────────────────────────────────────────────────────────────
Top Catcher | QRTop Catcher | QuantumResearch
The Top Catcher indicator is designed to help traders spot areas where markets may be forming local tops. Instead of relying on simple overbought measures like RSI or Bollinger Bands, it combines percentile-based price extremes with a volatility-adjusted filter. This approach helps highlight situations where price has stretched unusually far and then shows signs of weakness.
🔍 How It Works (Principle)
Percentile Analysis: The script measures whether price has reached an extreme compared to its recent distribution (very high percentile).
Volatility Confirmation: It checks if price fails to sustain above a volatility-adjusted upper boundary.
Signal Generation: Only when both conditions align does the script mark a potential Top with a visual triangle above the bar.
This dual-layer approach aims to reduce false signals often triggered in strong trends by single-metric tools.
🎯 Key Features
Top Signals: Plots a clear triangle above candles when potential exhaustion is detected.
Dynamic Adaptation: Works across different assets and timeframes by adjusting to each market’s own volatility.
Visual Overlay: Signals are plotted directly on the chart for intuitive reading.
Alert Ready: Built-in alerts let traders get notified as soon as a new Top signal is generated.
📈 How To Use
Trend Traders: Use signals to tighten stops or take partial profits in extended runs.
Swing Traders: Watch for reversal setups at local highs.
Multi-Timeframe Approach: Combine higher timeframe signals with intraday charts for confirmation.
The script is not meant to predict exact tops, but rather to provide an early warning of distribution zones where risk increases.
⚠️ Disclaimer
This tool is provided for educational and research purposes only. It is not financial advice. Past performance does not predict or guarantee future results. Always combine this tool with your own analysis and risk management.
Artharjan ADXArtharjan ADX (AADX) by Rrahul Desai @Artharjan
📌 Overview
The Artharjan ADX (AADX) is an advanced implementation of the Average Directional Index (ADX) with customizable moving averages, momentum thresholds, and visually intuitive grading of bullish and bearish strength.
Unlike the standard ADX indicator that only shows trend strength, AADX adds graded bullish/bearish conditions, alerts, smoothed DI signals, histogram visualizations, and background color fills to help traders quickly interpret market conditions.
It is designed for traders who want early detection of trend strength, clean visual cues, and automated alert triggers for both bullish and bearish momentum setups.
⚙️ Key Features
🔹 Customizable Calculations
DI Length (default 13) – controls sensitivity of directional indicators.
+/- DI Smoothing – smooths DI signals with user-selected MA.
Multiple Moving Average Types – SMA, EMA, WMA, RMA, VWMA, ALMA, Hull, SWMA, SMMA, TMA.
ADX Smoothing – define how smooth/fast the ADX reacts.
🔹 Flexible Display
Toggle between line plots or histogram view.
Adjustable plot thickness.
Option to plot averages of ADX, +DI, -DI for confirmation.
Configurable background fills:
ADX above/below momentum threshold.
ADX rising/falling color shading.
Trend-grade based color intensity.
🔹 Momentum & Thresholds
Momentum Level (default 25) → defines “strong trend” zone.
Crossover Threshold (default 15) → helps detect early DI crossovers.
Color-coded histogram bars for +DI vs -DI difference:
Above/below zero.
Rising/falling momentum.
🔹 Bullish & Bearish Grading System
The indicator assigns grades from 1 to 5 for both bullish and bearish setups, based on DI and ADX conditions:
Bullish Grades
Grade 1 → Very Weak Bullish
Grade 2 → Weak Bullish
Grade 3 → Moderate Bullish
Grade 4 → Strong Bullish
Grade 5 → Very Strong Bullish
Bearish Grades
Grade 1 → Very Weak Bearish
Grade 2 → Weak Bearish
Grade 3 → Moderate Bearish
Grade 4 → Strong Bearish
Grade 5 → Very Strong Bearish
Labels are automatically plotted above bars to indicate the active grade.
🔹 Alerts
Bullish Alert → when +DI crosses above its average below the threshold OR bullish conditions are met.
Bearish Alert → when -DI crosses above its average below the threshold OR bearish conditions are met.
These alerts make it possible to automate trading signals for scalping, intraday, and swing trading.
📊 Use Cases
Trend Strength Measurement
Spot when markets shift from range-bound to trending.
Confirm the reliability of breakouts with strong ADX readings.
Bullish vs Bearish Control
Compare +DI vs -DI strength to gauge trend direction.
Identify trend reversals early with DI slope changes.
Momentum Confirmation
Use ADX rising + DI grades to validate trade entries.
Filter false breakouts with weak ADX.
Trade Grading System
Enter aggressively on Grade 4–5 signals.
Stay cautious on Grade 1–2 signals.
Automated Alerts & Screening
Combine AADX alerts with strategy rules.
Build scanners to highlight strong ADX setups across multiple stocks.
🎯 Trader’s Advantage
More powerful than standard ADX → Adds slope, grading, alerts, and visualization.
Adaptable to any style → Works for intraday scalping, swing trading, and positional analysis.
Visual clarity → Color fills, histograms, and labels simplify decision-making.
Customizable smoothing → Adjusts to fast or slow markets.
✅ Closing Note
The Artharjan ADX (AADX) transforms the traditional ADX into a complete trend and momentum analyzer. It helps traders detect, confirm, and act on directional strength with clarity and confidence.
With Thanks,
Rrahul Desai
@Artharjan
Rolling Performance Toolkit (Returns, Correlation and Sharpe)This script provides a flexible toolkit for evaluating rolling performance metrics between any asset and a benchmark.
Features:
Library-based: Built on a custom utilities library for consistent return and statistics calculations.
Rolling Window Control: Choose the lookback period (in days) to calculate metrics.
Multiple Modes: Toggle between Rolling Returns, Rolling Correlation, and Rolling Sharpe Ratio.
Benchmark Comparison: Compare your selected ticker against a benchmark (default: S&P 500 / SPX), but you can easily switch to any symbol.
Risk-Free Rate Options: Choose from zero, a constant annual % rate, or a proxy symbol (default: US03M – 3-Month Treasury Yield).
Annualized Sharpe: Sharpe ratios are annualized by default (×√252) for intuitive interpretation.
This tool is useful for traders and investors who want to monitor relative performance, diversification benefits, or risk-adjusted returns over time.
Stock Fundamentals Health Map
I came up with this script because, like a lot of us, I was always bugging AI about every ticker under the sun—asking for breakdowns, forecasts, you name it. But then it hit me: wouldn't it be way faster if I could just glance at the stock chart and get a quick snapshot of the company's financial guts right there?. Also, i didnt bother looking up another indicator script because i want it that way.
This "Stock Fundamentals Health Map" is basically your jumping-off point before you go full detective mode on the fundamentals. It's not meant to be the end-all-be-all, just a smart way to spot red flags or green lights without wasting hours.
Here's the deal: TradingView has this treasure of financial stats for stocks—stuff like margins, ratios, growth numbers, and more—pulled from their database after earnings drops. The script grabs 40 of those for your chosen period (Fiscal Year, Quarter, Half, or Trailing Twelve Months—you pick in the settings, and 40 because your broke boy doesnt have a premium TV sub).
But raw numbers? Meh, they're just digits. So, we grade 'em. Think of it like a report card for the company: Excellent (or "Great" in some spots), Good, Fair, Poor, or Weak (I called it "Pathetic" in my head at first, but toned it down).
How do we grade? Based on thresholds for each metric. For instance, a Gross Margin over 60%? Excellent, baby—that's premium efficiency. 40-60%? Solid Good. Down to under 10%? Weak, might wanna think twice. Same logic for everything else: Altman Z-Score (bankruptcy risk—higher is safer), Beneish M-Score (earnings manipulation detector—lower is cleaner), ROE, EV/EBITDA, you get the idea. But hey, maybe you disagree with my defaults. No sweat—the settings let you tweak every single threshold. Want to be stricter on Debt-to-Equity? Crank it up. Think Dividend Yield needs a higher bar for "Excellent"? Go for it. It's your world; I'm just scripting in it.
Dont know what all those metrics mean? Use the tool tip. Still dont understand? Keep the defaults.
Once graded, we don't stop there. Each metric gets a weight (default is 1, for equal love), but if you're obsessed with Free Cash Flow Margin over, say, Asset Turnover, bump its weight to 2, 5, or even 100. FFT FAFO. The script multiplies grades by weights, adds 'em up, and spits out an overall score and grade for the stock. Excellent if it's crushing it (90%+), down to Weak if it's wheezing. Plus, it categorizes the stock type—Growth, Value, Quality, Dividend, Momentum—based on how it scores in those buckets. Handy for knowing if it's a high-flyer or a dead divi.
And because not all stocks are created equal, it throws in sector-specific smarts. REITs get FFO and AFFO grades (funds from operations—key for real estate trusts). Tech and Healthcare? R&D Intensity to check if they're innovating or slacking. Energy folks get Capex-to-Sales (lower is better for efficiency in that capital-hungry world). Utilities? Debt Service Coverage to see if they can handle the bills. If your ticker doesn't fit those, it skips 'em—no junk data. You dont see all that because TV might have that data with N/A entered in it.
The output? A clean table slapped on your chart (top-right by default and cant move it around, because being at the top and being right is all you need). Columns for metrics, values + grades, all color-coded: green for Excellent, lime for Good, yellow Fair, orange Poor, red Weak. Headers in blue, text customizable—pick your colors, transparency, sizes. It's overlay=true, so it vibes with your price action without cluttering.
Sure, these numbers are just what TradingView's crack team inputs post-earnings—could be off, or laggy, or whatever. They don't predict the future; markets are wild. But it's a lot better than panic-buying on a hunch. Gives you that quick financial health map to ponder before you leap into a trade that could change your life... or your portfolio's. ;)
If you need the source code, ask Grok AI. I got it from there. Too lazy to do that? Follow me on X and i'll dm you after you prove that you are not a bot.
RSI+MA by RAThis Indicator generates buy and sell signal on the crossover of RSI and MA, HTF RSI is also plotted for HTF trend.
Gann Squares + Midpoints It gives Gann Square and a midpoint closest to the price which act as support and resistance
Supertrend Long/Short with Adjustable R:R by JJThis script is a Supertrend-based trading tool with:
Long/Short trade signals
Risk/reward calculation
Position sizing based on risk, capital, and max shares
Visual labels for entries, targets, and stops
Checkmarks (✔) for successful trades and crosses (❌) for stopped trades
Alerts for trade entries
It’s designed for visual analysis on charts, helping you see trades, their targets, and whether they hit profit or stop-loss.
High For Loop | MisinkoMasterThe High For Loop is a new Trend Following tool designed to give traders smooth and fast signals without being too complex, overfit or repainting.
It works by finding how many bars have a higher high than the current high, how many have a lower high, and scores it based on that. This provides users with easy and accurate signals, allowing for gaining a large edge in the market.
It is pretty simple but you can still play around with it pretty well and improve uppon your strategies.
For any backtests using strategies, I left many comments and tried to make it as easy as possible to backtest.
Enjoy G´s
Machine Learning : Neural Network Prediction -EasyNeuro-Machine Learning: Neural Network Prediction
— An indicator that learns and predicts price movements using a neural network —
Overview
The indicator “Machine Learning: Neural Network Prediction” uses price data from the chart and applies a three-layer Feedforward Neural Network (FNN) to estimate future price movements.
Key Features
Normally, training and inference with neural networks require advanced programming languages that support machine learning frameworks (such as TensorFlow or PyTorch) as well as high-performance hardware with GPUs. However, this indicator independently implements the neural network mechanism within TradingView’s Pine Script environment, enabling real-time training and prediction directly on the chart.
Since Pine Script does not support matrix operations, the backpropagation algorithm—necessary for neural network training—has been implemented entirely through scalar operations. This unique approach makes the creation of such a groundbreaking indicator possible.
Significance of Neural Networks
Neural networks are a core machine learning method, forming the foundation of today’s widely used generative AI systems, such as OpenAI’s GPT and Google’s Gemini. The feedforward neural network adopted in this indicator is the most classical architecture among neural networks. One key advantage of neural networks is their ability to perform nonlinear predictions.
All conventional indicators—such as moving averages and oscillators like RSI—are essentially linear predictors. Linear prediction inherently lags behind past price fluctuations. In contrast, nonlinear prediction makes it theoretically possible to dynamically anticipate future price movements based on past patterns. This offers a significant benefit for using neural networks as prediction tools among the multitude of available indicators.
Moreover, neural networks excel at pattern recognition. Since technical analysis is largely based on recognizing market patterns, this makes neural networks a highly compatible approach.
Structure of the Indicator
This indicator is based on a three-layer feedforward neural network (FNN). Every time a new candlestick forms, the model samples random past data and performs online learning using stochastic gradient descent (SGD).
SGD is known as a more versatile learning method compared to standard gradient descent, particularly effective for uncertain datasets like financial market price data. Considering Pine Script’s computational constraints, SGD is a practical choice since it can learn effectively from small amounts of data. Because online learning is performed with each new candlestick, the indicator becomes a little “smarter” over time.
Adjustable Parameters
Learning Rate
Specifies how much the network’s parameters are updated per training step. Values between 0.0001 and 0.001 are recommended. Too high causes divergence and unstable predictions, while too low prevents sufficient learning.
Iterations per Online Learning Step
Specifies how many training iterations occur with each new candlestick. More iterations improve accuracy but may cause timeouts if excessive.
Seed
Random seed for initializing parameters. Changing the seed may alter performance.
Architecture Settings
Number of nodes in input and hidden layers:
Increasing input layer nodes allows predictions based on longer historical periods. Increasing hidden layer nodes increases the network’s interpretive capacity, enabling more flexible nonlinear predictions. However, more nodes increase computational cost exponentially, risking timeouts and overfitting.
Hidden layer activation function (ReLU / Sigmoid / Tanh):
Sigmoid:
Classical function, outputs between 0–1, approximates a normal distribution.
Tanh:
Similar to Sigmoid but outputs between -1 and 1, centered around 0, often more accurate.
ReLU:
Simple function (outputs input if ≥ 0, else 0), efficient and widely effective.
Input Features (selectable and combinable)
RoC (Rate of Change):
Measures relative price change over a period. Useful for predicting movement direction.
RSI (Relative Strength Index):
Oscillator showing how much price has risen/fallen within a period. Widely used to anticipate direction and momentum.
Stdev (Standard Deviation, volatility):
Measures price variability. Useful for volatility prediction, though not directional.
Optionally, input data can be smoothed to stabilize predictions.
Other Parameters
Data Sampling Window:
Period from which random samples are drawn for SGD.
Prediction Smoothing Period:
Smooths predictions to reduce spikes, especially when RoC is used.
Prediction MA Period:
Moving average applied to smoothed predictions.
Visualization Features
The internal state of the neural network is displayed in a table at the upper-right of the chart:
Network architecture:
Displays the structure of input, hidden, and output layers.
Node activations:
Shows how input, hidden, and output node values dynamically change with market conditions.
This design allows traders to intuitively understand the inner workings of the neural network, which is often treated as a black box.
Glossary of Terms
Feature:
Input variables fed to the model (RoC/RSI/Stdev).
Node/Unit:
Smallest computational element in a layer.
Activation Function:
Nonlinear function applied to node outputs (ReLU/Sigmoid/Tanh).
MSE (Mean Squared Error):
Loss function using average squared errors.
Gradient Descent (GD/SGD):
Optimization method that gradually adjusts weights in the direction that reduces loss.
Online Learning:
Training method where the model updates sequentially with each new data point.
Master Arb Recipes – 3 Commas signal Bot integration Master Arb Recipes – 3 Commas signal Bot integration
Purpose
A systematic arbitrage/accumulation framework with pre-tuned “recipes” for BTC/ETH/XRP/SUI/SOL plus a fully manual mode. It automates signal generation for external execution bots (via alert() JSON), while showing on-chart panels for goals, active parameters, DCA position, and P&L/ROI/CAGR. Backtests simulate market orders with optional slippage and TradingView commissions.
Key ideas
Entries: Intrabar trigger when price drops by the recipe’s Entry drop % from the previous close.
Exits: Profit-taking when price rises by the recipe’s Exit rise % (optionally requiring price above average cost).
DCA accounting: Tracks running quantity, average cost, realized (cash) P&L, and unrealized (coin) P&L.
Capital planning: “ReqCap” column estimates capital = Entry $ × Allowed entries (UI only; does not affect orders).
Alerts (live only): Sends minimal Custom Signal JSON for enter_long / exit_long to your execution bot.
What’s included on chart
Top-Right: Strategy Goals Table
Describes the objective for each preset. Auto-filters by the chart’s base (optional).
Bottom-Left: Active Recipe Panel (with 3C UI column)
Shows the active preset (or custom) with: timeframe, Sell-Above-Cost state, Entry/Exit %, Exit-as-%-of-Entry, min bars between entries, once-per-bar gate, and 3Commas UI guidance for optional filters and per-order dollars.
Top-Left: DCA Panel
Current base quantity, average cost, and realized P&L.
Bottom-Right: P&L + ROI/CAGR Panel
Cash P&L (realized), Coin P&L (unrealized), Total P&L, ROI since first fill, and annualized CAGR. Displays denominators for both StartCap (strategy.initial_capital) and ReqCap (planning).
Presets
BTC: STH1_D, LTH1_6H, LTH2_D, LTH3_W, LTH4_6H
ETH: STH1_D, STH2_D, LTH1_D
XRP: STH1_D, STH2_6H, LTH1_6H, LTH2_1H
SUI: STH1_D, STH2_D, STH3_D
SOL: STH1_D, LTH1_D
Each preset sets Entry drop %, Exit rise %, default Entry $, Exit-as-%-of-Entry, Sell-Above-Cost flag, and a reference timeframe (display only). Custom mode lets you define these manually.
Inputs you’ll use
3Commas Custom Signal: secret, bot_uuid, max_lag_sec.
Start Window: Exact date/time + timezone to begin trading/signals.
Entry/Exit Parameters: Entry drop %, Exit rise %, Sell Above Avg Cost toggle, Exit as % of Entry.
Capital Planning: Allowed entries (for ReqCap), Entry $ override (panel only).
Execution/Sim: Simulated slippage %, once-per-bar gate, minimum bars between entries, TradingView commission.
Panels: Toggles + positions for each table.
Alert / Bot integration
Alerts fire only in realtime (barstate.isrealtime) on order submission.
Create one alert on this script using “Any alert() function call”.
Payload (Custom Signal style) includes:
secret, bot_uuid, max_lag, timestamp, trigger_price, tv_exchange, tv_instrument, action where action ∈ {enter_long, exit_long}.
Sizing: This script does not include per-order sizing in the JSON; size in your bot UI. The on-chart Entry $ / Exit $ values are for planning/backtest display.
3Commas optional filter mapping (shown in the panel’s “3C UI” column):
Entry filters:
Same order: set to –EntryDrop% (ON)
From average entry: set to –EntryDrop% (ON)
Exit filters:
If Sell Above Cost = ON → From average entry +ExitRise% (ON); Same order OFF
If Sell Above Cost = OFF → Same order +ExitRise% (ON); From average entry OFF
Per-order volume: Use your bot’s UI. Panel shows the dollars you planned (Entry $ and Exit $).
Backtest notes & limitations
Uses calc_on_every_tick=true and intrabar checks against the previous close for entry drops; historical behavior won’t perfectly match exchange microstructure.
process_orders_on_close=false; fills are simulated at bar prices with your slippage setting and TV commission.
Alerts and webhook timing depend on TradingView + broker/exchange latencies; use max_lag_sec accordingly.
Required Capital (ReqCap) is for planning only and does not reserve funds or constrain orders.
Recommended markets/timeframes
Crypto spot or futures charts that trade 24/7. Preset labels (D/6H/1H/W) are reference rhythms for volatility; the script runs on any timeframe but results will vary.
Change log (04092025)
Added 3C UI guidance column in Active Recipe panel (dynamic % per recipe).
Restored Goals (top-right) and P&L/ROI/CAGR (bottom-right with StartCap & ReqCap).
Minor UI clarifications; trading logic unchanged.
Disclaimer
This script is for research and education. It is not financial advice and makes no performance promises. Backtests are hypothetical and subject to substantial limitations. Markets involve risk; you can lose capital. Test on paper first and deploy at your own discretion. Licensed under the Mozilla Public License 2.0.
Artharjan High Volume Zones v2Artharjan High Volume Zones (AHVZ)
The Artharjan High Volume Zones (AHVZ) indicator is designed to identify, highlight, and track price zones formed during exceptionally high-volume bars. These levels often act as critical support and resistance zones, revealing where institutions or large players have shown significant interest.
By combining both short-term (ST) and long-term (LT) high-volume zones, the tool enables traders to align intraday activity with broader market structures.
Core Purpose
Markets often leave behind footprints in the form of high-volume bars. The AHVZ indicator captures these footprints and projects their influence forward, allowing traders to spot zones of liquidity, accumulation, or distribution where future price reactions are likely.
Key Features
🔹 Short-Term High Volume Zones (ST-ZoI)
Identifies the highest-volume bar within a short-term lookback period (default: 22 bars).
Draws and maintains:
Upper & Lower Bounds of the high-volume candle.
Midpoint Line (M-P) as the zone’s equilibrium.
Buffer Zones above and below for intraday flexibility (percentage-based).
Highlights these zones visually for quick intraday decision-making.
🔹 Long-Term High Volume Zones (LT-ZoI)
Scans for the highest-volume bar in a long-term lookback period (default: 252 bars).
Similar plotting structure as ST-ZoI: Upper, Lower, Midpoint, and Buffers.
Useful for identifying institutional footprints and multi-week/month accumulation zones.
🔹 Dynamic Buffering
Daily/Weekly/Monthly charts: Adds a fixed percentage buffer above and below high-volume zones.
Intraday charts: Uses price-range based buffers, scaling zones more adaptively to volatility.
🔹 Visual Customization
Independent color settings for ST and LT zones, mid-range lines, and buffers.
Adjustable plot thickness for clarity across different chart styles.
How It Helps
Intraday Traders
Use ST zones to pinpoint short-term supply/demand clusters.
Trade rejections or breakouts near these high-volume footprints.
Swing/Positional Traders
Align entries with LT zones to stay on the side of institutional flows.
Spot areas where price may stall, reverse, or consolidate.
General Market Structure Analysis
Understand where volume-backed conviction exists in the chart.
Avoid trading into hidden walls of liquidity by recognizing prior high-volume zones.
Closing Note
The Artharjan High Volume Zones indicator acts as a volume map of the market, giving traders a deeper sense of where meaningful battles between buyers and sellers took place. By combining short-term noise filtering with long-term structural awareness, it empowers traders to make more informed, disciplined decisions.
With Thanks,
Rrahul Desai @Artharjan
Clean Zone + SL/TP (Latest Only)📌 Description
Clean Zone + SL/TP (Latest Only) is an indicator designed to highlight the most recent supply or demand zone based on pivot highs/lows, and automatically plot entry, stop loss, and multiple take profit levels.
🔹 Automatic Direction Detection
The script can auto-detect trade direction (Long/Short) using pivot logic, or you can override manually.
🔹 Zone Drawing
Only the latest valid supply (red) or demand (green) zone is displayed.
Zones are extended to the right for a customizable number of bars.
🔹 Entry / SL / TP Levels
Entry, Stop Loss, and TP1/TP2/TP3 levels are plotted automatically.
Targets can be calculated either by zone size or by ATR-based multiples.
Risk/Reward ratios are fully adjustable.
🔹 Customizable Display
Toggle visibility for zones (box), entry/SL/TP lines, and price labels.
Labels show only on the latest bar for a clean chart look.
🎯 Use Case
This tool helps traders quickly identify the cleanest and most recent supply/demand setup and manage trades with predefined risk/reward targets. It’s especially useful for price action traders and those who prefer simple, uncluttered charts.
Artharjan NSE Sectors Relative Strength DashboardArtharjan NSE Sectors Relative Strength Dashboard
This script provides a comprehensive dashboard for analyzing the relative strength of NSE sectors compared to a benchmark index (default: NIFTY). It is designed to give traders and investors a consolidated snapshot of sector performance, momentum, and short-term trend strength — all in one visual table.
Core Purpose
The goal is to simplify sector rotation analysis by combining relative strength, rate of change, momentum, and trend classification into a sortable, color-coded dashboard. Instead of scanning multiple charts, users can rely on this single panel for quick decision-making.
Key Features
Benchmark Comparison
Every sector is measured against the benchmark index (default: NIFTY). This allows users to spot outperforming or underperforming sectors relative to the market.
Multiple Performance Metrics
LTP % Change: Last traded price percentage change from the prior close.
RS Score: Relative strength score over a user-defined lookback.
Momentum (ROC Difference): Convergence/divergence between two ROC values for added confirmation.
ROC1 / ROC2: Short- and medium-term rate-of-change measures.
Trend Classification Engine
Each sector is tagged as Ultra Bullish, Bullish Breakout, Strong/Moderate Bullish, Neutral, Moderate/Strong Bearish, Bearish Breakdown, or Ultra Bearish. This classification is based on sectoral price behavior and candlestick relationships.
Sorting & Customization
Users can sort the dashboard by any metric (e.g., RS Score, % Change, Momentum), in ascending or descending order, to highlight what matters most for their strategy.
Table Presentation
Adjustable text size, thickness, and positioning on the chart.
Optional color-coded cells for visual cues — green shades for strength, red shades for weakness, neutral shades for sideways trends.
“Last Updated” timestamp for clarity on when the snapshot was generated.
How It Helps
This tool reduces the noise of flipping through individual sector charts. Traders can identify sector leadership, monitor momentum shifts, and catch early signs of rotation without leaving a single chart window. It acts as both a macro lens (sector overview) and a micro tool (spotting exact strength/weakness transitions).
Closing Note
This dashboard was built with a simple goal: to bring clarity to complex sectoral movements. Use it as a guiding compass while respecting your broader trading or investing framework.
With Thanks,
Rrahul Desai
@Artharjan