Script_Algo - Pivot Trend Rider Strategy📌 This strategy aims to enter a trade in the direction of the trend, catching a reversal point at the end of a correction.
The script is unique due to the combination of three key elements:
🔹 Detection of reversal points through searching for local lows and highs
🔹 Trend filter based on SMA for trading only in the trend direction
🔹 Adaptive risk management using ATR for dynamic stop-losses and take-profits
This allows the strategy to work effectively in various market conditions, minimizing false signals and adapting to market volatility.
⚙️ Principle of Operation
The strategy is based on the following logical components:
📈 Entry Signals:
Long: when a local low (pivot low) is detected in an uptrend
Short: when a local high (pivot high) is detected in a downtrend
📉 Position Management:
Stop-loss and take-profit are calculated based on ATR
Automatic reverse switching when an opposite signal appears
📊 Trend Filter:
Uses SMA to determine trend direction (can be disabled if needed)
🔧 Default Settings
Pivot detection: 11 bars
SMA filter length: 16 periods
ATR period: 14
SL multiplier: 2.5
TP multiplier: 10
Trend filter: enabled
🕒 Usage Recommendations
Timeframe: from 1 hour and above
Assets: cryptocurrency pairs, stocks
🤖 Trading Automation
This script is fully ready for integration with cryptocurrency exchanges via Webhook.
📊 Backtest Results
As seen from testing results, over 4.5 years this strategy could have potentially generated about $5000 profit or 50% of initial capital on the NAERUSDT crypto pair on the 4H timeframe.
Position size: $1000
Max drawdown: $1400
Total trades: 376
Win rate: 38%
Profit factor: 1.34
⚠️ Disclaimer
Please note that the results of the strategy are not guaranteed to repeat in the future. The market constantly changes, and no algorithm can predict exactly how an asset will behave.
The author of this strategy is not responsible for any financial losses associated with using this script.
All trading decisions are made solely by the user.
Trading financial markets carries high risks and can lead to loss of your investments.
Before using the strategy, it is strongly recommended to:
✅ Backtest the strategy on historical data
✅ Start with small trading volumes
✅ Use only risk capital you are ready to lose
✅ Fully understand how the strategy works
🔮 Further Development
The strategy will continue to evolve and improve. Planned updates include:
Adding additional filters to reduce false signals
Optimizing position management algorithms
Expanding functionality for various market conditions
💡 Wishing everyone good luck and profitable trading!
📈 May your charts be green and your portfolios keep growing!
Developed by Script_Algo | MIT License | Version 1.0
Indicateurs et stratégies
FVMA + SuperTrend + top and bottom Strategy Full CustomizationFVMA + SuperTrend + top and bottom Strategy Full Customization
Stockbee Reversal Bullish v2Custom indicator for identifying stocks that meet the Stockbee's Reversal Bullish New criteria. This can be used as a standalone indicator or use it to screen for stocks in Pine Screener.
Stockbee Reversal BullishCustom indicator for identifying stocks that meet the Stockbee's Reversal Bullish criteria. This can be used as a standalone indicator or use it to screen for stocks in Pine Screener.
NQ Open Playbook (with Toggles)marks out asain,london.ny high and lows on 4h,1h,15m simple little stradGY FOER BEGINERS TO GET A FEEL FOR THE MARKET.
WSW - DMA Dickson Moving Average (DMA) is a specialized technical indicator designed to create a fast-responding moving average with minimal lag, blending the strengths of two other well-known moving averages: the Hull Moving Average (HMA) and John Ehlers’ Zero Lag Indicator. It was developed by Nathan Dickson, who aimed to create a moving average that reacts quickly to price changes, similar to the proprietary Jurik Moving Average (JMA), but without the associated costs. Below is a detailed explanation of the DMA, its construction, purpose, and use in trading.
Pro Trend: Double BB + Chandelier + ZigZag by KidevThis indicator combines multiple powerful tools into a single overlay:
Bollinger Bands (0.5σ & 2σ): Tracks short-term and wider volatility ranges.
SMA 75: Smooth trend filter to identify medium-term direction.
Centered Chandelier Exit: Dynamic stop/trend tool based on ATR; midline highlights trend bias.
Double ZigZag with HH/LL Labels: Two independent ZigZags (configurable periods) mark pivots and identify Higher Highs / Higher Lows / Lower Highs / Lower Lows.
Quickly visualize volatility channels and trend direction.
Identify breakout vs. mean-reversion conditions.
Spot pivot structure (HH/HL vs. LH/LL) for market structure analysis.
Combine ATR-based stop levels with SMA filter for trade entries/exit
SPX Gamma Pin DetectorUnlock the power of gamma pinning in the S&P 500 (SPX) with this essential overlay indicator, designed for day traders and options enthusiasts. The SPX Gamma Pin Detector highlights key gamma strike levels where market makers and large positions create "sticky" price action, often leading to mean reversion and intraday pins. Based on advanced options flow insights (like those from SpotGamma transcripts), it plots critical support/resistance zones to help you anticipate reversals around high-gamma strikes—such as the 99th percentile levels that stabilize or propel SPX moves.
Key Features:
Visual Gamma Levels: Automatically plots the primary pin strike (e.g., 6475), upper gamma target (e.g., 6550), and lower risk-off support (e.g., 6400). These are customizable via inputs for real-time adaptation to market conditions.
Pin Alert Zone: A dynamic background highlight (yellow) activates when SPX is within 0.1% of the pin strike, signaling potential mean reversion opportunities—perfect for entering 0DTE call flies or put hedges pre-NFP or OPEX.
Buy Dip Alert: Generates TradingView alerts on crossovers above the lower tolerance (e.g., 0.5% below pin), with a message like "SPX near gamma pin - Enter fly!" to catch dip-buying flows from zero-DTE algos.
Vol Crush Filter (Beta): Includes a basic VIX threshold input (default <15) to boost signal strength during low-IV environments, where realized vol contracts and upside is cheap.
How It Works:
This Pine Script v5 indicator overlays horizontal lines and conditional backgrounds on your SPX (or ES1! futures) chart. It uses simple math tolerances to detect proximity to gamma hotspots, mimicking the "sticky gamma" dynamics from options positioning data. For example:
If SPX drifts toward the pin level post-data release (e.g., ADP/NFP), the alert fires to prompt bullish structures like the 6525/6550/6575 call fly (net debit ~$2.25 for $25 max profit).
Negative gamma voids below support warn of slippage risks, aligning with charm effects that support closes near 6465-6475.
Backtest it against historical pins (e.g., Tuesday's 6400 reversal with 5B delta buy) to see 70-80% hit rates in stable regimes. Ideal for our GrokPHDTrading day trading show—pair with transcript parses for edge in low-vol setups (VIX ~15, ATM IV 10-11%).
Usage Tips for Traders:
Setup: Add to a 1-min or 5-min SPX chart. Adjust strikes based on daily gamma maps (e.g., from SpotGamma or our tools).
Entry Signals: Alert triggers? Scale into mean-reversion plays—buy the dip if holds support, target pin for 3-5x ROI.
Risk Management: Stop below risk-off level; hedge with OTM put flies (~$0.30 debit) for tail risks like VIX spikes to 19+.
Customization: Tweak tolerances for ES or SPY equivalents (e.g., SPY 645 for SPX 6465). Add VIX plot for vol confirmation.
Training Integration: Use in our Phase 2: Setup Execution modules—simulates gamma edges for 80% win-rate drills.
Disclaimer: This indicator is for educational and informational purposes only. It draws from public options analysis but does not provide financial advice. Always backtest, use proper risk management, and consult a professional. Past performance isn't indicative of future results. Not affiliated with SpotGamma—purely inspired by their methodologies for our AI-driven trading tools at GrokPHDTrading.com.
Invite to Community: Love gamma trading? Subscribe to our show for live NFP breakdowns and affiliate links to premium flow tools. Questions? Drop in the comments or join our Discord for Pine tweaks!
Candle Time Remaining -oxelongcandle timer visible above current candle changes color as it counts down
LP Sweep / Reclaim & Breakout Grading: Long-onlySignals
1) LP Sweep & Reclaim (mean-reversion entry)
Compute LP bounds from prior-bar window extremes:
lpLL_prev = lowest low of the last N bars (offset 1).
lpHH_prev = highest high of the last N bars (offset 1).
Sweep long trigger: current low dips below lpLL_prev and closes back above it.
Real-time quality grading (A/B/C) for sweep:
Trend filter & slope via EMA(88).
BOS bonus: close > last confirmed swing high.
Body size vs ATR, location above a long EMA, headroom to swing high (penalty if too close), and multi-sweep count bonus.
Sum → score → grade A/B/C; A or B required for sweep entry.
2) Trend Breakout (momentum entry)
Core trigger: close > previous Donchian high (length boLen) + ATR buffer.
Optional filter: close must be above the default EMA.
Breakout grading (A/B/C) in real time combining:
Trend up (price > EMA and EMA rising),
Body/ATR, Gap above breakout level (in ATR),
Volume vs MA,
Upper-wick penalty,
Position-in-Score: headroom to last swing high (penalty if too near) + EMA slope bonus.
Sum → score → A or B required if grading enabled.
by A.Alasfoor RSI + Stochastic Alert with Doji Confirmationa buy and sell signals upon :
1- Sell : red hammer break (lower body) of 5min , ensure the wick is equal to or longer than the red body range.
2- Buy: Green hammer (upper body) break of 5min , ensure the wick is equal to or longer than the red body range.
Trigger buy/sell upon the break clean at 1min of the body closing level, risking (SL) the earlier 1 min tops/lows.
Credits to Ahmed Alasfoor & Zakariya Hamad AlJulandani by Sumou Oman
DMI + ADX + Key Level — Carlos VizcarraMi indicador personal de adx para la estrategia de Rafael Cepeda Trader
Enhanced SMZ Screener with Bottom Trigger v1.0Smart Money Zone institutional buy trigger for Pine Screener with bottom confirmation
RSI + Stochastic Alert with Advanced Doji ConfirmationCredits to Ahmed Alasfoor and Somou by Zakariya Hamad AlJulandani
Custom Time Range HighlightThis indicator highlights specific time ranges on your TradingView chart with customizable background colors and labels, making it easier to identify key trading sessions and ICT (Inner Circle Trader) Killzones. It is designed for traders who want to mark important market hours, such as major sessions (Asia, New York, London) or high-volatility Killzones, with full control over activation, timing, colors, and transparency.
Features
Customizable Time Ranges: Define up to 9 different time ranges, including one custom range, three major market sessions (Asia, New York, London), and five ICT Killzones (Asia, NY Open, NY Close, London Open, London Close).
Individual Activation: Enable or disable each time range independently via checkboxes in the settings. By default, only the ICT Killzones are active.
Custom Colors and Transparency: Set unique background and label colors for each range, with adjustable transparency for both.
Labeled Time Ranges: Each active range is marked with a customizable label at the start of the period, displayed above the chart for easy identification.
Priority Handling: If multiple ranges overlap, the range with the higher number (e.g., Asia Killzone over Custom Range) determines the background color.
CET Time Zone: Time ranges are based on Central European Time (CET, Europe/Vienna). Adjust the hours and minutes to match your trading needs.
Settings
The indicator settings are organized into three groups for clarity:
Custom Range: A flexible range (default: 15:30–18:00 CET) for user-defined periods.
Session - Asia, NY, London: Major market sessions (Asia: 01:00–10:00, New York: 14:00–23:00, London: 09:00–18:00 CET).
ICT Killzones - Asia, NY, London: High-volatility periods (NY Open: 13:00–16:00, NY Close: 20:00–23:00, London Open: 08:00–11:00, London Close: 16:00–18:00, Asia: 02:00–05:00 CET).
For each range, you can:
Toggle activation (default: only ICT Killzones enabled).
Adjust start and end times (hours and minutes).
Customize the label text.
Choose background and label colors with transparency levels (0–100).
How to Use
Add the indicator to your chart.
Open the settings to enable/disable specific ranges, adjust their times, or customize colors and labels.
The chart will highlight active time ranges with the selected background colors and display labels at the start of each range.
Use it to focus on key trading periods, such as ICT Killzones for high-probability setups or major sessions for market analysis.
Notes
Ensure your time ranges align with your trading instrument’s session times.
Overlapping ranges prioritize higher-numbered ranges (e.g., Asia Killzone overrides London Session).
Ideal for day traders, scalpers, or ICT strategy followers who need clear visual cues for specific market hours.
Feedback
If you have suggestions for improvements or need help with customization, feel free to leave a comment or contact the author!
NDOG & NWOG - Liquidity + Sunday Box rroielDescription:
This script combines NDOG & NWOG liquidity levels with a Sunday Box framework to provide traders with structured levels for weekly bias, liquidity mapping, and potential entry/exit zones.
Features:
• Automatic plotting of NDOG & NWOG liquidity zones.
• Sunday Box (weekly open range) drawn to define structure and bias.
• Highlights liquidity sweeps and retests for trade confirmation.
• Configurable settings for box time, liquidity range, and display options.
• Built to support ROI/EL strategies by aligning liquidity with weekly key levels.
Use Case:
Helps traders identify where price is likely to react by combining liquidity-based zones with the Sunday box framework. Designed for clarity, confluence, and efficiency in execution.
Volume mura visionOverview
A simple, readable volume tool that highlights volume spikes relative to a moving-average baseline. Bars are color-coded:
Spike UP (price closed up)
Spike DOWN (price closed down)
Below-average volume
Near/above MA but not a spike (neutral)
Optional: plot the selected Volume MA as a line.
How it works
1. Compute a Volume MA (SMA/EMA/RMA/WMA) over Volume MA Length.
2. A spike occurs when Volume ≥ MA × (1 + Spike threshold%).
3. Bar color:
Spike + up candle → Spike UP color
Spike + down candle → Spike DOWN color
Volume < MA → Below-MA grey
Otherwise → Base grey
4. The MA line can be shown/hidden.
Inputs
Volume MA Length (len) — lookback for the volume moving average.
Spike threshold (%) over MA (thr_pct) — how far above the MA a bar must be to count as a spike.
MA Type (ma_type) — SMA / EMA / RMA / WMA for the volume baseline.
Show MA line (showMA) — toggle the MA overlay on the volume pane.
Colors
Base grey — volume near/above MA but below spike threshold.
Below-MA grey — volume below the MA.
Spike UP — spike on an up candle (close ≥ open).
Spike DOWN — spike on a down candle.
Alert
Volume spike — fires when Volume ≥ MA × (1 + threshold).
Usage tips
Lower the threshold to catch more activity; raise it to see only major bursts.
Shorter MA length reacts faster (more spikes); longer length smooths noise.
Combine with price action (breakouts, reversals) to confirm whether spikes signal participation or exhaustion.
Disclaimer
Educational tool, not financial advice. Trading involves risk.
ATR %Overview
Shows the Average True Range (ATR) as a percentage of a chosen price basis. Useful for a quick, apples-to-apples view of current volatility across symbols and timeframes. The value is displayed in a clean table at the bottom-right of the chart.
What it shows
Basis can be: Close, EMA(len), SMA(len), or VWAP.
Data timeframe can be the Chart timeframe or a Daily aggregation.
Inputs
ATR length (len) – ATR lookback.
Percent basis – Close / EMA / SMA / VWAP.
Data timeframe – Chart (uses the current chart TF) or Daily (computes ATR and basis from daily data).
Decimals – number of decimal places to display.
Text / Background / Frame colors – customize the table appearance.
Notes
In Daily mode, ATR and basis are taken from daily data and update on daily close.
VWAP is available only in Chart mode (Daily + VWAP will show n/a by design).
The script overlays the chart but does not plot lines—only a compact info box.
Use cases
Compare volatility across coins/stocks quickly using ATR% instead of raw ATR.
Switch basis to match your style (e.g., EMA for trend-aware scaling, VWAP for intraday context).
Set Daily to track higher-timeframe volatility while trading lower TFs.
Disclaimer
For educational purposes only. Not financial advice. Trading involves risk.
Custom Buy/Sell Pattern BuilderAre you tired of using trading indicators that only let you follow fixed, pre-designed rules? Do you wish you could build your own “Buy” or “Sell” signals, experiment with your own ideas, or see instantly if your unique pattern works—without learning coding or hiring a developer?
The Custom Buy/Sell Pattern Builder is designed for YOU.
This TradingView indicator lets ANY trader—even a complete beginner—define exactly what kind of price and volume conditions should create a BUY or SELL label on any chart, in any market, at any timeframe.
You don’t need to know programming. You don’t need to know the definition of a hammer, doji, volume spike, or Engulfing pattern.
With a few clicks and easy dropdown choices, you can:
Make your own rules for buying or selling
Choose how many candles your pattern should look at
Decide if you want the biggest body, the lowest volume, the biggest movement, or any combination you can imagine
The result?
You’ll see clear “BUY” or “SELL” labels automatically show up on your chart whenever the exact rule YOU built matches current price action.
No more guessing. No more forced strategies. Just pure control and visual feedback!
Why Is This Powerful?
Traditional indicators (like MACD, RSI, or even classic candlestick scanners) work the same for everyone—and only as their inventors defined.
But every trader, and every market, is unique.
What if you could say:
“Show me a ‘SELL’ every time the newest candle is bigger than the one before, but with LESS volume, while the bar before that had an even smaller body—but more volume than all others?”
With this tool, it’s EASY!
You simply pick which candle you want to compare (most recent, previous, etc), what to compare (body or volume—body means the candle’s “thickness”, from open to close), choose “greater than”, “less than”, or “equal to”, and set a multiplier if you want (like “half as much”, “twice as big”, etc).
After this, if any bar on the chart fits all your rules, it will mark it as a BUY or SELL, depending on your selection.
This means—
Beginners can start experimenting with their intuition or small ideas, without tech hurdles
Experienced traders can visualize and fine-tune any possible logic, before they commit to backtesting or automating a real strategy
Every “what if” or “I wonder” setup is just 2–3 clicks away
How Does It Work? Simple Steps
1. Choose Your Signal Type
“Buy” or “Sell”
This tells the indicator whether to mark the qualifying bars with a green “BUY” or red “SELL” label
2. Pick How Many Candles To Use
“Pattern Candle Count” input (2, 3, or 4)
Example: If you use 4, the pattern will be applied to the most recent 4 candles at every step
3. Define Your Pattern With Inputs
For each candle (from newest “0” to oldest “3”), you can set:
Body Condition (example: “is this candle’s body bigger/smaller/equal to another?”)
Pick which candle to compare against
Pick “>”, “<”, “>=”, “<=”, or “=”
Set a multiplier if needed (like “0.5” to mean “half as big as” or “2” for “twice as big as”)
Volume Condition (exact same choices, but based on trading volume—not the candle’s price body)
For example:
“Candle0 Body > Candle2 Body”
means “the latest candle’s real-body (open–close) is bigger than the one two bars ago.”
“Candle1 Volume <= Candle2 Volume”
means “the previous candle’s volume is less than or equal to the volume of the bar two periods ago.”
You can leave a comparison blank if you don’t want to use it for a particular candle.
What Happens After You Set Your Rules?
Every bar on your chart is checked for your logic:
If ALL body AND volume conditions are true (for each candle you specified),
AND
The signal side (“Buy” or “Sell”) matches your dropdown,
Then a green “BUY” or red “SELL” label will show right on the bar, so you can visually spot exactly where your logic works!
Practical Example:
Suppose you want an entry setup that is:
“Sell whenever the newest candle’s body is bigger than two bars ago, body before that is bigger than three bars ago, AND the newest candle’s volume is less than or equal to two bars ago, AND the candle three bars ago’s volume is less than or equal to half the candle two bars ago’s volume.”
You’d set:
Pattern Candle Count: 4
Side: Sell
Candle0 Body Ref#: 2, Op: >, Mult: 1
Candle1 Body Ref#: 3, Op: >, Mult: 1
Candle0 Vol Ref#: 2, Op: <=, Mult: 1
Candle3 Vol Ref#: 2, Op: <=, Mult: 0.5
And the script will find all “SELL” bars on your chart matching these conditions.
Inputs Section: What Does Each Setting Do?
Let’s break down each input in the indicator’s Settings one by one, so even if you’re new, you’ll understand exactly how to use it!
1. Pattern Candle Count (2–4)
What is it?
This sets how many candles in a row you want your rule to look at.
Example:
“4” means your rules are based on the most recent candle and the 3 before it.
“2” means you are only comparing the current and previous candles.
Tip:
Beginners often use 4 to spot stronger patterns, but you can experiment!
2. Signal Side
What is it?
Choose “Buy” or “Sell”. The word you pick here decides which colored label (green for Buy, red for Sell) appears if your pattern matches.
Example:
Want to spot where “Sell” is likely? Pick “Sell”.
Change to “Buy” if you want bullish signals instead.
3. Body & Volume Comparison Settings (per Candle)
For each candle (#0 is newest/current, #3 is oldest in your pattern window):
Body Comparison
Candle# Body Ref#
Choose which other candle you want to compare this one’s body to.
“0” = newest, “1” = previous, “2” = two bars ago, “3” = three bars ago
Candle# Body Op (Operator; >, <, >=, <=, =)
How do you want to compare?
“>” means “greater than” (is bigger than)
“<” means “less than” (is smaller than)
“=” means “equal to”
Candle# Body Mult (Multiplier)
If you want relative comparisons. For example, with Mult=1:
“Candle0 body > Candle2 body x 1” means just “0 is larger than 2.”
“Candle0 body > Candle2 body x 2” means “0 is more than double 2.”
Volume Comparison
Candle# Vol Ref# / Op / Mult
Exact same logic as body, but works on the “Volume” of each candle (how much was traded during that bar).
How to Set Up a Rule (Step by Step Example)
Say you want to mark a Sell every time:
The most recent candle’s real body is BIGGER than the candle 2 bars ago;
The previous candle’s body is also BIGGER than the candle 3 bars ago;
The current candle’s volume is LESS than or equal to the volume of candle 2;
The previous candle’s volume is LESS than or equal to candle 2’s volume;
The candle 3 bars ago’s volume is LESS than or equal to HALF candle 2’s volume.
You’d set:
Pattern Candle Count: 4
Side: "Sell"
Candle0 Body Ref#: 2, Op: “>”, Mult: 1
Candle1 Body Ref#: 3, Op: “>”, Mult: 1
Candle0 Vol Ref#: 2, Op: “<=”, Mult: 1
Candle1 Vol Ref#: 2, Op: “<=”, Mult: 1
Candle3 Vol Ref#: 2, Op: “<=”, Mult: 0.5
All other comparisons (operators) can be left blank if you don’t want to use them!
When these rules are met, a bright red “SELL” label will appear right above the bar matching all your conditions.
Practical Tips & FAQ for Beginners
What does “body” mean?
It’s the “true range” of the candle: the difference between open and close. This ignores wicks for simple setups.
What does “volume” mean?
This is the total trading activity during that candle/bar. Many traders believe that patterns with different volume “meaning” (such as low-volume up bars, or high-volume down bars) signal a meaningful change.
What if nothing shows on chart?
It just means your current rules are rarely or never matched! Try making your comparisons simpler (maybe just 2-body and 2-volume conditions to start).
You can always hit “Reset Settings” to go back to default.
Can I use this for both buying and selling?
YES! You can detect both bullish (Buy) and bearish (Sell) custom conditions; just switch “Signal Side.”
Do I need to know coding?
Not at all! Everything is in simple input panels.
Creative Use Cases, Example Recipes & Troubleshooting
Creative Ways to Use
Spotting Reversals
Example:
Buy when: the newest candle body is LARGER than the previous 3 bars, but ALL volumes are lower than their neighbors.
Why? Sometimes, a big candle with surprisingly low volume after a sequence of small bars can signal a reversal.
Finding Exhaustion Moves
Example:
Sell when: the current bar body is twice as big as two bars ago, but volume is half.
Why? A very big candle with very little volume compared to similar bars may show the move is “running out of steam.”
Custom “Breakout + Confirmation” Patterns
Example:
Buy when:
Candle 0’s body is greater than Candle 2’s by at least 1.5x,
Candle 0’s volume is greater than Candle 1 and Candle 2,
Candle 1’s volume is less than Candle 0.
Why? This could catch strong breakouts but filter out noisy moves.
Multi-bar Bias/Squeeze Filter
Use “Pattern Candle Count: 4”
Set all 4 volume conditions to “<” and each reference to the previous candle.
Now, a BUY or SELL only marks when each bar is “dryer”/less active than the last — a classic squeeze or low-volatility buildup.
Troubleshooting Guide
“I don’t see any Buy/Sell label; is something broken?”
Most likely, your rules are too strict or rare! Try using only two comparisons and leave other “Op” inputs blank as a test.
Double-check you have enough candles on the chart: you need at least as many bars as your pattern count.
“Why does a label appear but not where I expect?”
Remember, the script checks your rules for every NEW candle. The candle “0” is always the most recent, then “1” is one bar back, etc.
Check the color and type chosen: “Signal Side” must be “Buy” for green, “Sell” for red.
“What if I want a more complex pattern?”
Stack conditions! You can demand the body/volume of each candle in your window meet a different rule or all follow the same rule in sequence.
Mini Glossary — For Newcomers
Candle/Bar: Each bar on the chart, shows price movement during a fixed time (e.g., one minute, one hour, one day).
Body: The colored (or filled) part of the candle — the open-to-close price range.
Volume: How much of the asset was actually traded that candle/bar.
Reference Index: When you pick “2” as a reference, it means “the candle two bars ago in the pattern window.”
Operator (“Op”): The math symbol used to compare (>, <, =, etc).
Signal Side: Whether you want to highlight bullish (“Buy”) or bearish (“Sell”) bars.
Tips for Getting More Value
Start Simple—try just one or two conditions at first. See what lights up. Slowly add more logic as you get comfortable.
Watch the chart live as you change settings. The labels update instantly—this makes strategy design fast and visual!
Try flipping your ideas: If a certain pattern doesn’t work for buys, try reversing the direction for possible “sell” setups.
Remember: There is NO wrong idea. This indicator is only limited by your creativity—it’s a “strategy playground.”
Example Quick-Start Recipes
Classic Sell:
4 candles, side = Sell
Candle0 Body > Candle2; Candle1 Body > Candle3
Candle0 Vol <= Candle2; Candle1 Vol <= Candle2; Candle3 Vol <= Candle2 × 0.5
Simple Buy After Pause:
3 candles, side = Buy
Candle0 Body > Candle1; Candle0 Vol > Candle1
All other Ops blank
Low-Volume Pullback for Entry:
4 candles, side = Buy
Candle0 Body > Candle2
Candle0 Vol < Candle1; Candle1 Vol < Candle2; Candle2 Vol < Candle3
Final Words
Think of this as your “pattern lab.” No code, no guesswork—just experiment, see what the market actually gives, and design your own visual rulebook.
If you’re stuck, reset the script to defaults—it’s always safe to start again!
If you want more ready-made “recipes” for different strategies/styles, just ask and I’ll send some more setups for you.
Happy building—and may your edge always be YOUR edge!
Pivot Point TrendOverview
A trend-following trailing line built from confirmed pivot highs/lows and ATR bands. The line turns green in uptrends and red in downtrends. A flip happens only when price closes on the other side of the opposite trail, helping filter noise.
How it works:
Finds confirmed swing points (pivots) and builds a smoothed center from them.
From that center, creates ATR-based bands.
The active trail “locks” in the trend: in uptrends it never moves down; in downtrends it never moves up.
Close above the prior upper trail → bullish; close below the prior lower trail → bearish.
Inputs
Pivot Point Period (prd) – strictness of pivot confirmation (delay = prd bars).
ATR Period (pd) and ATR Factor (factor) – band width; higher values = fewer flips.
Calculation timeframe (calcTF) – leave empty to use chart TF, or set a hard TF like 1D, 4H.
Show Center Line – optional central guide.
Line Width – trail thickness.
Alerts
Bullish Flip – trend turns bullish.
Bearish Flip – trend turns bearish.
Trend Changed – any flip event.
Usage tips
Typical crypto intraday starters: prd 2–5, pd 10–14, factor 2.5–3.5.
For smoother signals, compute on a higher TF (e.g., calcTF = 1D) and time entries on your lower TF.
Prefer actions on bar close of the calculation TF to avoid intrabar whipsaw.
Notes on repainting
The script uses request.security(..., lookahead_off). Pivots confirm after prd bars by design; once confirmed, the center and trails do not use future data. Evaluate flips on bar close for consistency, especially when calcTF > chart TF.
Disclaimer
Educational use only. Not financial advice. Trading involves risk.
Gann Fan Strategy [KedarArc Quant]Description
A single-concept, rule-based strategy that trades around a programmatic Gann Fan.
It anchors to a swing (or a manual point), builds 1×1 and related fan lines numerically, and triggers entries when price interacts with the 1×1 (breakout or bounce). Management is done entirely with the fan structure (next/previous line) plus optional ATR trailing.
What TV indicators are used
* Pivots: `ta.pivothigh/ta.pivotlow` to confirm swing highs/lows for anchor selection.
* ATR: `ta.atr` only to scale the 1×1 slope (optional) and for an optional trailing stop.
* EMA: `ta.ema` as a trend filter (e.g., only long above the EMA, short below).
No RSI/MACD/Stoch/Heikin/etc. The logic is one coherent framework: Gann price–time geometry, with ATR as a scale and EMA as a risk filter.
How it works
1. Anchor
* Auto: chooses the most recent *confirmed* pivot (you control Left/Right).
* Manual: set a price and bar index and the fan will hold that point (no re-anchoring).
* Optional Re-anchor when a newer pivot confirms.
2. 1×1 Slope (numeric, not cosmetic)
* ATR mode: `1×1 = ATR(Length) × Multiplier` (adapts to volatility).
* Fixed mode: `ticks per bar` (constant slope).
Because slope is numeric, it doesn’t change with chart zoom, unlike the drawing tool.
3. Fan Lines
Builds classic ratios around the 1×1: 1/8, 1/4, 1/3, 1/2, 1/1, 2/1, 3/1, 4/1, 8/1.
4. Signals
* Breakout: cross of price over/under the 1×1 in the EMA-aligned direction.
* Bounce (optional): touch + reversal across the 1×1 to reduce whipsaw.
5. Exits & Risk
* Take-profit at the next fan line; Stop at the previous fan line.
* If a level is missing (right after re-anchor), a fallback Risk-Reward (RR) is used.
* Optional ATR trailing stop.
Why this is unique
* True numeric fan: The 1×1 slope is calculated from ATR or fixed ticks—not from screen geometry—so it is scale-invariant and reproducible across users/timeframes.
* Deterministic anchor logic: Uses confirmed pivots (with your L/R settings). No look-ahead; anchors update only when the right bars complete.
* Fan-native trade management: Both entries and exits come from the fan structure itself (with a minimal ATR/EMA assist), keeping the method pure.
* Two entry archetypes: Breakout for momentum days; Bounce for range days—switchable without changing the core model.
* Manual mode: Lock a session’s bias by anchoring to a chosen swing (e.g., day’s first major low/high) and keep the fan constant all day.
Inputs (quick guide)
* Auto Anchor (Left/Right): pivot sensitivity. Higher values = fewer, stronger anchors.
* Re-anchor: refresh to newer pivots as they confirm.
* Manual Anchor Price / Bar Index: fixes the fan (turn Auto off).
* Scale 1×1 by ATR: on = adaptive; off = use ticks per bar.
* ATR Length / ATR Multiplier: controls adaptive slope; start around 14 / 0.25–0.35.
* Ticks per bar: exact fixed slope (match a hand-drawn fan by computing slope ÷ mintick).
* EMA Trend Filter: e.g., 50–100; trades only in EMA direction.
* Use Bounce: require touch + reverse across 1×1 (helps in chop).
* TP/SL at fan lines; Fallback RR for missing levels; ATR Trailing Stop optional.
* Transparency/Plot EMA: visual preferences.
Tips
* Range days: larger pivots (L/R 8–12), Bounce ON, ATR Multiplier \~0.30–0.40, EMA 100.
* Trend days: L/R 5–6, Breakout, Multiplier \~0.20–0.30, EMA 50, ATR trail 1.0–1.5.
* Match the TV Gann Fan drawing: turn ATR scale OFF, set ticks per bar = `(Δprice between anchor and 1×1 target) / (bars) / mintick`.
Repainting & testing notes
* Pivots require Right bars to confirm; anchors are set after confirmation (no look-ahead).
* Signals use the current bar close with TradingView strategy mechanics; real-time vs. bar-close can differ slightly, as with any strategy.
* Re-anchoring legitimately moves the structure when new pivots confirm—by design.
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
MatrixScalper Tablo + 3 Bant Osilatör
MatrixScalper “Table + 3-Band Oscillator” is a lightweight, multi-timeframe trend-momentum filter that stacks three histograms (TF1/TF2/TF3—default 5m/15m/1h) and a compact table showing EMA trend, Supertrend, RSI and MACD direction for each timeframe. Green bars/✓ mean bullish alignment, red bars/✗ bearish; mixed or gray implies neutrality. Use it to trade with the higher-timeframe bias (e.g., look for longs when 15m & 60m are bullish and the 5m band flips back to green after a pullback). It’s a filter—not a standalone signal—so combine with price action/S&R/volume; optional alerts can be added for “all-bull” or “all-bear” alignment.