CandelaCharts - Projections 📝 Overview
Projections turns a hand-picked swing window into clean, forward price levels. You pick a time range and an anchor (wick or body); the tool finds that window’s reference extremes (Level 0 & Level 1) and then projects directional extensions (e.g., −1, −2, −2.5, −4) in the chosen bias (Auto / Bullish / Bearish). It draws flat lines across the chart with optional labels so you can plan targets, fade zones, or continuation levels at a glance.
📦 Features
This section highlights the core capabilities you’ll rely on most.
Window-based engine — Define a start/end time; the script records open/high/low/close inside that window and builds levels from those extremes.
Two anchor styles — Project from Wick extremes (Hi/Lo) or Body extremes (max/min of OHLC at the high/low bars).
Directional bias — Auto (up if net up; doji resolves by wick dominance), or force Bullish/Bearish for one-sided extensions.
Default & Custom levels — Toggle pre-sets (−1/−2/−2.5/−4) or enter your own comma-separated list (decimals supported).
Readable drawings — Per-level colors (defaults) or unified bull/bear color (custom), with label size, line style, and width controls.
⚙️ Settings
Use these controls to define the window, pick the projection style, and customize the visuals.
Settings (Core)
From / To — Start and end timestamps of the capture window (everything is computed from this segment).
Bias — Auto / Bullish / Bearish. Guides which way negative levels extend (up for bull, down for bear).
Anchor — Wick uses Hi/Lo; Body uses the body extremes at the high/low bars.
Levels
Levels = Default — Enable any of −1, −2, −2.5, −4 and set each color.
Levels = Custom — Provide your own list (e.g., “−0.5, −1, −1.5, −3”) and pick Bullish/Bearish colors. (Custom uses one color per side.)
Style
Labels — Show/Hide the numeric level tag at the line’s right edge; choose label size.
Lines — Pick solid/dashed/dotted and line width.
⚡️ Showcase
Bearish Projection
Bullish Projection
📒 Usage
Follow these steps to set the window, generate levels, and turn them into a trade plan.
1) Mark the window — Set From/To around the swing you want to project (e.g., prior day, news impulse, weekly move).
2) Choose bias — Auto adapts; or lock Bullish/Bearish if you only want upside or downside projections.
3) Pick anchor — Wick = raw extremes; Body = more conservative reference. Body helps when single-print wicks distort levels.
4) Select levels — Toggle defaults or add a custom list. Negative values (−1, −2, …) extend beyond the reference extreme in the bias direction. (Level 0 and 1 are always drawn as the reference pair.)
5) Style it — Turn labels on, adjust size, and set line style/width for visibility on your timeframe.
6) Trade plan — Treat projections as reaction/continuation zones: scale out into −1/−2/−2.5, watch for fades back into the band, or ride continuation when price accepts beyond a level.
🚨 Alerts
There are no built-in alerts in this version.
⚠️ Disclaimer
Trading involves significant risk, and many participants may incur losses. The content on this site is not intended as financial advice and should not be interpreted as such. Decisions to buy, sell, hold, or trade securities, commodities, or other financial instruments carry inherent risks and are best made with guidance from qualified financial professionals. Past performance is not indicative of future results.
Penunjuk dan strategi
Grand Slam Risk ManagementGrand Slam Risk Management (GSRM) Indicator
OVERVIEW
The Grand Slam Risk Management Indicator transforms complex position sizing calculations into real-time, visual risk metrics—enabling disciplined trading decisions without the emotional guesswork that destroys accounts. This comprehensive tool is designed for active day traders and swing traders who want to automate critical risk management calculations directly on their TradingView charts. 🚀
THE GRAND SLAM RISK MANAGEMENT STRATEGY
Core Philosophy
The Grand Slam Risk Management Strategy (GSRM) gets its name from baseball's ultimate scoring play: a grand slam can only be hit when three runners are already on base, requiring at least three prior successful at-bats (hits or walks) to create the opportunity. This perfectly embodies the GSRM philosophy—consistent "base hits" in trading create the foundation for larger wins while protecting your account from devastating losses. Just as baseball teams win championships through disciplined, consistent play rather than swinging for the fences every at-bat, successful traders build wealth through reliable, repeatable profits rather than chasing home runs that often result in strikeouts. ⚾
Strategy Framework
Capital Allocation : 💰
• Working Balance: Account balance minus PDT requirement ($25,000 minimum for margin accounts)
• Allocated Buying Power: Working balance × leverage (4:1 for day trading, 2:1 for swing, 1:1 for cash)
• Daily Profit Target: 5% of allocated buying power (default)
The Base Hit System : 🎯
• Daily profit target divided into 4 "base hits"
• Each base hit represents 25% of daily goal
• Max risk per trade: 50% of base hit target (maintains 2:1 reward/risk minimum)
• Daily max loss: 2 base hits (recoverable with 2 winning trades)
Three-Tier Profit Structure : 🚀
• Tier 1 (5%): Minimum acceptable profit - "Why else take the trade?"
• Tier 2 (10%): Solid win - the target "base hit"
• Tier 3 (20%): Home run - when momentum is strongly in your favor 🏠🏃
Position Sizing Levels : 📊
• Quarter Position (25% of max): Testing the waters, lower conviction setups
• Half Position (50% of max): Standard confidence trades
• Max Position (100%): High conviction, ideal setup conditions
INDICATOR FEATURES
Real-Time Calculations ⚡
• Dynamic Position Sizing: Automatically calculates share quantities based on account balance and current price
• Profit & Loss Targets: Displays dollar amounts for profit targets and stop-losses across all position sizes
• Risk Metrics: Shows daily profit goals, max loss thresholds, and P&L ratios
Advanced Stop-Loss Methods 🛡️
1. Percentage-Based Stops : Fixed 50% of profit target (maintains 2:1 reward/risk)
2. ATR-Based Stops : Dynamic stops that adapt to market volatility using Average True Range (ATR)
• Tier 1: 0.5× ATR (tight/scalping)
• Tier 2: 1.0× ATR (standard)
• Tier 3: 1.5× ATR (wide/trending)
Cost Basis Options 📈
• Last Close: Uses previous bar's closing price for stable calculations
• VWMA: Volume-Weighted Moving Average (default: 9) estimate cost-basis from recent volume-weighted price action
• SMA/EMA: Use Simple or Exponential Moving Average (default: 9) useful for planning entries at SMA/EMA cross-overs and bounces.
• VWAP: Volume-Weighted Average Price (default: daily) for entry point planning at bounce or break of VWAP.
* Ask/Bid: Entry point calculations based on current Ask or Bid price (only available on 1T charts)
Visual Risk Management 🔑
• Color-Coded P&L Ratio :
- Green (≤0.5): Conservative, favorable risk ✅
- Yellow (0.5-1.0): Balanced risk ⚠️
- Red (>1.0): Aggressive, requires higher win rate 🛑
• Position Size Color Coding : Green (quarter) → Yellow (half) → Red (max) for quick risk assessment
HOW TO USE THE GSRM INDICATOR
Initial Setup (One-Time Configuration) ⚙️
1. Set Account Balance: Enter your total trading account value
2. Configure PDT Protection: Enable for margin accounts ≥$25,000 to protect required funds
3. Select Leverage: 4:1 (day trading), 2:1 (swing), or 1:1 (cash account)
4. Adjust Risk Percentage: Default 5% of allocated buying power; reduce for conservative approach
Trading Workflow
Pre-Market Preparation: 🌅
1. Review daily profit target and max loss displayed in green/red
2. Note your base hit target - this is your standard trade goal
3. Check P&L ratio - ensure it's sustainable for your win rate
Trade Execution: 🚀
1. Assess Setup Quality :
• Strong setup → Consider half or max position 💪
• Decent setup → Quarter or half position 👍
• Testing idea → Quarter position only 🧪
2. Select Profit Tier Based on Market Conditions :
• Choppy market → Target Tier 1 (5%) 🌊
• Normal conditions → Target Tier 2 (10%) ➡️
• Strong momentum → Target Tier 3 (20%) 🚀
3. Choose Stop Method :
• Percentage stops: Best for stocks with clear support/resistance
• ATR stops: Better for volatile stocks or news-driven trades. WARNING: this may result in tighter stops, negatively affecting your P&L. To offset this effect, try increasing the number of base hits to achieve your daily profit target and recover from a daily max loss. Be sure the resultant P&L ratio is in the conservative range ≤0.5. This will allow you to adjust your per-trade P&L targets without reducing your daily profit target or increasing your max risk.
4. Execute Using Table Values :
• 🔎 Find your position size group (🟢quarter/🟡half/🔴max)
• 🔎 Find your profit target row (5%/10%/20%) for your position size group
• ⚠️ Do not exceed the share count and stop-loss values displayed ⚠️
Risk Management Rules 🛡️
Daily Limits : 🚨
• Stop trading after hitting daily max loss (prevent tilt/revenge trading)
• Stop trading when a low-risk, minimum-loss trade would exceed your daily max loss (prevent exceeding max)
• Stop trading if you fall below the Daily Profit Target after having achieved it (prevent tilt/revenge trading)
• Cold Market: Stop trading after reaching daily profit target (preserve gains) ❄️
• Hot Market: Three Strikes - stop trading after 3 total max loss trades in a day (prevent tilt/revenge trading) 🔥
Position Management : 📏
• Never exceed max position size shown (protects from overleverage)
• Use quarter positions when daily P&L is negative or below first profit goal (40% of target)
• Use half positions only while daily P&L is above first profit goal (40% of target)
• Use full positions only while daily P&L is above profit goal (100% of target)
A/B Testing Features 🧪
Stop-Loss Methods :
• Week 1: Use percentage-based stops
• Week 2: Use ATR-based stops
• Compare win rates and average losses to optimize
Cost Basis Models :
Pick the highest probable cost-basis and keep your entry position below the share count shown to protect from overleveraging your buying power.
⚠️ IMPORTANT: COST BASIS ESTIMATIONS ARE FOR RISK MANAGEMENT CALCULATIONS ONLY - DO NOT USE THIS INFORMATION TO EXECUTE BUY OR SELL ORDERS.
• Fast movers: Use Last Close for stability 🏃or Bid/Ask for real-time price updates (Bid/Ask is only available on 1T charts).
• Liquid stocks: Try VWMA for better entry estimation 💧
• Reversals/Break of VWAP: Use VWAP when anticipating an entry at the Volume-Weighted Average Price 🔄
• Reversals/Break SMA 200: Use SMA when anticipating an entry at the SMA 📉
• Momentum/Trending: Use EMA when anticipating an entry at the EMA bounce 📈
• Price Offset: Plus/Minus $1.00 in $0.10 increments to compensate for slippage, market orders, etc.
Track which method provides better fill estimates. There is no right or wrong choice here because it depends on your style of trading. You can also use the Price Offset option if you find it helps with consistency.
BEST PRACTICES ⭐
1. Start Conservative : Use quarter positions and default settings until familiar with the system 🐣
2. Track Results : Document whether you hit Tier 1, 2, or 3 targets 📝
3. Respect the Math : The calculations assume a 50%+ win rate - if yours is lower, reduce position sizes 🧮
4. Daily Review : Compare actual P&L to base hit targets to calibrate expectations 🔍
5. Adapt to Conditions : Use ATR stops in volatile markets, percentage stops in stable conditions 🌡️
GLOSSARY 📚
• ATR (Average True Range) : A volatility indicator measuring the average range of price movement
• PDT (Pattern Day Trader) : SEC rule requiring $25,000 minimum for accounts making 4+ day trades in 5 business days
• VWAP (Volume-Weighted Average Price) : Average price weighted by volume for the trading session
• VWMA (Volume-Weighted Moving Average) : Moving average that gives more weight to periods with higher volume
• SMA (Simple Moving Average) : Unweighted moving average where each data point is of equal importance
• EMA (Exponential Moving Average) : Moving average that emphasizes the most recent data and information from the market
• P&L : Profit & Loss
IMPORTANT DISCLAIMERS ⚠️
• This indicator and any information provided is for educational and informational purposes only and should not be construed as investment advice, financial advice, trading advice, or any other type of advice. You should not make any investment decision based solely on this indicator.
• All investments and trading involve substantial risk of loss and are not suitable for every investor. You should carefully consider whether trading is suitable for you in light of your experience, objectives, financial resources, and other relevant circumstances. 📉
• Actual trade results may vary from calculated targets due to slippage, market gaps, and execution delays
• The creator of this indicator is not a registered investment advisor, broker-dealer, or financial advisor. Nothing contained herein constitutes a recommendation or solicitation to buy or sell any financial instrument.
• In no event shall the creator be liable for any direct, indirect, incidental, special, or consequential damages arising out of the use of this indicator.
• This indicator DOES NOT calculate support/resistance levels
• This indicator DOES NOT provide buy/sell signals
• This indicator DOES NOT calculate entry prices
• It is the trader's responsibility to determine an appropriate entry price for their chosen strategy
• This indicator provides calculations only - execution discipline remains the trader's responsibility
• Default settings assume PDT margin account rules; adjust for cash accounts
• P&L ratio colors are guidelines - your actual win rate determines sustainable ratios
• Always verify position sizes don't exceed account buying power before executing
SUPPORT AND FEEDBACK 💬
This indicator represents years of trading experience condensed into automated calculations. It's designed to remove emotional decision-making from position sizing while maintaining flexibility for different market conditions and trading styles.
For questions, suggestions, or to share your results using the GSRM strategy, please comment on the TradingView publication page. 🚀
---
Remember: The goal isn't to hit home runs - it's to get on base consistently while avoiding strikeouts. Small wins compound into large gains over time. ⚾💰
Version: 1.0
License: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
- creativecommons.org
Compatibility: TradingView Pine Script v6
PSDIGreen Zone → Potential Buy Area
Price is near support.
Red Zone → Potential Sell Area
Price is near resistance.
EMA Lines
Blue (EMA50) above Orange (EMA200): Trend up → favors buys.
Blue below Orange: Trend down → favors sells.
How to Use
Look at zones and trend.
Price near green + trend up → consider long.
Price near red + trend down → consider short.
NOTE: When in uptrend, only follow green zones. When in down trend only follow red zones.
Clear Signal Trading Strategy V5Clear Signal Trading Strategy - Description
This strategy uses a simple 0-5 point scoring system to identify high-probability trades. It combines trend following with momentum confirmation to generate clear BUY/SELL signals while filtering out market noise.
How it works: The strategy waits for EMA crossovers, then scores the setup based on trend alignment, momentum, RSI position, and volume. Only trades scoring above your chosen threshold are executed.
Recommended Settings by Market Type
For Beginners / Risk-Averse Traders:
Signal Sensitivity: Conservative
Volume Confirmation: ON
Risk Per Trade: 1-2%
Stop Loss Type: ATR
ATR Multiplier: 2.5
Risk:Reward Ratio: 2.0
For Trending Markets (Strong Directional Movement):
Signal Sensitivity: Balanced
Volume Confirmation: ON
Risk Per Trade: 2%
Stop Loss Type: ATR
ATR Multiplier: 2.0
Risk:Reward Ratio: 2.5-3.0
For Ranging/Choppy Markets:
Signal Sensitivity: Conservative
Volume Confirmation: ON
Risk Per Trade: 1%
Stop Loss Type: Percentage
Percentage Stop: 2%
Risk:Reward Ratio: 1.5
For Volatile Markets (Crypto/High Beta Stocks):
Signal Sensitivity: Conservative
Volume Confirmation: ON
Risk Per Trade: 1%
Stop Loss Type: ATR
ATR Multiplier: 3.0
Risk:Reward Ratio: 2.0
Best Practices
Timeframes:
15-minute to 1-hour for day trading
4-hour to daily for swing trading
Works best on liquid instruments with good volume
When to avoid trading:
When dashboard shows "HIGH" volatility above 4%
During major news events
When win rate drops below 40%
In markets with no clear trend (prolonged NEUTRAL state)
Success tips:
Start with Conservative mode until you see 10+ successful trades
Only increase to Balanced mode when win rate exceeds 55%
Never use Aggressive mode unless market shows strong trend for 5+ days
Always honor the stop loss - no exceptions
Take partial profits at first target if unsure
ATM & ITM Strike Table (NIFTY & BANKNIFTY)This script is like a cheat sheet for option traders.
When you put it on your chart, it shows you a small table with:
The current spot price (the real market price).
The futures price (another version of the same index that sometimes trades a bit higher or lower).
The ATM strike (the strike price closest to the market price).
Which call option and put option are “in the money” and most relevant right now.
A little note to remind you if you’re looking at the right chart.
In short:
It saves you from doing mental math every time by automatically pointing out the key option strike prices you should be aware of.
ZigZag++ + 4 EMA89 Trend Candles + BUY/SELL LabelsThis script combines ZigZag patterns, EMA89 trend detection, and custom buy/sell scalp signals. It helps identify trend direction and potential entry points in trending markets.
Features:
- ZigZag structure points
- EMA89 as dynamic trend filter
- Buy/Sell scalp markers
- HL/HH swing labels
- Works best on 15m–4h timeframes
RSI DCA StrategyThis strategy combines RSI oversold signals with a Dollar-Cost Averaging (DCA) buying approach.
Trigger:
When the RSI (Relative Strength Index) crosses below 30, the strategy marks an oversold condition.
DCA Entry:
Once triggered, the strategy executes up to three consecutive daily entries (1 per day), splitting the predefined capital equally (configurable by user).
Position Management:
Take Profit at a configurable % above the average entry price.
Stop Loss at a configurable % below the average entry price.
Exit Conditions:
The strategy automatically exits either on reaching Take Profit or Stop Loss.
Visualization:
RSI plotted with oversold line (30).
Take Profit and Stop Loss lines displayed after entry.
Performance Reporting:
Includes an optional monthly performance table for evaluating results by month.
Note:
This strategy is for testing RSI-based mean reversion with staggered entries. It is not financial advice and should be optimized and validated for each market or timeframe before practical use.
VIX CCI Oscillator [Compression + EMA Trigger + Bounce Glow]VIX CCI OSCILLATOR
ADJ CHART FOR YOUR LIKING
NOT AS SMOOTH AS PREVIOUS VERSION (STOCH)
SHOWS TIGER SIGNAL ON EMA
SAMEOUTPUT
HUD Box: emoji-coded tactical feedback
bounce 100 "💥 Expansion" :
bounce 0.8 "🔴 Overbought" :
bounce 0.618 "📉 Distribution" :
bounce 0.5 "🧠 Midline" :
bounce 0.382 "📈 Accumulation" :
bounce 0.2 "🟢 Oversold" :
bounce0.0 "💣 Expansion" : "⚪ Neutral"
Tiger EMA/STOCH
This logic checks if the oscillator is trending above or below its 48-period EMA,
If above, it paints the line GREEN🟢 (bullish),
If below, it paints it RED🔴 (bearish),
If compression is active, it overrides both with purple🟣 to highlight tactical squeeze conditions,
⚠️WARNING⚠️
ALWAYS REMEMBER THIS CHART IS VIX/USD
IN MOST CASES SPY MOVES VICE VERSA
I AM NOT RESPOSIBLE FOR YOUR OWN ACTIONS/TRADE IDEAS
HTF Books Lines for LTF Charts
⸻
📜 日本語説明文
HTF Books Lines for LTF Charts
このインジケーターは、ゴールドの5分足に1時間足のBooksラインを表示するために作成しました。
ドルストレートの通貨ペアであれば同様に利用可能だと思います。
上位足で検出したBooksライン(買い/売り)を下位足チャートに重ねて表示し、ラインが有効である間は強調表示、無効化された際には無効化ラインとして残すことも可能です。
いずれの時間足でも使用できるため、ご自身のトレードスタイルに合わせて設定を切り替えて検証してみてください。
⸻
📜 English Description
HTF Books Lines for LTF Charts
This indicator was originally created to display 1-hour Books lines on the 5-minute chart of Gold (XAUUSD).
It should also work on other USD-related pairs (major dollar crosses).
The indicator plots higher-timeframe Books lines (buy/sell) directly onto a lower-timeframe chart. Active lines are displayed with strong emphasis, and once invalidated they can optionally remain as inactive lines.
It can be applied to any timeframe combination, so please test and adjust it according to your own trading style.
⸻
Fibo RSIThis is a customized Relative Strength Index (RSI) indicator designed to replicate TradingView’s default RSI while adding additional reference levels for deeper market analysis.
🔹 Features:
RSI length set to 8 by default (user adjustable).
Calculates RSI using the standard ta.rsi() function.
Plots the RSI line in a clean, separate panel.
Adds 7 key levels for analysis: 0, 20, 30, 50, 70, 80, 100.
Levels are drawn as thin, solid straight lines for a cleaner look (instead of default dashed).
🔹 Use cases:
Identify momentum shifts with enhanced precision.
Use intermediate levels (20, 30, 50, 70, 80) as potential support/resistance zones.
Ideal for traders who want a Fibonacci-like structure in RSI analysis.
WTI Futures Premarket Breakout Strategy Premarket Breakout Strategy (Adjust prices on source code at 9:00 AM EST and 9:30 AM EST)
RSI HIGHs and LOWs MarkerThis indicator marks significant RSI (14) pivot points directly on the price chart.
Red markers above candles highlight confirmed RSI highs where the RSI value exceeded 75 (overbought zone).
Green markers below candles highlight confirmed RSI lows where the RSI value dropped below 25 (oversold zone).
These signals help traders quickly identify potential reversal zones and overextended market conditions without having to monitor the RSI window separately.
Period Separator + Future LinesDescription
This indicator draws vertical separator lines for each selected timeframe (e.g., daily or hourly) and also projects additional separator lines into the future.
It helps traders visually divide the chart into consistent time periods and see upcoming period boundaries in advance.
Features
- Draws vertical lines at the start of each chosen period (daily by default).
- Extends several separator lines into the future so you can anticipate upcoming sessions.
- Fully customizable: color, style (solid/dashed/dotted), line width, and timeframe can be adjusted from the settings.
- Lines are plotted without distorting auto-scaling, so the chart view remains clean.
Use Case
Ideal for intraday and swing traders who want clear visual time markers and the ability to prepare for upcoming trading sessions.
Reference timesThe theory behind this indicator is that sometimes the graph reaches a certain price at at a certain time according to the price it had at the same time and day in any of the previous weeks. If you could easily see what happened a few weeks ago on this day's weekday and half an hour from now, you might theoretically gain more assurance as to where the graph might go in the next half an hour.
This of course relies of the premise that some traders choose to enter or exit positions according to historical times they are referencing. Hence the name - Reference times.
Example:
it is now 08:00 ET Wednesday. I want to guess what the graph will do in the next half hour. I enter in the indicator the weekday "Wednesday", the time "8:30", and go to 30 minute candles.
I will then see all the candles the graph has been on historical Wednesdays at 8:30. If the candles are below the 08:00 price, we might guess that the graph might want to descent. If they are above the graph, we might guess that the graph might ascend.
How it works:
The user defines a weekday and time he wants to inquire on.
The script searches for past weekdays and similar hours.
It marks these bars at their wicks.
The user can also inquire "opposite hours" - 12 hours ahead or earlier.
The user can also inquire "opposite days" - Monday<->Wednesday, Tuesday<->Thursday.
In addition, the User may inquire the previous day of his selected weekday, which will mark the most recent previous day existent.
Side note: The Time zone offset is set for Jerusalem time. and so it may need future adjustment.
send debugging instances if you find any
Thank you
Assaf Fogelman 2025
ARVELOV Volume Squares: Current + Previous CandlesThis indicator is a volume visualization tool that displays the most recent three candle volumes in a compact table on the chart. Instead of looking at the volume bars in the bottom pane, you get the values right on the price chart in a colored, easy-to-read format.
Here’s how it works:
📊 What It Shows
Current Candle Volume (latest bar)
Previous Candle Volume (1 bar ago)
Previous-Previous Candle Volume (2 bars ago)
Each of these is displayed as a row in a floating table on the chart (top-right corner).
🎨 Color Coding
Default Color (red) → Current bar if volume is below threshold.
Prev Color (gray) → Previous bars if volume is below threshold.
Hit Color (green) → Any bar where volume is greater than or equal to the chosen threshold.
This makes it instantly clear if the current or recent candles had unusually high volume.
⚙️ Settings
Current Candle Background Color → customize the default color.
Hit Color → choose how a "high volume" candle background looks.
Previous Candle Background Color → customize previous candles.
Text Color → control how the volume numbers are displayed.
Volume Threshold (editable) → default is 450, but you can set any number from the indicator menu.
✅ Use Case
This indicator is useful when you want to:
Quickly spot candles with significant volume spikes.
Compare the last few bars to see if volume is rising or falling.
Avoid having to read volume bars from the lower pane (especially helpful on smaller screens).
AI+ Scalper Strategy [BuBigMoneyMazz]Based on the AI+ Scalper Strategy
A trend-following swing strategy that uses multi-factor confirmation (trend, momentum, volatility) to capture sustained moves. Works best in trending markets and avoids choppy conditions using ADX filter.
🎯 5-Minute Chart Settings (Scalping)
pine
// RISK MANAGEMENT
ATR Multiplier SL: 1.2
ATR Multiplier TP: 2.4
// STRATEGY OPTIONS
Use HTF Filter: ON
HTF Timeframe: 15
Latching Mode: OFF
// INDICATOR SETTINGS
ADX Length: 10
ATR Length: 10
HMA Length: 14
Momentum Mode: Stochastic RSI
// STOCH RSI
Stoch RSI Length: 10
%K Smoothing: 2
%D Smoothing: 2
5-Minute Trading Style:
Quick scalps (15-45 minute holds)
Tight stops for fast markets
More frequent signals
Best during high volatility sessions (market open/close)
📈 15-Minute Chart Settings (Day Trading)
pine
// RISK MANAGEMENT
ATR Multiplier SL: 1.5
ATR Multiplier TP: 3.0
// STRATEGY OPTIONS
Use HTF Filter: ON
HTF Timeframe: 60
Latching Mode: ON
// INDICATOR SETTINGS
ADX Length: 14
ATR Length: 14
HMA Length: 21
Momentum Mode: Fisher RSI
// STOCH RSI
Stoch RSI Length: 12
%K Smoothing: 3
%D Smoothing: 3
15-Minute Trading Style:
Swing trades (1-4 hour holds)
Better risk-reward ratio
Fewer, higher quality signals
Works throughout trading day
⚡ Best Trading Times:
5-min: Market open (9:30-11:30 ET) & close (3:00-4:00 ET)
15-min: All day, but best 10:00-3:00 ET
✅ Filter for High-Probability Trades:
Only trade when ADX > 20 (strong trend)
Wait for HTF confirmation (prevents false signals)
Avoid low volume periods (lunch time)
⛔ When to Avoid Trading:
ADX < 15 (choppy market)
Major news events
First/last 15 minutes of session
Pro Tip: Start with 15-minute settings for better consistency, then move to 5-minute once you're comfortable with the strategy's behavior.
FOMC Fund Rate 2022–2025(0.1)This indicator visualizes the Federal Open Market Committee (FOMC) meetings from 2022 through 2025.
It plots vertical lines on the announcement dates and attaches labels showing:
The decision (rate hike ⭡, cut ⭣, or hold ⭤).
The size of the rate change in percentage points.
The cumulative Federal Funds Rate path in parentheses.
Features:
Accurate timestamps for each FOMC meeting (UTC+1).
Customizable line style, width, and color.
Label color and text color options.
Placeholder labels for future meetings to maintain the timeline.
Use this script to keep track of historical Fed policy decisions and visualize the rate path over time directly on your chart.
FiniteStateMachine🟩 OVERVIEW
A flexible framework for creating, testing and implementing a Finite State Machine (FSM) in your script. FSMs use rules to control how states change in response to events.
This is the first Finite State Machine library on TradingView and it's quite a different way to think about your script's logic. Advantages of using this vs hardcoding all your logic include:
• Explicit logic : You can see all rules easily side-by-side.
• Validation : Tables show your rules and validation results right on the chart.
• Dual approach : Simple matrix for straightforward transitions; map implementation for concurrent scenarios. You can combine them for complex needs.
• Type safety : Shows how to use enums for robustness while maintaining string compatibility.
• Real-world examples : Includes both conceptual (traffic lights) and practical (trading strategy) demonstrations.
• Priority control : Explicit control over which rules take precedence when multiple conditions are met.
• Wildcard system : Flexible pattern matching for states and events.
The library seems complex, but it's not really. Your conditions, events, and their potential interactions are complex. The FSM makes them all explicit, which is some work. However, like all "good" pain in life, this is front-loaded, and *saves* pain later, in the form of unintended interactions and bugs that are very hard to find and fix.
🟩 SIMPLE FSM (MATRIX-BASED)
The simple FSM uses a matrix to define transition rules with the structure: state > event > state. We look up the current state, check if the event in that row matches, and if it does, output the resulting state.
Each row in the matrix defines one rule, and the first matching row, counting from the top down, is applied.
A limitation of this method is that you can supply only ONE event.
You can design layered rules using widlcards. Use an empty string "" or the special string "ANY" for any state or event wildcard.
The matrix FSM is foruse where you have clear, sequential state transitions triggered by single events. Think traffic lights, or any logic where only one thing can happen at a time.
The demo for this FSM is of traffic lights.
🟩 CONCURRENT FSM (MAP-BASED)
The map FSM uses a more complex structure where each state is a key in the map, and its value is an array of event rules. Each rule maps a named condition to an output (event or next state).
This FSM can handle multiple conditions simultaneously. Rules added first have higher priority.
Adding more rules to existing states combines the entries in the map (if you use the supplied helper function) rather than overwriting them.
This FSM is for more complex scenarios where multiple conditions can be true simultaneously, and you need to control which takes precedence. Like trading strategies, or any system with concurrent conditions.
The demo for this FSM is a trading strategy.
🟩 HOW TO USE
Pine Script libraries contain reusable code for importing into indicators. You do not need to copy any code out of here. Just import the library and call the function you want.
For example, for version 1 of this library, import it like this:
import SimpleCryptoLife/FiniteStateMachine/1
See the EXAMPLE USAGE sections within the library for examples of calling the functions.
For more information on libraries and incorporating them into your scripts, see the Libraries section of the Pine Script User Manual.
🟩 TECHNICAL IMPLEMENTATION
Both FSM implementations support wildcards using blank strings "" or the special string "ANY". Wildcards match in this priority order:
• Exact state + exact event match
• Exact state + empty event (event wildcard)
• Empty state + exact event (state wildcard)
• Empty state + empty event (full wildcard)
When multiple rules match the same state + event combination, the FIRST rule encountered takes priority. In the matrix FSM, this means row order determines priority. In the map FSM, it's the order you add rules to each state.
The library uses user-defined types for the map FSM:
• o_eventRule : Maps a condition name to an output
• o_eventRuleWrapper : Wraps an array of rules (since maps can't contain arrays directly)
Everything uses strings for maximum library compatibility, though the examples show how to use enums for type safety by converting them to strings.
Unlike normal maps where adding a duplicate key overwrites the value, this library's `m_addRuleToEventMap()` method *combines* rules, making it intuitive to build rule sets without breaking them.
🟩 VALIDATION & ERROR HANDLING
The library includes comprehensive validation functions that catch common FSM design errors:
Error detection:
• Empty next states
• Invalid states not in the states array
• Duplicate rules
• Conflicting transitions
• Unreachable states (no entry/exit rules)
Warning detection:
• Redundant wildcards
• Empty states/events (potential unintended wildcards)
• Duplicate conditions within states
You can display validation results in tables on the chart, with tooltips providing detailed explanations. The helper functions to display the tables are exported so you can call them from your own script.
🟩 PRACTICAL EXAMPLES
The library includes four comprehensive demos:
Traffic Light Demo (Simple FSM) : Uses the matrix FSM to cycle through traffic light states (red → red+amber → green → amber → red) with timer events. Includes pseudo-random "break" events and repair logic to demonstrate wildcards and priority handling.
Trading Strategy Demo (Concurrent FSM) : Implements a realistic long-only trading strategy using BOTH FSM types:
• Map FSM converts multiple technical conditions (EMA crosses, gaps, fractals, RSI) into prioritised events
• Matrix FSM handles state transitions (idle → setup → entry → position → exit → re-entry)
• Includes position management, stop losses, and re-entry logic
Error Demonstrations : Both FSM types include error demos with intentionally malformed rules to showcase the validation system's capabilities.
🟩 BRING ON THE FUNCTIONS
f_printFSMMatrix(_mat_rules, _a_states, _tablePosition)
Prints a table of states and rules to the specified position on the chart. Works only with the matrix-based FSM.
Parameters:
_mat_rules (matrix)
_a_states (array)
_tablePosition (simple string)
Returns: The table of states and rules.
method m_loadMatrixRulesFromText(_mat_rules, _rulesText)
Loads rules into a rules matrix from a multiline string where each line is of the form "current state | event | next state" (ignores empty lines and trims whitespace).
This is the most human-readable way to define rules because it's a visually aligned, table-like format.
Namespace types: matrix
Parameters:
_mat_rules (matrix)
_rulesText (string)
Returns: No explicit return. The matrix is modified as a side-effect.
method m_addRuleToMatrix(_mat_rules, _currentState, _event, _nextState)
Adds a single rule to the rules matrix. This can also be quite readble if you use short variable names and careful spacing.
Namespace types: matrix
Parameters:
_mat_rules (matrix)
_currentState (string)
_event (string)
_nextState (string)
Returns: No explicit return. The matrix is modified as a side-effect.
method m_validateRulesMatrix(_mat_rules, _a_states, _showTable, _tablePosition)
Validates a rules matrix and a states array to check that they are well formed. Works only with the matrix-based FSM.
Checks: matrix has exactly 3 columns; no empty next states; all states defined in array; no duplicate states; no duplicate rules; all states have entry/exit rules; no conflicting transitions; no redundant wildcards. To avoid slowing down the script unnecessarily, call this method once (perhaps using `barstate.isfirst`), when the rules and states are ready.
Namespace types: matrix
Parameters:
_mat_rules (matrix)
_a_states (array)
_showTable (bool)
_tablePosition (simple string)
Returns: `true` if the rules and states are valid; `false` if errors or warnings exist.
method m_getStateFromMatrix(_mat_rules, _currentState, _event, _strictInput, _strictTransitions)
Returns the next state based on the current state and event, or `na` if no matching transition is found. Empty (not na) entries are treated as wildcards if `strictInput` is false.
Priority: exact match > event wildcard > state wildcard > full wildcard.
Namespace types: matrix
Parameters:
_mat_rules (matrix)
_currentState (string)
_event (string)
_strictInput (bool)
_strictTransitions (bool)
Returns: The next state or `na`.
method m_addRuleToEventMap(_map_eventRules, _state, _condName, _output)
Adds a single event rule to the event rules map. If the state key already exists, appends the new rule to the existing array (if different). If the state key doesn't exist, creates a new entry.
Namespace types: map
Parameters:
_map_eventRules (map)
_state (string)
_condName (string)
_output (string)
Returns: No explicit return. The map is modified as a side-effect.
method m_addEventRulesToMapFromText(_map_eventRules, _configText)
Loads event rules from a multiline text string into a map structure.
Format: "state | condName > output | condName > output | ..." . Pairs are ordered by priority. You can have multiple rules on the same line for one state.
Supports wildcards: Use an empty string ("") or the special string "ANY" for state or condName to create wildcard rules.
Examples: " | condName > output" (state wildcard), "state | > output" (condition wildcard), " | > output" (full wildcard).
Splits lines by , extracts state as key, creates/appends to array with new o_eventRule(condName, output).
Call once, e.g., on barstate.isfirst for best performance.
Namespace types: map
Parameters:
_map_eventRules (map)
_configText (string)
Returns: No explicit return. The map is modified as a side-effect.
f_printFSMMap(_map_eventRules, _a_states, _tablePosition)
Prints a table of map-based event rules to the specified position on the chart.
Parameters:
_map_eventRules (map)
_a_states (array)
_tablePosition (simple string)
Returns: The table of map-based event rules.
method m_validateEventRulesMap(_map_eventRules, _a_states, _a_validEvents, _showTable, _tablePosition)
Validates an event rules map to check that it's well formed.
Checks: map is not empty; wrappers contain non-empty arrays; no duplicate condition names per state; no empty fields in o_eventRule objects; optionally validates outputs against matrix events.
NOTE: Both "" and "ANY" are treated identically as wildcards for both states and conditions.
To avoid slowing down the script unnecessarily, call this method once (perhaps using `barstate.isfirst`), when the map is ready.
Namespace types: map
Parameters:
_map_eventRules (map)
_a_states (array)
_a_validEvents (array)
_showTable (bool)
_tablePosition (simple string)
Returns: `true` if the event rules map is valid; `false` if errors or warnings exist.
method m_getEventFromConditionsMap(_currentState, _a_activeConditions, _map_eventRules)
Returns a single event or state string based on the current state and active conditions.
Uses a map of event rules where rules are pre-sorted by implicit priority via load order.
Supports wildcards using empty string ("") or "ANY" for flexible rule matching.
Priority: exact match > condition wildcard > state wildcard > full wildcard.
Namespace types: series string, simple string, input string, const string
Parameters:
_currentState (string)
_a_activeConditions (array)
_map_eventRules (map)
Returns: The output string (event or state) for the first matching condition, or na if no match found.
o_eventRule
o_eventRule defines a condition-to-output mapping for the concurrent FSM.
Fields:
condName (series string) : The name of the condition to check.
output (series string) : The output (event or state) when the condition is true.
o_eventRuleWrapper
o_eventRuleWrapper wraps an array of o_eventRule for use as map values (maps cannot contain collections directly).
Fields:
a_rules (array) : Array of o_eventRule objects for a specific state.
RMA Smoothed RSIRMA Smoothed RSI
Description:
An enhanced RSI built for cleaner intraday and swing reads. It applies RMA smoothing to damp noise.
How It Works
RSI (RMA-Smoothed):
Computes classic RSI from price changes and smooths the result with an additional RMA (user-controlled 3–7, where 5 is the sweet spot). This reduces whipsaw while preserving shifts in momentum.
How to Interpret
50 Midline = Bias Filter: Above 50 favors strength; below 50 favors weakness.
RSI vs RSI-MA Crosses: Cross up can precede thrust or mean-revert toward 50; cross down the opposite.
Inputs
Length: RSI period (default 14).
Source: Price source for RSI (default Close).
Smoothing: RMA smoothing length on RSI (3–7; default 3; 5 sweet spot).
Calculate Divergence: Toggle to compute pivots/divergences and enable alerts.
Moving Average Type: None, SMA, EMA, WMA, VWMA (default EMA).
MA Length: Length of the RSI-based MA (separate from RSI length).
Best For
Traders who want a cleaner RSI read without losing responsiveness.
Scalpers timing momentum shifts around the 50 line and MA crosses.
Swing traders using divergences as early reversal context.
Pro Tips
For fast intraday charts, start with Length 14, Smoothing 3–5, and EMA as the RSI-MA.
Use 50 reclaims/rejections as a simple regime filter.
Combine divergence labels with volume surges, key S/R, or volatility tools (e.g., BBW/TTM squeeze) to time entries.
Divergence alerts fire only if Calculate Divergence is enabled—keep it on if you rely on signals.
DH EMA 21/55/200 Ribbon (Scaled HTF)ema 21 / 55 /200 cập nhật thêm multiTF, chỉnh sửa màu sắc dải mây
Shashwat Khurana's Pivot + Mean Reversion + RSI (Signals Only)Show BUY labels below bars when a bullish reversal is detected.
Show SELL labels above bars when a bearish reversal is detected.
Uses pivot levels, mean reversion, big candle, RSI, and volume filters.
High and Low - MS - 2.0"Showing the high and low points with numbers.
Micha the leftist didn’t say how it’s called in his video.
#LeftismIsAMentalIllness"
נותן לראות את הנקודות הגבוהות והנמוכות עם מספרים
מיכה השמאלן לא אמר איך קוראים לזה בסרטון שלו
#שמאלנותזומחלתנפש
14/09/2025