EMA 9/15 RSI StrategyIf the 9 crosses over 15 or crosses down 15 add Keltner channel to find a tradable option selling setupWskaźnik Pine Script®od saravananak4
EMA Multi Cross + SR Breaks & RetestsDescription The EMA Multi Cross with Support & Resistance Break & Retest indicator combines trend-following moving averages with dynamic support and resistance zone detection to help traders identify trend direction, momentum shifts, and key price reaction areas in real time. The indicator plots multiple Exponential Moving Averages (EMAs) to provide a clear view of short-, medium-, and long-term trends while automatically detecting high-volume support and resistance zones. It also highlights when these zones break or successfully hold, helping traders spot potential continuation or reversal opportunities. Key Features Multi-EMA Trend System The indicator displays EMA 9, 13, 15, 21, 50, and 200 to help traders quickly assess trend structure and market momentum. EMA Crossover Alerts Alerts can be triggered when important EMA crossovers occur, helping traders capture momentum shifts and potential entries. Cross alerts included: EMA 9 crossing EMA 15 EMA 9 crossing EMA 21 EMA 13 crossing EMA 50 EMA 21 crossing EMA 200 Both bullish and bearish signals are supported. Dynamic Support & Resistance Zones The script automatically detects potential support and resistance areas based on price pivots and volume activity, plotting them as zones directly on the chart. Stronger zones appear darker, helping traders quickly identify important reaction areas. Break & Retest Detection When price breaks a support or resistance zone, the zone changes appearance to visually confirm the breakout. If price returns and holds the level, the zone adjusts back, signaling a possible continuation. This helps traders identify: Breakouts Failed breakouts Retests Trend continuation setups Customizable Display Users can enable or disable support & resistance detection and adjust detection sensitivity according to their trading style. Typical Use Cases • Trend-following entries using EMA alignment • Breakout trading • Retest confirmation entries • Scalping and intraday setups • Swing trading trend confirmationWskaźnik Pine Script®od SARANJEET14Zaktualizowano 35
NTrades [NDOG & NWOG + Premarket]NTrades highlights key ICT-based levels by automatically plotting Premarket High/Low ranges, New Day Opening Gaps (NDOG), and New Week Opening Gaps (NWOG). It also detects and displays the first Fair Value Gap (FPFVG) after the market open, helping traders identify important liquidity zones, price imbalances, and potential reaction levels.Wskaźnik Pine Script®od NishannZaktualizowano 11
AI Market Assistant [FundedLab]AI Market Assistant – Your Institutional-Grade Co-Pilot Do you know exactly where you stand in the market cycle? Most retail traders fail because they trade against the dominant trend. I created the AI Market Assistant to solve this problem. It is a comprehensive dashboard that processes multi-timeframe data and Macroeconomics to provide a clear, objective market bias. ⚙️ Customizable Trend Logic: The system adapts to your specific trading personality: Fully Adjustable Timeframes: You are not limited to the default settings. You can freely select your preferred Lower Timeframe (LTF) and Higher Timeframe (HTF) in the settings to match your scalping or swing trading strategy. Select "VWAP" for Intraday Precision : Ideal for catching moves that align with today’s institutional volume. Select "EMA 200" for Swing Structure : Ideal for holding positions and riding the broader market wave. 🚀 Advanced Capabilities: Macro Analysis Panel: Automatically analyzes the Dollar Index (DXY) and US10Y Yields to determine if the macro environment supports your trade (Bullish vs. Bearish Impact). Multi-Language Support: Fully localized for 🇹🇭 🇬🇧 🇨🇳 🇰🇷. Zero-Lag Decision Engine: Utilizing "Stable Mode" to ensure signals are confirmed on closed bars—eliminating false signals and repainting. 💡 Why You Need This Tool: No More Noise: The AI filters out choppy markets (Sideways) and tells you to "WAIT" instead of forcing a trade. Conflict Detection: It checks if the Short-term trend (LTF) agrees with the Long-term trend (HTF). If they disagree, it saves you from a bad trade. Macro Safety: Real-time warnings based on DXY/Bond movements. Don't buy Gold if the DXY is skyrocketing—this tool warns you first. Level up your trading desk with the same data the pros use.Wskaźnik Pine Script®od FundedLab27
CRR HH LL EMASCRR – EMAs (Price Floors) v4 – Stick Right is an educational chart overlay designed to help traders visualize market structure and price context, not to generate trading signals. This indicator is built around two core concepts: EMA-based price structure Clear visual references anchored to the most recent confirmed bar What this indicator IS A visual tool to display EMA structure (20 / 50 / 100 / 200) A way to observe dynamic support and resistance A helper to understand trend alignment, compression, and expansion A non-repainting overlay anchored to the last completed bar A tool intended for discretionary and educational analysis What this indicator IS NOT It is not a buy or sell signal generator It does not predict future price It is not a trading strategy It does not provide financial or investment advice It does not guarantee profitability How it works The indicator plots four Exponential Moving Averages: EMA 20 EMA 50 EMA 100 EMA 200 Each EMA can optionally display: A horizontal price floor line extending to the right A value tag showing the exact EMA price All tags and price floors are calculated using the latest confirmed bar and extend forward only for visual reference. Nothing is projected into the future, and nothing repaints. The Stick Right behavior ensures that EMA labels remain readable and stable when scrolling or changing chart zoom levels. How traders typically use it Traders commonly use this indicator to: Identify trend direction and EMA stacking Observe how price reacts around EMA zones Combine EMA structure with their own price action, volume, or higher-timeframe analysis Maintain a clean chart while keeping key structural levels visible Disclaimer This script is provided for educational and informational purposes only. It does not constitute financial advice, trading advice, or investment recommendations. Trading involves risk, and users are fully responsible for their own decisions.Wskaźnik Pine Script®od rivero889416
CODY BOT REVERSALFree Telegram Trading Community t.me What Is CODY BOT? CODY BOT is an easy-to-use trading tool that spots potential price reversals on your chart. It shows arrows when it detects certain candlestick patterns that often happen before the market changes direction. How It Works Green "Buy" Arrow Appears When: Current candle closes higher than yesterday's open Yesterday's candle closed lower than its own open This pattern often signals a possible upward move coming Red "Sell" Arrow Appears When: Current candle closes lower than yesterday's open Yesterday's candle closed higher than its own open This pattern often signals a possible downward move coming What You'll See on Your Chart Green up arrows below candles (buy signals) Red down arrows above candles (sell signals) You'll also get alerts if you set them up Best Ways to Use It Good For: Day trading (5-minute to 1-hour charts) Swing trading (4-hour to daily charts) All markets: stocks, forex, crypto Spotting quick trend changes Tips for Better Results: Wait for the candle to close before trading Use with support/resistance lines for confirmation Add volume to check if others are trading too Start with paper trading to practice Always use stop-loss to protect yourself What Makes It Special No lag - signals appear immediately Easy to understand - just follow the arrows Works on any timeframe Free to use No complicated settings Quick Start Guide Add CODY BOT to your TradingView chart Watch for green/red arrows at candle close Click the alert bell if you want notifications Test with fake money first Combine with what you already know about trading Remember: No indicator is perfect. Use CODY BOT as one tool in your toolbox, not the only tool. Always manage your risk and never trade more than you can afford to lose. Perfect for: Traders who like simple, clear signals without complicated math.Wskaźnik Pine Script®od tonewayclothing139
Momentum Structure Regime Engine (MSRE)Momentum Structure Regime Engine (MSRE) Momentum Structure Regime Engine (MSRE) is a professional momentum-based analysis tool designed to help traders identify high-quality directional opportunities with clarity and discipline. The indicator is built on a three-layer momentum framework, where each layer serves a distinct role in market evaluation. 🔹 Structure Layer Identifies the dominant momentum bias and persistence, helping define whether bullish or bearish momentum is structurally in control. 🔹 Regime Layer Evaluates momentum quality by distinguishing between expansion, compression, and weakening phases. This helps filter out low-quality or choppy conditions. 🔹 Execution Layer Detects short-term momentum ignition aligned with structure and regime, highlighting actionable timing opportunities. 📊 Signal Types Strong Signals Indicate the first high-quality momentum opportunity within a new structural move. Elite Signals Appear selectively on the first meaningful pullback during an active momentum phase, offering refined entry opportunities. Signals are state-based and non-repetitive, designed to reduce clutter and avoid over-signaling. ✅ Key Characteristics Pure momentum-driven logic Leading (non-lagging) indicators Clean, minimal chart visuals Non-repainting signals Suitable for intraday and swing trading ⚠️ Disclaimer This indicator is provided for educational and analytical purposes only. It does not constitute financial advice. Trading involves risk, and users are solely responsible for their trading decisions.Wskaźnik Pine Script®od Market_Logic_India10
NTrades [ORBDD Advanced]NTrades is a professional Opening Range Breakout (ORB) trading tool designed to identify high-probability intraday breakout opportunities using multi-layer confirmation, smart risk management, and built-in performance analytics. This indicator is built for traders who want structured ORB execution with institutional-style filters such as trend bias, Fair Value Gap (FVG) confluence, volume confirmation, and dynamic risk controls.Wskaźnik Pine Script®od Nishann3
Volume Structure Regime Engine (VSRE)Volume Structure Regime Engine (VSRE) is a professional, volume-based market analysis tool designed to help traders identify high-quality directional opportunities with clarity and discipline. The indicator is built around a three-layer analytical framework, each serving a distinct purpose in the decision-making process: 🔹 Structure Layer Uses Anchored VWAP to determine directional bias and identify which side of the market is in control. This layer defines the broader context and filters out low-probability trades. 🔹 Regime Layer Analyzes volume-weighted participation to distinguish between expansion, compression, and distribution phases. This helps traders focus only on periods where meaningful activity is present. 🔹 Execution Layer Detects short-term volume acceleration aligned with structure and regime, highlighting moments of aggressive participation. 📊 Signal Types Strong Signals Appear once per structural move and indicate the first high-quality opportunity aligned with both structure and participation. Elite Signals Appear selectively on the first meaningful pullback within an active move, offering refined entry opportunities. Signals are state-based and non-repetitive, designed to reduce chart clutter and avoid signal overfitting. ✅ Key Features Volume-driven (no lagging price averages) Clean, minimal visuals Non-repainting logic Built-in signal throttling to reduce noise Suitable for discretionary trading across intraday and swing timeframes ⚠️ Disclaimer This indicator is intended for educational and analytical purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. Trading involves risk, and users are responsible for their own trading decisions.Wskaźnik Pine Script®od Market_Logic_India18
Safer Reversal: CHoCH & Div 1st BoS Entry & Exits & Pro FeaturesProfessional traders (in ICT/SMC frameworks) often exit reversal trades using these logic layers for better risk control and to avoid holding into reversals: Opposing CHoCH → Strongest exit/reversal warning: If you’re in a bullish trade and a bearish CHoCH forms (breaks structure against your direction), it’s time to exit fully or scale out aggressively. This signals the new trend might be over or reversing. Failed BoS / Lack of Continuation → If no new BoS occurs for many bars after entry (e.g., 10–20 bars, adjustable), momentum is fading → partial or full exit. Target Zones → Common exits at next major POI: e.g., opposite-side liquidity (equal highs/lows), recent swing extremes, or a fixed RR (like 1:2 or 1:3 from entry). Trailing via Swings → After each new BoS in your direction, trail stop to the recent swing low/high (or below last BoS level) for letting winners run. Other Pro Touches: Volume filter on entry BoS (require above-average volume for confirmation). RSI extreme check (e.g., exit if RSI hits overbought/oversold in your trade direction after entry). Alerts for exits (“EXIT BUY - Opposing CHoCH” etc.).Wskaźnik Pine Script®od jeffreykgibson38
Robust Adaptive Cloud - Blue/White ThemeRobust Adaptive Cloud - Blue/White Theme Robust Adaptive Cloud - Blue/White ThemeRobust Adaptive Cloud - Blue/White ThemeRobust Adaptive Cloud - Blue/White ThemeRobust Adaptive Cloud - Blue/White ThemeRobust Adaptive Cloud - Blue/White Theme Wskaźnik Pine Script®od GILLYi3
DafeRLMLLibDafeRLMLLib: The Reinforcement Learning & Machine Learning Engine This is not an indicator. This is an artificial intelligence. A state-based, self-learning engine designed to bring the power of professional quantitative finance to the Pine Script ecosystem. Welcome to the next frontier of trading analysis. █ CHAPTER 1: THE PHILOSOPHY - FROM STATIC RULES TO DYNAMIC LEARNING Technical analysis has, for a century, been a discipline of static, human-defined rules. "If RSI is below 30, then buy." "If the 50 EMA crosses the 200 EMA, then sell." These are fixed heuristics. They are brittle. They fail to adapt to the market's ever-changing personality—its shifts between trend and range, high and low volatility, risk-on and risk-off sentiment. An indicator built on static rules is an automaton, destined to fail when the environment it was designed for inevitably changes. The DafeRLMLLib was created to shatter this paradigm. It is not a tool with fixed rules; it is a framework for discovering optimal rules. It is a true Reinforcement Learning (RL) and Machine Learning (ML) engine, built from the ground up in Pine Script. Its purpose is not to follow a pre-programmed strategy, but to learn a strategy through trial, error, and feedback. This library provides a complete, professional-grade toolkit for developers to build indicators that think, adapt, and evolve. It observes the market state, selects an action, receives a reward signal based on the outcome, and updates its internal "brain" to improve its future decisions. This is not just a step forward; it is a quantum leap into the future of on-chart intelligence. █ CHAPTER 2: THE CORE INNOVATIONS - WHAT MAKES THIS A TRUE ML ENGINE? This library is not a collection of simple moving averages labeled as "AI." It is a suite of genuine, academically recognized machine learning algorithms, adapted for the unique constraints and opportunities of the Pine Script environment. Multi-Algorithm Architecture: You are not locked into one learning model. The library provides a choice of powerful RL algorithms: Q-Learning with TD(λ) Eligibility Traces: A classic, robust algorithm for learning state-action values. We've enhanced it with eligibility traces (Lambda), allowing the agent to more efficiently assign credit or blame to a sequence of past actions, dramatically speeding up the learning process. REINFORCE Policy Gradient with Baseline: A more advanced method that directly learns a "policy"—a probability distribution over actions—instead of just values. The baseline helps to stabilize learning by reducing variance. Actor-Critic Architecture: The state-of-the-art. This hybrid model combines the best of both worlds. The "Actor" (the policy) decides what to do, and the "Critic" (the value function) evaluates how good that action was. The Critic's feedback is then used to directly improve the Actor's decisions. Prioritized Experience Replay: Like a human, the AI learns more from surprising or significant events. Instead of learning from experiences in a simple chronological order, the library stores them in a ReplayBuffer. It then replays these memories to the learning algorithms, prioritizing experiences that resulted in a large prediction error. This makes learning incredibly efficient. Meta-Learning & Self-Tuning: An AI that cannot learn how to learn is still a dumb machine. The MetaState module is a meta-learning layer that monitors the agent's own performance over time. If it detects that performance is degrading, it will automatically increase the learning rate ("Synaptic Plasticity"). If performance is improving, it will decrease the learning rate to stabilize the learned strategy. It tunes its own hyperparameters. Catastrophic Forgetting Prevention: A common failure mode for simple neural networks is "catastrophic forgetting," where learning a new task completely erases knowledge of a previous one. This library includes mechanisms like soft_reset and L2 regularization to prevent the agent's learned weights from exploding or being wiped out by a single bad run of trades, ensuring more stable, long-term learning. The Universal Socket Interface: How does the AI "see" the market? Through DataSockets. This brilliant, extensible interface allows a developer to connect any data series—an RSI, a volume metric, a volatility reading, a custom calculation—to the AI's "brain." Each socket normalizes its input, tracks its own statistics, and feeds into the state-building process. This makes the library universally adaptable to any trading idea. █ CHAPTER 3: A DUAL-PURPOSE FRAMEWORK - MODES OF OPERATION This library is a foundational component of the DAFE AI ecosystem, designed for ultimate flexibility. It can be used in two primary modes: as a powerful standalone intelligence, or as the core cognitive engine within a larger, bridged super-system. Understanding these modes is key to unlocking its full potential. MODE 1: STANDALONE ENGINE OPERATION (Independent Power The DafeRLMLLib can be used entirely on its own to create a complete, self-learning trading indicator. This approach is perfect for building focused, single-purpose tools that are designed to master a specific task. In this mode, the developer is responsible for creating the full feedback loop within their own indicator script. The Workflow: Your indicator initializes the ML agent. On each bar, it feeds the agent market data via the socket interface. It asks the agent for an action (e.g., Buy, Sell, Hold). Your script then executes its own internal trade logic based on the agent's decision. Your script is responsible for tracking the Profit & Loss (PnL) of the resulting simulated trade. When the trade is closed, your script feeds the final PnL directly back into the agent's learn() function as the "reward" signal. The Result: A pure, state-based learning system. The agent directly learns the consequences of its own actions. This is excellent for discovering novel, micro-level trading patterns and for building indicators that are designed to operate with complete autonomy. MODE 2: BRIDGED SUPER-SYSTEM OPERATION (Synergistic Intelligence) This is the pinnacle of the DAFE ecosystem. In this advanced mode, the DafeRLMLLib acts as the core "cognitive engine" or the "tactical brain" within a larger, multi-library system. It can be fused with a strategic portfolio management engine (like the DafeSPALib) via a master communication protocol (the DafeMLSPABridge). The Workflow: The ML engine (this library) generates a set of creative, state-based proposals or predictions. The Bridge Library translates these proposals into a portfolio of micro-strategies. The SPA (Strategy Portfolio Allocation) engine, acting as a high-level manager, analyzes the real-time performance of these micro-strategies and selects the one it trusts the most. This becomes the final decision. The PnL from the SPA's final, performance-vetted decision is then routed back through the Bridge as a highly-qualified reward signal for the ML engine. The Result: A hybrid intelligence that is more robust and adaptive than either system alone. The ML engine provides tactical creativity, while the SPA engine provides ruthless, strategic, performance-based oversight. The ML proposes, the SPA disposes, and the ML learns from the SPA's wisdom. This creates a system of checks, balances, and continuous, synergistic learning, perfect for building an ultimate, all-in-one "drawing indicator" or trading system. As a developer, the choice is yours. Use this library independently to build powerful, specialized learning tools, or use it as the foundational brain for a truly comprehensive trading AI. █ CHAPTER 4: A GUIDE FOR DEVELOPERS - INTEGRATING THE BRAIN We have made it incredibly simple to bring your indicators to life with the DAFE AI. This is the true purpose of the library—to empower you. This section provides the full, unabridged input template and usage guide. PART I: THE INPUTS TEMPLATE To give your users full control over the AI, copy this entire block of inputs into your indicator script. It is professionally organized with groups and detailed tooltips. // ╔═════════════════════════════════════════════════════╗ // ║ INPUTS TEMPLATE (COPY INTO YOUR SCRIPT) ║ // ╚═════════════════════════════════════════════════════╝ // INPUT GROUPS string G_RL_AGENT = "═══════════ 🧠 AGENT CONFIGURATION ════════════" string G_RL_LEARN = "═══════════ 📚 LEARNING PARAMETERS ═══════════" string G_RL_REWARD = "═══════════ 💰 REWARD SYSTEM ═══════════════" string G_RL_REPLAY = "═══════════ 📼 EXPERIENCE REPLAY ════════════" string G_RL_META = "═══════════ 🔮 META-LEARNING ═══════════════" string G_RL_DASH = "═══════════ 📋 DIAGNOSTICS DASHBOARD ═════════" // AGENT CONFIGURATION string i_rl_algorithm = input.string("Actor-Critic", "🤖 Algorithm", options= , group=G_RL_AGENT, tooltip="Selects the core learning algorithm. " + "• Q-Learning: Classic, robust, and fast for discrete states. Learns the 'value' of actions. " + "• Policy Gradient: Learns a direct probability distribution over actions. " + "• Actor-Critic: The state-of-the-art. The 'Actor' decides, the 'Critic' evaluates. " + "• Ensemble: Runs both Q-Learning and Policy Gradient and chooses the action with the highest confidence. " + "RECOMMENDATION: Start with 'Q-Learning' for stability or 'Actor-Critic' for performance.") int i_rl_num_features = input.int(8, "Number of Features (Sockets)", minval=2, maxval=12, group=G_RL_AGENT, tooltip="Defines the size of the AI's 'vision'. This MUST match the number of sockets you connect.") int i_rl_num_actions = input.int(3, "Number of Actions", minval=2, maxval=5, group=G_RL_AGENT, tooltip="Defines what the AI can do. 3 is standard (0=Neutral, 1=Buy, 2=Sell).") // LEARNING PARAMETERS float i_rl_learning_rate = input.float(0.05, "🎓 Learning Rate (Alpha)", minval=0.001, maxval=0.2, step=0.005, group=G_RL_LEARN, tooltip="How strongly the AI updates its knowledge. Low (0.01-0.03) is stable. High (0.1+) is aggressive.") float i_rl_discount = input.float(0.95, "🔮 Discount Factor (Gamma)", minval=0.8, maxval=0.99, step=0.01, group=G_RL_LEARN, tooltip="Determines the agent's 'foresight'. High (0.95+) for trend following. Low (0.85) for scalping.") float i_rl_epsilon = input.float(0.15, "🧭 Exploration Rate (Epsilon)", minval=0.01, maxval=0.5, step=0.01, group=G_RL_LEARN, tooltip="For Q-Learning. The probability of taking a random action to explore. Decays automatically over time.") float i_rl_lambda = input.float(0.7, "⚡ Eligibility Trace (Lambda)", minval=0.0, maxval=0.95, step=0.05, group=G_RL_LEARN, tooltip="For Q-Learning. A powerful accelerator that allows a reward to be 'traced' back through a sequence of actions.") // REWARD SYSTEM string i_rl_reward_mode = input.string("Normalized", "💰 Reward Shaping Mode", options= , group=G_RL_REWARD, tooltip="Modifies the raw PnL reward signal to guide learning. " + "• Normalized: Creates a stable reward signal (Recommended). " + "• Asymmetric: Punishes losses more than it rewards gains. Teaches risk aversion. " + "• Risk-Adjusted: Divides PnL by risk (e.g., ATR). Teaches better risk/reward.") // EXPERIENCE REPLAY bool i_rl_use_replay = input.bool(true, "📼 Enable Experience Replay", group=G_RL_REPLAY, tooltip="Allows the agent to store and re-learn from past experiences. Dramatically improves learning stability. HIGHLY RECOMMENDED.") int i_rl_replay_capacity = input.int(500, "Replay Buffer Size", minval=100, maxval=2000, group=G_RL_REPLAY) int i_rl_replay_batch = input.int(4, "Replay Batch Size", minval=1, maxval=10, group=G_RL_REPLAY) // META-LEARNING bool i_rl_use_meta = input.bool(true, "🔮 Enable Meta-Learning", group=G_RL_META, tooltip="Allows the agent to self-tune its own learning rate based on performance trends.") // DIAGNOSTICS DASHBOARD bool i_rl_show_dash = input.bool(true, "📋 Show Diagnostics Dashboard", group=G_RL_DASH) PART II: THE IMPLEMENTATION LOGIC This is the boilerplate code you will adapt to your indicator. It shows the complete Observe-Act-Learn loop. // ╔═══════════════════════════════════════════════════════╗ // ║ USAGE EXAMPLE (ADAPT TO YOUR SCRIPT) ║ // ╚═══════════════════════════════════════════════════════╝ // 1. INITIALIZE THE AGENT (happens only on the first bar) int algo_id = i_rl_algorithm == "Q-Learning" ? 0 : i_rl_algorithm == "Policy Gradient" ? 1 : i_rl_algorithm == "Actor-Critic" ? 2 : 3 int reward_id = i_rl_reward_mode == "Raw PnL" ? 0 : i_rl_reward_mode == "Normalized" ? 1 : i_rl_reward_mode == "Asymmetric" ? 2 : 3 var rl.RLAgent agent = rl.init(algo_id, i_rl_num_features, i_rl_num_actions, i_rl_learning_rate, 54, i_rl_replay_capacity, i_rl_epsilon, i_rl_discount, i_rl_lambda, reward_id) // 2. CONNECT THE "SENSES" (happens only on the first bar) if barstate.isfirst // Connect your indicator's data series to the AI's sockets. The number MUST match 'i_rl_num_features'. agent := rl.connect_socket(agent, "rsi", ta.rsi(close, 14), "oscillator", 1.0) agent := rl.connect_socket(agent, "atr_norm", ta.atr(14)/close*100, "custom", 0.8) // ... connect all other features ... // 3. THE MAIN LOOP (Observe -> Act -> Learn) - runs on every bar var bool in_trade = false var int trade_direction = 0 var float entry_price = 0.0 var int last_state_hash = 0 var int last_action_taken = 0 // --- OBSERVE: Build the current market state --- rl.RLState current_state = rl.build_state(agent) // --- ACT: Ask the AI for a decision --- = rl.select_action(agent, current_state) agent := updated_agent // CRITICAL: Always update the agent state // --- EXECUTE: Your custom trade logic goes here --- if not in_trade and ai_action.action != 0 // Assuming 0 is "Hold" in_trade := true trade_direction := ai_action.action == 1 ? 1 : -1 // Assuming 1=Buy, 2=Sell entry_price := close last_state_hash := current_state.hash // Store the state at the moment of entry last_action_taken := ai_action.action // --- LEARN: Check for trade closure and provide feedback --- bool trade_is_closed = false float reward = 0.0 if in_trade // Your custom exit condition here (e.g., stop loss, take profit, opposite signal) bool exit_condition = bar_index > ta.valuewhen(in_trade, bar_index, 0) + 20 if exit_condition trade_is_closed := true pnl = trade_direction == 1 ? (close - entry_price) / entry_price : (entry_price - close) / entry_price reward := pnl * 100 in_trade := false // If a trade was closed on THIS bar, feed the experience to the AI if trade_is_closed agent := rl.learn(agent, last_state_hash, last_action_taken, reward, current_state, true) // 4. DISPLAY DIAGNOSTICS if i_rl_show_dash and barstate.islast string diag_text = rl.diagnostics(agent) label.new(bar_index, high, diag_text, style=label.style_label_down, color=color.new(#0A0A14, 10), textcolor=#00FF41, size=size.small, textalign=text.align_left) █ DEVELOPMENT PHILOSOPHY The DafeRLMLLib was born from a desire to push the boundaries of Pine Script and to empower the entire TradingView developer community. We believe that the future of technical analysis is not just in creating more complex algorithms, but in building systems that can learn, adapt, and optimize themselves. This library is an open-source framework designed to be a launchpad for a new generation of truly intelligent indicators on TradingView. This library is designed to help you and your users discover what "the best trades" are, not by following a fixed set of rules, but by learning from the market's own feedback, one trade at a time. █ DISCLAIMER & IMPORTANT NOTES THIS IS A LIBRARY FOR ADVANCED DEVELOPERS: This script does nothing on its own. It is a powerful engine that must be integrated into other indicators. REINFORCEMENT LEARNING IS COMPLEX: RL is not a magic bullet. It requires careful feature engineering (choosing the right sockets), a well-defined reward signal, and a sufficient amount of training data (trades) to converge on a profitable strategy. ALL TRADING INVOLVES RISK: The AI's decisions are based on statistical probabilities learned from past data. It does not predict the future with certainty. "The goal of a successful trader is to make the best trades. Money is secondary." — Alexander Elder Taking you to school. - Dskyz, Create with RL.Biblioteka Pine Script®od DskyzInvestments2216
Zen Measured Moves - Price Extension Targets Based on Prior Bar Overview Zen Measured Moves identifies potential price extension targets by projecting the prior bar's range forward from breakout points. This indicator helps traders anticipate how far price might travel after breaking above a prior high or below a prior low. How It Works The indicator calculates three measured move targets in each direction: Bullish Targets (from prior bar's high): 0.5x - Half the prior range (50% extension) 1x - Full prior range (100% extension) 2x - Double the prior range (200% extension) Bearish Targets (from prior bar's low): 0.5x - Half the prior range (50% extension) 1x - Full prior range (100% extension) 2x - Double the prior range (200% extension) Visual Signals Blue circles above bars indicate bullish measured moves achieved: Light blue (tiny) = 0.5x target hit Medium blue (small) = 1x target hit Dark blue (normal) = 2x target hit Red circles below bars indicate bearish measured moves achieved: Light red (tiny) = 0.5x target hit Medium red (small) = 1x target hit Dark red (normal) = 2x target hit Data Window Outputs All calculated values are available in the Data Window for analysis or export to Excel: Target hit indicators (1/0 boolean values) Actual target price levels Bar type classifications (bullish/bearish) Range measurements Internal Bar Strength (IBS) values Use Cases Identify potential profit targets after breakouts Gauge momentum strength by which targets are reached Filter for high-momentum vs low-momentum moves Backtest measured move reliability on your instruments Export data for statistical analysis in Excel Best Practices Works on any timeframe or instrument Most effective when prior bar has clear directional bias Consider combining with volume or other confirmation indicators Use IBS values to assess entry/exit quality within bars Wskaźnik Pine Script®od Zen_Trading_Tech37
PeakBot ORBSet up your opening range in different time frames across different tickers.Wskaźnik Pine Script®od bcolabella3
WaveTrend & RSI Combined (v-final)# RSI Divergence + WaveTrend Combined ## Overview This indicator combines RSI Divergence detection with WaveTrend crosses to generate high-probability trading signals. It filters out noise by only showing divergences when confirmed by WaveTrend momentum crosses in the same direction. ## Key Features ### 1. Smart Divergence Detection - Detects both bullish and bearish RSI divergences - Uses **price pivot validation** to ensure divergences start from significant chart highs/lows, not just RSI extremes - Divergence endpoints must be in the **neutral zone (20-80)** to avoid overbought/oversold traps ### 2. WaveTrend Cross Confirmation - **Golden Cross**: WaveTrend crossover in oversold territory (below -60) - **Dead Cross**: WaveTrend crossover in overbought territory (above +60) - Crosses are displayed at RSI 20 (golden) and RSI 80 (dead) levels for easy visualization ### 3. Combined Signal Logic - **LONG Signal**: Bullish RSI Divergence + Golden Cross within the divergence period - **SHORT Signal**: Bearish RSI Divergence + Dead Cross within the divergence period - Divergences are **only displayed** when a matching cross exists in the same period ### 4. Visual Elements - **Yellow lines**: Divergence connections between master point and current point - **Small diamonds**: Divergence markers (green for bullish, red for bearish) - **Triangles**: Confirmed entry signals (▲ for LONG, ▼ for SHORT) - **Circles**: WaveTrend crosses (green at bottom for golden, red at top for dead) - **Background color**: Highlights signal bars (green for LONG, red for SHORT) - **Debug table**: Shows real-time RSI, divergence count, WaveTrend values, and cross status ## Settings ### RSI Divergence - RSI Length (default: 14) - Overbuy/Oversell levels - Divergence detection parameters (loopback, confirmation, limits) ### WaveTrend - Channel Length (default: 10) - Average Length (default: 21) - Overbought/Oversold levels - Cross Detection Level (default: 60) ### Pivot Detection - Pivot Left/Right Bars (default: 5) - Controls sensitivity for price pivot validation ## How to Use 1. **Wait for signal**: Look for the triangle markers (▲/▼) with background color 2. **Confirm with crosses**: Ensure the corresponding WaveTrend cross (circle) is visible 3. **Check divergence line**: The yellow line should connect meaningful price pivots ## Alerts - Built-in alert conditions for both LONG and SHORT signals - Webhook-ready format for automation (Telegram, Discord, auto-trading bots) ## Best Practices - Works well on higher timeframes (1H, 4H, Daily) - Combine with support/resistance levels for better entries - Use proper risk management - not every signal is a winner ## Credits - RSI Divergence logic inspired by K-zax - WaveTrend calculation based on LazyBear's implementation - Combined and enhanced by sondengs --- *This indicator is for educational purposes only. Always do your own research and manage your risk appropriately.*Wskaźnik Pine Script®od sondengs8
ATR [Atlasfutures]Minimal ATR and distance in points from the GlobEx open.Wskaźnik Pine Script®od atlasfutures4
Al Brooks H2/L2 IndicatorWhat This Indicator Is This is a price-action execution tool based on Al Brooks concepts. Its job is not to find every H2 or L2 — it filters aggressively to show only the ones worth trading. Think of it as answering one question in real time: “Is this H2 / L2 good enough to take?” What It Detects 1️⃣ H2 / L2 (Second-Entry Pullbacks) H2 = second attempt up in a bull trend L2 = second attempt down in a bear trend Uses confirmed pivots, so signals do not repaint 2️⃣ A+ Signal Bar Quality A signal only qualifies if the breakout bar is strong: Adequate range relative to ATR Large body Close near the extreme Optional follow-through confirmation Weak bars are ignored. 3️⃣ Trend vs Trading Range Filter The indicator skips trades in Trading Ranges by checking: Flat EMA slope Price chopping around the EMA Heavy bar overlap This removes the majority of low-probability H2/L2s. 4️⃣ Microchannel Suppression (Late Trends) If the trend is overextended (tight microchannel): H2/L2 signals are skipped Prevents buying the top or selling the bottom 5️⃣ Wedges & Flags (Brooks Context) When applicable, trades are tagged as: W = Wedge pullback (3 pushes) F = Flag (tight channel pullback) W+F = both present These are context tags, not extra signals. What It Shows on the Chart ✅ Tradable Signals UP → Long H2 DN → Short L2 Printed only when all filters pass Clearly anchored to price These are the only trades the script recommends. 🔔 Alerts Alerts fire only on tradable setups No alerts for skipped or marginal signals Suitable for live execution What It Does Not Do It does not predict outcomes It does not trade for you It does not show every H2/L2 It intentionally removes most setups so you focus on quality, not frequency. How to Trade With It (Recommended) Only act on UP / DN labels Confirm nearby support/resistance visually Use Brooks-style risk: Stop beyond signal bar Skip trades near measured-move targets Ignore everything else Bottom Line This indicator is a professional-grade Brooks execution filter. It helps you: Trade fewer setups Avoid trading ranges Avoid late trends Focus on A+ second entries onlyWskaźnik Pine Script®od bonafide_3
ninjactor fib (v6, Native Pivots, Non-Repainting)📐 Fibonacci Sequence Framework (Non-Repainting) This indicator implements a structured Fibonacci sequence framework using confirmed, non-repainting pivots. It automatically identifies Fibonacci boundaries, plots a precise Fibonacci level set with grouped color logic, and projects targets based on retracement depth. The script is designed for clarity, accuracy, and object-based plotting, extending Fibonacci levels to the right while active and maintaining a clean chart by default. 🔹 Core Features Non-Repainting Fractals Uses confirmed 2-left / 2-right pivots (ta.pivotlow, ta.pivothigh) Pivot labels are plotted on the correct historical bar Automatic Fibonacci Boundary Detection Long spreads: Boundary 1 = pivot low (100%) Boundary 2 = first pivot high after (0%) Short spreads use the inverted logic Direction can be set to Auto, Long Only, or Short Only Exact Fibonacci Level Set Retracements: 0.236 · 0.382 · 0.500 · 0.618 · 0.786 · 0.886 Extensions (targets): 1.127 · 1.272 · 1.618 Negative levels included: -0.127 · -0.272 · -0.618 Grouped Color Logic Red: 0.236 / 0.382 / 0.500 / 0.618, 1.618, negative levels Blue: 0.786, 1.272, boundary lines Green: 0.886, 1.127 Active target is highlighted with increased line thickness Strict “Must Touch” Logic Retracement levels are only considered valid if price actually touches them Wick-based validation (not close-based) Target hits must be touched exactly — no partial credit Target Projection Rules Retracements ≤ 0.618 → target = 1.618 0.786 retracement → target = 1.272 0.886 retracement → target = 1.127 Clean Object Management Uses line and label objects (not plots) Levels extend right while active By default, only the current active spread is displayed Optional history toggle to keep previous spreads ⚙️ Customization Fully customizable color inputs Adjustable opacity for: Non-active levels Active target line Direction mode selection History on/off control 📌 Notes This is an indicator, not a strategy (no trade execution) Designed for discretionary trading and confluence analysis Built to be stable, readable, and Pine Script v6 compatibleWskaźnik Pine Script®od attiquekhan2321
2x Consecutive FVG Alertyou'll see a big change in trading, use this for entries. Wskaźnik Pine Script®od piranha_trading3
stelaraX - Williams %RstelaraX – Williams %R stelaraX – Williams %R is a momentum oscillator designed to identify overbought and oversold market conditions. It measures the position of the current close relative to the highest high and lowest low over a defined lookback period and reacts quickly to changes in market momentum. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic Williams %R is calculated over a user-defined period and oscillates between 0 and -100. Key characteristics include: * values near 0 indicate overbought conditions * values near -100 indicate oversold conditions * the -50 level acts as a momentum midpoint When Williams %R moves above the overbought threshold, bullish momentum may be stretched. When it moves below the oversold threshold, bearish momentum may be stretched. Visualization The script plots: * the Williams %R line in a separate indicator pane * a configurable overbought level * a configurable oversold level * a midline at -50 for directional context The area between the overbought and oversold levels is visually highlighted, making extreme momentum conditions easy to identify. Use case This indicator is intended for: * identifying overbought and oversold market conditions * spotting potential momentum reversals * confirming short-term trend exhaustion * divergence analysis between price and momentum * timing entries and exits in ranging or trending markets For traders who want to combine classical oscillators with modern AI-driven chart analysis, additional tools and insights are available at stelarax.com Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user. Wskaźnik Pine Script®od stelaraX_official6
stelaraX - MomentumstelaraX – Momentum stelaraX – Momentum is a simple yet effective indicator designed to measure the speed and direction of price movement. It shows whether price is accelerating or decelerating and helps identify shifts in market strength at an early stage. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic The Momentum indicator calculates the difference between the current price and the price from a user-defined number of periods ago. Key characteristics include: * positive values indicate upward momentum * negative values indicate downward momentum * the zero line acts as a directional threshold When momentum crosses above zero, bullish pressure is increasing. When momentum crosses below zero, bearish pressure is increasing. Visualization The script plots a histogram in a separate indicator pane: * green bars when momentum is positive * red bars when momentum is negative * a clearly visible zero baseline for direction reference The histogram format makes changes in momentum strength immediately visible. Use case This indicator is intended for: * measuring price acceleration and deceleration * confirming trend strength * identifying early momentum shifts * filtering entries in trend-following strategies * divergence analysis between price and momentum For traders who want to combine classical momentum tools with modern AI-driven chart analysis, additional tools and insights are available at stelarax.com Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user. Wskaźnik Pine Script®od stelaraX_official7
stelaraX - MFIstelaraX – MFI stelaraX – MFI is a volume-weighted momentum oscillator that combines price movement and trading volume to measure buying and selling pressure. Unlike pure price-based oscillators, the Money Flow Index incorporates volume, making it especially useful for identifying strength behind price moves. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic The Money Flow Index is calculated using the typical price (HLC3) and volume over a user-defined lookback period. The calculation distinguishes between positive and negative money flow and converts the result into an oscillator ranging from 0 to 100. Key components include: * MFI value between 0 and 100 * overbought threshold to identify excessive buying pressure * oversold threshold to identify excessive selling pressure High MFI values indicate strong inflows of capital, while low values indicate capital outflows. Visualization The script plots: * the MFI line in a separate indicator pane * a configurable overbought level * a configurable oversold level The area between overbought and oversold levels is visually highlighted, allowing quick recognition of extreme money flow conditions. Use case This indicator is intended for: * identifying overbought and oversold conditions with volume confirmation * spotting potential reversals driven by volume imbalance * confirming price trends with underlying money flow * divergence analysis between price and volume-based momentum * filtering trades based on participation strength For traders who want to combine price action with volume-aware, AI-driven chart analysis, additional tools and insights are available at stelarax.com Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user. Wskaźnik Pine Script®od stelaraX_official1
stelaraX - Heikin AshistelaraX – Heikin Ashi stelaraX – Heikin Ashi is a price-smoothing indicator that transforms standard candlestick data into Heikin Ashi candles. By averaging price values, it reduces market noise and makes trend direction and momentum easier to read directly on the chart. This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation stelarax.com Core logic Heikin Ashi candles are calculated using averaged price values instead of raw open and close data. Each candle is derived from: * averaged open based on the previous Heikin Ashi candle * averaged close based on the current candle’s OHLC values * high and low adjusted to reflect the full price range This calculation smooths price action and filters out short-term volatility, allowing trends to appear more consistent and structured. Visualization The script plots custom Heikin Ashi candles directly on the price chart: * bullish candles displayed in a configurable bullish color * bearish candles displayed in a configurable bearish color * candle bodies, wicks, and borders are fully color-aligned The result is a clean and uniform visual representation of trend strength and direction. Use case This indicator is intended for: * identifying and following market trends * reducing noise in choppy market conditions * improving trend clarity for discretionary trading * confirming trend direction in combination with other indicators * simplifying price structure for higher-level analysis For traders who want to combine smoothed price action with modern AI-driven chart analysis, additional tools and insights are available at stelarax.com Disclaimer This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user. Wskaźnik Pine Script®od stelaraX_official1