Watermark Pro @SafarTradesWatermark Pro
Watermark Pro is a customizable branding and metadata overlay for TradingView charts. It helps create a clean, professional workspace while keeping important chart information consistently visible.
The indicator combines customizable branding, chart metadata, and account status badges into a single configurable layout, making it suitable for personal trading, screenshots, educational content, and social media publishing.
Branding Panel
Display a fully customizable title and subtitle with flexible positioning to maintain a consistent visual identity across all charts.
Account Status Badge
Display a customizable status badge (e.g., Live Account, Demo Account, Funded Account, Backtesting) with multiple styling options to clearly identify the chart environment.
Chart Metadata
Optionally display the current date, trading symbol, and timeframe in a dedicated information panel that updates automatically as charts change.
Customization
Every component can be customized independently, allowing you to configure the layout to match your personal workflow and visual preferences.
Theme presets
Branding panel
Account status badge
Chart metadata panel
Flexible positioning
Color and typography controls
Badge styling options
Intended Use
Watermark Pro is suitable for traders, educators, analysts, and content creators who want consistent chart branding and a clean presentation for trading, analysis, screenshots, and educational content. אינדיקטור

אינדיקטור

אינדיקטור

אינדיקטור

CandlePressure_UtilitiesCandlePressure_Utilities is a lightweight Pine library for converting raw OHLC candle structure into a normalized candle-pressure score, buy/sell percentage estimates, oscillator output, and compact display helpers.
The library is designed for scripts that want a reusable candle-pressure layer without rebuilding the same CLV/body/wick math every time.
It centralizes the pieces that commonly repeat across pressure-based scripts:
• close-location value / CLV calculation
• candle body dominance
• upper-vs-lower wick imbalance
• deadzone-filtered wick pressure
• normalized pressure output from -1 to +1
• buy/sell percentage conversion
• pressure oscillator conversion from -100 to +100
• alternate body/wick buy-sell allocation
• compact volume and relative-volume formatting
• table/label size and table-position helpers
• small percent and black/white text helpers
On the example chart, the pressure candles, pressure oscillator, buy/sell split, CLV/body/wick breakdown, alternate body/wick comparison, and compact table values are all materially driven by this library.
This library is intentionally focused on pure candle structure. It does not confirm trend, detect pivots, calculate RSI/DMI/ATR context, decide trade direction, or choose final signal logic for the calling script. Those layers remain script-level decisions.
➖Quick Start➖
Import the library near the top of your script in global scope, alongside any other imports, before calling its helpers.
Typical placement:
//@version=6
indicator(...) or strategy(...)
import MYNAMEISBRANDON/CandlePressure_Utilities/1 as cp
Replace /1 with the latest published version if a newer version is available.
The main helper for most scripts is candlePressureMetrics(), which returns:
• pressure
• buyPct
• sellPct
Example:
= cp.candlePressureMetrics(
open,
high,
low,
close,
volume)
string splitText = cp.fmtBuySellSplit(
buyPct,
sellPct,
volume)
float pressureOsc = cp.pressureOsc(
pressure)
The library uses standard OHLCV argument order:
open, high, low, close, volume
➖What The Library Measures➖
The default candle-pressure model uses:
• Wick Deadzone = 0.02
• CLV Weight = 0.55
• Body Weight = 0.30
• Wick Weight = 0.15
CLV measures where the close finished inside the candle range. Body contribution measures open-to-close directional dominance. Wick contribution measures lower-wick vs upper-wick imbalance.
The final pressure score is a weighted blend of those components, normalized from -1 to +1.
That pressure score can then be converted into buy/sell percentage estimates, a -100 to +100 pressure oscillator, candle-overlay colors, table values, labels, or dashboard outputs.
➖Function Reference➖
These helpers are grouped by purpose.
Most scripts will only need:
• candlePressureMetrics()
• fmtBuySellSplit()
• pressureOsc()
More advanced scripts can use the full component helpers for tables, tooltips, debug output, or custom pressure models.
➖Model + Math Helpers➖
modelDefaults()
Returns the default candle-pressure model values used by this library.
Returns:
Wick deadzone, CLV weight, body weight, wick weight
clamp(v, lo, hi)
Restricts a value between a lower and upper bound.
Parameters:
v (float): Input value
lo (float): Lower bound
hi (float): Upper bound
Returns:
Clamped value
safeDiv(numerator, denominator, fallback)
Safely divides two values and returns the fallback when division is not valid.
Parameters:
numerator (float): Numerator value
denominator (float): Denominator value
fallback (float): Value returned when division is unsafe
Returns:
numerator / denominator, or fallback when unsafe
➖Display + UI Helpers➖
fmtCompact(val, sigFigs, naText)
Formats large values into compact display text such as 1.5k, 2.4m, or 1.2b.
Parameters:
val (float): Value to format
sigFigs (simple int): Significant figures to keep
naText (simple string): Text returned when val is na
Returns:
Compact formatted string
fmtBuySellSplit(buyPct, sellPct, volumeValue)
Formats buy/sell percentages into rounded split text such as 62/38.
Parameters:
buyPct (float): Buy percentage
sellPct (float): Sell percentage
volumeValue (float): Volume value used to handle missing or no-volume bars
Returns:
Formatted buy/sell split text
contrastText(bg)
Chooses black or white text based on background brightness.
Parameters:
bg (color): Background color
Returns:
Readable contrast text color
stripLeadingZero(txt)
Removes the leading zero from decimal text.
Parameters:
txt (string): Input text
Returns:
Adjusted text, such as 0.25 -> .25 or -0.25 -> -.25
fmtRelVol(val, naText)
Formats relative volume with two decimals and strips the leading zero.
Parameters:
val (float): Relative volume value
naText (string): Text returned when val is na
Returns:
Formatted relative-volume text
pctChange(currentValue, baseValue)
Returns the percent change from a base value.
Parameters:
currentValue (float): Current or projected value
baseValue (float): Comparison baseline
Returns:
Percent change
fmtPctWhole(val, naText)
Formats a percent value as rounded whole-percent text.
Parameters:
val (float): Percent value
naText (string): Text returned when val is na
Returns:
Rounded percent string
pctInt(pct)
Rounds and clamps a percentage into 0–100 integer form.
Parameters:
pct (float): Percent value
Returns:
Integer percent from 0 to 100
pctIntVol(pct, volumeValue)
Rounds and clamps a percentage into 0–100 integer form, returning 0 on no-volume bars.
Parameters:
pct (float): Percent value
volumeValue (float): Volume value
Returns:
Integer percent from 0 to 100
tableTextSize(sizeText)
Converts user-facing table-size text into Pine table text-size enums.
Parameters:
sizeText (string): Size text. Expected values: "Tiny", "Small", "Normal", or "Large"
Returns:
Pine table text-size enum
labelSize(sizeText)
Converts user-facing label-size text into Pine label-size enums.
Parameters:
sizeText (string): Size text. Expected values: "Tiny", "Small", "Normal", "Large", or "Huge"
Returns:
Pine label-size enum
tablePos(posText)
Converts user-facing table-position text into Pine table position enums.
Parameters:
posText (string): Table position text
Returns:
Pine table position enum
bw(useBlack)
Returns black text when the condition is true, otherwise white.
Parameters:
useBlack (bool): Whether black text should be used
Returns:
Black or white text color
➖Candle Pressure Helpers➖
candlePressurePartsFull(openValue, highValue, lowValue, closeValue, wickDeadzone, weightClv, weightBody, weightWick)
Converts OHLC candle structure into the full normalized pressure component set.
Parameters:
openValue (float): Candle open
highValue (float): Candle high
lowValue (float): Candle low
closeValue (float): Candle close
wickDeadzone (float): Wick imbalance threshold below which wick contribution is forced to 0
weightClv (float): Weight assigned to the CLV component
weightBody (float): Weight assigned to the body component
weightWick (float): Weight assigned to the wick component
Returns:
CLV, body % of range, signed body term, raw wick imbalance, deadzoned wick imbalance, final pressure
Note:
wickDeadzone, weightClv, weightBody, and weightWick are optional. If omitted, the library uses its default model:
Wick Deadzone 0.02 / CLV 0.55 / Body 0.30 / Wick 0.15
candlePressureParts(openValue, highValue, lowValue, closeValue, wickDeadzone, weightClv, weightBody, weightWick)
Converts OHLC candle structure into the compact pressure component set.
Parameters:
openValue (float): Candle open
highValue (float): Candle high
lowValue (float): Candle low
closeValue (float): Candle close
wickDeadzone (float): Wick imbalance threshold below which wick contribution is forced to 0
weightClv (float): Weight assigned to the CLV component
weightBody (float): Weight assigned to the body component
weightWick (float): Weight assigned to the wick component
Returns:
CLV, body % of range, raw wick imbalance, deadzoned wick imbalance, final pressure
Note:
wickDeadzone, weightClv, weightBody, and weightWick are optional. If omitted, the library uses its default model:
Wick Deadzone 0.02 / CLV 0.55 / Body 0.30 / Wick 0.15
pressureToBuySell(pressure, volumeValue)
Converts normalized pressure into buy/sell percentages.
Parameters:
pressure (float): Candle pressure in the -1..+1 range
volumeValue (float): Volume value used to handle missing or no-volume bars
Returns:
Buy %, Sell %
pressureOsc(pressure)
Converts normalized pressure into a -100..+100 oscillator value.
Parameters:
pressure (float): Candle pressure in the -1..+1 range
Returns:
Pressure oscillator value
candlePressureMetrics(openValue, highValue, lowValue, closeValue, volumeValue, wickDeadzone, weightClv, weightBody, weightWick)
One-call convenience wrapper for scripts that need final pressure, buy %, and sell %.
Parameters:
openValue (float): Candle open
highValue (float): Candle high
lowValue (float): Candle low
closeValue (float): Candle close
volumeValue (float): Volume value used to handle missing or no-volume bars
wickDeadzone (float): Wick imbalance threshold below which wick contribution is forced to 0
weightClv (float): Weight assigned to the CLV component
weightBody (float): Weight assigned to the body component
weightWick (float): Weight assigned to the wick component
Returns:
Pressure, Buy %, Sell %
Note:
wickDeadzone, weightClv, weightBody, and weightWick are optional. If omitted, the library uses its default model:
Wick Deadzone 0.02 / CLV 0.55 / Body 0.30 / Wick 0.15
bodyWickRateBuyPct(openValue, highValue, lowValue, closeValue)
Returns an alternate buy percentage using body/wick structure only.
Parameters:
openValue (float): Candle open
highValue (float): Candle high
lowValue (float): Candle low
closeValue (float): Candle close
Returns:
Buy percentage
bodyWickRateBuySell(openValue, highValue, lowValue, closeValue, volumeValue)
Returns alternate body/wick buy and sell percentages.
Parameters:
openValue (float): Candle open
highValue (float): Candle high
lowValue (float): Candle low
closeValue (float): Candle close
volumeValue (float): Volume value used to handle missing or no-volume bars
Returns:
Buy %, Sell %
➖Important Notes➖
Candle Pressure is not order flow.
The buy/sell split produced by this library is an estimate derived from candle structure. It is not true bid/ask volume, footprint data, or exchange-level order flow.
The pressure model is intentionally pure OHLC structure:
• CLV measures where the close finished inside the candle range.
• Body contribution measures open-to-close directional dominance.
• Wick contribution measures lower-wick vs upper-wick imbalance.
• Final pressure is a weighted blend of those components.
Momentum filters such as RSI, DMI, ATR, trend state, relative volume, or multi-timeframe context should be added by the calling script when needed.
This library provides the reusable candle-pressure foundation only.
➖Release Notes➖
v1
Initial release of CandlePressure_Utilities.
This release provides a focused candle-pressure utility layer for Pine scripts that need reusable OHLC pressure calculations, buy/sell percentage estimates, pressure oscillator output, compact display formatting, and small table/label helper functions.
Included in this release:
• default candle-pressure model values
• safe math helpers
• compact number formatting
• buy/sell split formatting
• relative-volume formatting
• table/label size and table-position helpers
• percent and bias display helpers
• full candle-pressure component output
• compact candle-pressure component output
• pressure-to-buy/sell conversion
• pressure oscillator conversion
• alternate body/wick buy-sell allocation
The library is designed to stay focused on reusable candle-pressure mechanics. It does not decide trend, trade direction, signal confirmation, pivot structure, RSI/DMI filters, ATR filters, or final color logic. Calling scripts remain responsible for their own signal model and visual interpretation.
ספרייה

Cross-Platform Price Offset Dashboard## What it does
A utility dashboard for traders who hold accounts across multiple brokers
or trading platforms where the same underlying instrument quotes at slightly
different prices. The indicator displays, in real time, the equivalent
price of the chart's symbol on up to two external platforms — based on a
fixed offset that you calibrate once, manually.
## Why this exists
Traders who route the same idea to several brokers often see small but
persistent price gaps between platforms: different contract specifications,
broker-specific spreads, rollover timing differences between data feeds,
or CFD-versus-futures pricing on the same underlying. When you mark a
level on TradingView (entry, stop, target), you still need to translate
that level into the price scale of the platform where the trade is
actually executed. This indicator removes that mental arithmetic.
## How it works
At a single moment of your choosing, you take a simultaneous snapshot of
three values:
1. The current price of the symbol on the TradingView chart.
2. The price of the same instrument on Platform 1 (for example, your
live MT4 or MT5 account).
3. The price of the same instrument on Platform 2 (another broker or
account).
You enter all three values into the indicator's inputs. From that
moment on, the indicator computes a constant offset for each platform:
offset_1 = platform_1_price − reference_price
offset_2 = platform_2_price − reference_price
It then displays the live equivalent on each platform as:
platform_1_live = close + offset_1
platform_2_live = close + offset_2
If the TradingView chart moves +20 points, the displayed prices for both
platforms also move +20 points relative to their calibrated baseline.
## How to use
1. Add the indicator to any chart. It is symbol-agnostic and works on
futures, indices, metals, stocks, and crypto.
2. Open the indicator settings, "Calibration" tab.
3. Fill in the three calibration prices, all taken at the same moment
from your platforms.
4. Optionally, rename "Platform 1" and "Platform 2" to your broker names.
5. The dashboard now updates on every tick.
## Inputs
- Reference price at calibration — the chart's price at the moment you
took the snapshot.
- Platform 1 name / Platform 2 name — labels shown in the table.
- Platform 1 price / Platform 2 price at calibration — the corresponding
prices on your external platforms at that same moment.
- Display options — table position, text size (tiny, small, normal,
large, huge), text and background colors, and an optional row that
shows the raw offsets for sanity-checking.
## Assumptions and limitations
- The offset is treated as constant until you recalibrate. If the broker
changes the spread, rolls a contract, or shifts a data-feed timing,
the displayed values will drift away from reality and you should
recalibrate.
- This is a display utility. It does not place orders, generate signals,
or connect to any external broker. All three calibration prices are
entered manually by the user.
- Recalibration is manual. Whenever you observe a meaningful drift on
your real platform, take a fresh snapshot and update the three input
values.
## Notes
- The indicator does not connect to brokers, does not fetch external
data, and does not access any network resource. It operates purely on
the chart's close series and on the three calibration inputs you
provide.
- Displayed prices use the chart symbol's mintick precision, so values
appear at the same precision as your chart.
- The source is fully open. Read the code for the exact formula and the
table-rendering logic.
This script is provided for informational and convenience purposes only
and does not constitute trading advice.
אינדיקטור

Checklist - Notes and RemindersOverview
The Checklist - Notes and Reminders is a utility-focused "Heads-Up Display" (HUD) designed for traders who need to keep their higher-timeframe narrative and session rules front and center. In fast-moving markets, it is easy to lose sight of the "Big Picture"—this script ensures your mental model is always visible without cluttering your price action with floating labels or trendline notes.
Key Features
Persistent HUD Table: Uses a clean, snapped table interface that stays fixed to your chosen corner (Top Right, Bottom Left, etc.) even as you scroll through price history.
Multi-Line Narrative Support: Specifically designed with text_area inputs to allow for detailed HTF and LTF narrative logging.
Dynamic Session Themes: Features an "Auto Session" mode that automatically changes the UI background color based on the current market (Asia, London, or New York) to keep you synced with the clock.
Bias Color Coding: Quickly toggle between Bullish and Bearish "Bias Modes" to change the entire table's color—serving as a constant visual reminder of your current market thesis.
Fully Customizable: Toggle individual rows on/off, adjust text sizes (Small to Huge), and choose from preset themes or a fully manual color picker.
How to Use
Input Your Narrative: Double-click the table on your chart or open the script settings to type your HTF narrative, key levels, and session reminders.
Select Your Theme:
Use Manual for a static, clean look.
Use Bias to color-code the box based on your daily direction.
Use Auto Session to have the UI track the trading day automatically.
Refine Your View: Toggle rows off if you only need one or two sections, and move the table to whichever corner of your screen has the most "dead space."
Why Use This?
Successful trading is often about discipline and adherence to a checklist. This script turns your chart into a professional workspace, keeping your "If/Then" scenarios and liquidity targets in your peripheral vision at all times.
Developer Note
This script is designed to be lightweight and does not calculate on every tick, ensuring it has zero impact on your chart performance. אינדיקטור

Rotating Messages [YM]Trading is 80% psychology and 20% strategy. How many times have you broken your trading plan or made a bad decision simply because you got carried away by the emotion of the moment?
I created the Rotating Messages indicator to act as your personal psychological assistant. This script displays your trading rules, reminders, or motivational quotes directly on your chart, rotating them automatically so you never lose focus while trading.
✨ Main Features:
🔄 Smart Time Rotation: Unlike other indicators that stay frozen until the candle closes, this script uses the internal clock (when the market is open and the price moves) to rotate your messages every "X" seconds of your choosing. Ideal for higher timeframe charts where candles take a long time to close. (Note: In backtesting or weekends, it will automatically switch to bar counting).
⚠️ Dynamic Visual Alerts: Do you have a rule that you absolutely cannot break? Simply add the ! symbol at the beginning of your sentence in the settings (e.g., !Avoid trading on Friday afternoons). The indicator will hide the symbol and highlight that phrase with a striking yellow background to grab your attention immediately.
🛠️ Perfect Positioning: Don't let the text block the price action. You can choose the screen corner and fine-tune the panel using the "Offsets" (Vertical and Horizontal) to place it exactly where it won't bother you.
🎨 Total Customization: Change the text color, adjust the background opacity to see the candles through the panel, and choose between three text sizes.
⌨️ Simplicity of Use: Forget about complex coding. Type your rules in the text box and simply press "ENTER" to separate one phrase from the next.
📝 What's included by default?
The indicator comes pre-loaded with a list of golden risk management rules and trading psychology quotes ready to use, but you can delete everything and put your own personal trading plan.
💡 A disciplined trader is a profitable trader. Keep your mind focused, respect your Stop Loss, and let this indicator remind you of your flight plan every day.
If you find it useful to maintain discipline, don't forget to hit "Like" and add it to your favorites! Let me know in the comments which trading rule is the hardest for you to follow. 👇 אינדיקטור

אינדיקטור

אינדיקטור

Game Theory Strategic Indicator - Archery & Horse Riding Model# Game Theory Strategic Indicator - Archery & Horse Riding Model
## Overview
This indicator applies rigorous game theory mathematics to market analysis, modeling price action as a strategic two-player game between buyers and sellers. The methodology draws from economic game theory, evolutionary dynamics, and zero-sum game optimization.
## Theoretical Foundation
The indicator implements five core game theory concepts:
**1. Expected Utility (Mixed Strategies)**
Calculates E = p×U₁ + (1-p)×U₂ where:
- p = probability distribution based on volume dynamics
- U₁, U₂ = utility payoffs for aggressive vs defensive strategies
- Uses RSI momentum and ATR volatility to quantify payoffs
**2. Nash Equilibrium Detection**
Identifies market states where ui(σᵢ*, σ₋ᵢ*) ≥ ui(σᵢ, σ₋ᵢ*):
- Measures when no participant can improve by changing strategy
- Highlighted with yellow background zones
- Signals reduced edge environments (avoid trading)
**3. Replicator Dynamics**
Models evolutionary strategy adaptation: dx/dt = x(f(x) - φ(x))
- Tracks frequency changes in bullish vs bearish strategies
- Shows which approach is gaining evolutionary fitness
- Purple line indicates strategy evolution trend
**4. Minimax Algorithm**
Implements zero-sum game optimal strategy L(x,y):
- Calculates win/loss ratio over lookback period
- Values > 1.0 suggest favorable risk/reward
- Orange line shows deviation from neutral state
**5. Best Response Function**
Determines optimal action maximizing ui(aᵢ, a₋ᵢ):
- Compares buyer vs seller expected utilities
- Generates primary long/short signals
- Confidence weighted by utility differential
## Visual Elements
**Chart Plots:**
- **Blue Line (Utility Differential)**: Buyer utility minus seller utility. Positive favors longs, negative favors shorts
- **Purple Line (Replicator Dynamics)**: Rate of strategy evolution. Rising = bullish strategies gaining fitness
- **Orange Line (Minimax Deviation)**: Zero-sum game value. Above zero = favorable conditions
- **Pink Area (Mixed Strategy Bias)**: Probability-weighted strategy preference
- **Yellow Background**: Nash equilibrium zones where no player has edge
**Signals:**
- **Green Triangle Up**: Long signal - buyer utility dominates outside equilibrium
- **Red Triangle Down**: Short signal - seller utility dominates outside equilibrium
- **Yellow Diamond**: Equilibrium warning - reduced edge state
**Info Table (Top Right):**
- EU Buyer/Seller: Current expected utilities
- Nash Score: Equilibrium strength (>0.65 = equilibrium)
- Mix Prob: Volume-based probability distribution
- Minimax: Win/loss ratio indicator
## Strategy Metaphors
**Archery (Buyer Strategy)**: Represents precision attacks - targeted entries at optimal risk/reward points, high accuracy required
**Horse Riding (Seller Strategy)**: Represents mobile defense - flexible positioning, quick exits, adaptive to changing terrain
## Parameters
- **Strategy Period (14)**: Lookback for RSI and ATR calculations
- **Mixed Strategy Length (21)**: Period for minimax win/loss analysis
- **Nash Equilibrium Threshold (0.65)**: Minimum score to identify equilibrium (0.5-0.9)
- **Show Trade Signals**: Toggle buy/sell arrows
- **Show Equilibrium Zones**: Toggle background highlighting
## How to Use
1. **Trend Trading**: Take long signals when utility differential (blue) is rising and no equilibrium zone present
2. **Counter-Trend**: Take signals when replicator dynamics (purple) diverges from price
3. **Risk Management**: Avoid trading during yellow equilibrium zones - market has no clear edge
4. **Confirmation**: Best signals occur when minimax > 1.0 and best response aligns with utility differential
5. **Monitoring**: Watch info table for real-time utility balance and equilibrium status
## Alerts
Three alert conditions available:
- **GT Long Signal**: Buyer utility dominates, composite score > 0.5
- **GT Short Signal**: Seller utility dominates, composite score < -0.5
- **Nash Equilibrium**: Market reaches balanced state, avoid new entries
## Mathematical Rigor
All calculations use proper game theory formulations:
- Payoff functions normalized by volatility
- Probability distributions bounded
- Zero-division protection implemented
- Utilities properly weighted in composite score
## Originality Statement
This indicator is original work implementing classical game theory mathematics in a novel market analysis framework. The code, calculations, and interpretation methodology are entirely my own creation. No external scripts were copied or modified.
## Disclaimer
This indicator is for educational purposes. Game theory provides a framework for analyzing strategic interaction but does not guarantee profitable trading. Always use proper risk management, test thoroughly, and understand that past performance does not indicate future results.
---
**Educational Resource**: For deeper understanding of game theory in economics, see Nash (1950) "Equilibrium Points in N-Person Games" and Maynard Smith (1982) "Evolution and the Theory of Games"
```
--- אינדיקטור

אינדיקטור

BarCoreLibrary "BarCore"
BarCore is a foundational library for technical analysis, providing essential functions for evaluating the structural properties of candlesticks and inter-bar relationships.
It prioritizes ratio-based metrics (0.0 to 1.0) over absolute prices, making it asset-agnostic and ideal for robust pattern recognition, momentum analysis, and volume-weighted pressure evaluation.
Key modules:
- Structure & Range: High-precision bar and body metrics with relative positioning.
- Wick Dynamics: Absolute and relative wick analysis for identifying price rejection.
- Inter-bar Logic: Containment, coverage, and quantitative price overlap (Ratio-based).
- Gap Intelligence: Real body and price gaps with customizable significance thresholds.
- Flow & Pressure: Volume-weighted buying/selling pressure and Money Flow metrics.
isBuyingBar()
Checks if the bar is a bullish (up) bar, where close is greater than open.
Returns: bool True if the bar closed higher than it opened.
isSellingBar()
Checks if the bar is a bearish (down) bar, where close is less than open.
Returns: bool True if the bar closed lower than it opened.
barMidpoint()
Calculates the absolute midpoint of the bar's total range (High + Low) / 2.
Returns: float The midpoint price of the bar.
barRange()
Calculates the absolute size of the bar's total range (High to Low).
Returns: float The absolute difference between high and low.
barRangeMidpoint()
Calculates half of the bar's total range size.
Returns: float Half the bar's range size.
realBodyHigh()
Returns the higher price between the open and close.
Returns: float The top of the real body.
realBodyLow()
Returns the lower price between the open and close.
Returns: float The bottom of the real body.
realBodyMidpoint()
Calculates the absolute midpoint of the bar's real body.
Returns: float The midpoint price of the real body.
realBodyRange()
Calculates the absolute size of the bar's real body.
Returns: float The absolute difference between open and close.
realBodyRangeMidpoint()
Calculates half of the bar's real body size.
Returns: float Half the real body size.
upperWickRange()
Calculates the absolute size of the upper wick.
Returns: float The range from high to the real body high.
lowerWickRange()
Calculates the absolute size of the lower wick.
Returns: float The range from the real body low to low.
openRatio()
Returns the location of the open price relative to the bar's total range (0.0 at low to 1.0 at high).
Returns: float The ratio of the distance from low to open, divided by the total range.
closeRatio()
Returns the location of the close price relative to the bar's total range (0.0 at low to 1.0 at high).
Returns: float The ratio of the distance from low to close, divided by the total range.
realBodyRatio()
Calculates the ratio of the real body size to the total bar range.
Returns: float The real body size divided by the bar range. Returns 0 if barRange is 0.
upperWickRatio()
Calculates the ratio of the upper wick size to the total bar range.
Returns: float The upper wick size divided by the bar range. Returns 0 if barRange is 0.
lowerWickRatio()
Calculates the ratio of the lower wick size to the total bar range.
Returns: float The lower wick size divided by the bar range. Returns 0 if barRange is 0.
upperWickToBodyRatio()
Calculates the ratio of the upper wick size to the real body size.
Returns: float The upper wick size divided by the real body size. Returns 0 if realBodyRange is 0.
lowerWickToBodyRatio()
Calculates the ratio of the lower wick size to the real body size.
Returns: float The lower wick size divided by the real body size. Returns 0 if realBodyRange is 0.
totalWickRatio()
Calculates the ratio of the total wick range (Upper Wick + Lower Wick) to the total bar range.
Returns: float The total wick range expressed as a ratio of the bar's total range. Returns 0 if barRange is 0.
isBodyExpansion()
Checks if the current bar's real body range is larger than the previous bar's real body range (body expansion).
Returns: bool True if realBodyRange() > realBodyRange() .
isBodyContraction()
Checks if the current bar's real body range is smaller than the previous bar's real body range (body contraction).
Returns: bool True if realBodyRange() < realBodyRange() .
isWithinPrevBar(inclusive)
Checks if the current bar's range is entirely within the previous bar's range.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if High < High AND Low > Low .
isCoveringPrevBar(inclusive)
Checks if the current bar's range fully covers the entire previous bar's range.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if High > High AND Low < Low .
isWithinPrevBody(inclusive)
Checks if the current bar's real body is entirely inside the previous bar's real body.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if the current body is contained inside the previous body.
isCoveringPrevBody(inclusive)
Checks if the current bar's real body fully covers the previous bar's real body.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if the current body fully covers the previous body.
isOpenWithinPrevBody(inclusive)
Checks if the current bar's open price falls within the real body range of the previous bar.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if the open price is between the previous bar's real body high and real body low.
isCloseWithinPrevBody(inclusive)
Checks if the current bar's close price falls within the real body range of the previous bar.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if the close price is between the previous bar's real body high and real body low.
isPrevOpenWithinBody(inclusive)
Checks if the previous bar's open price falls within the current bar's real body range.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if open is between the current bar's real body high and real body low.
isPrevCloseWithinBody(inclusive)
Checks if the previous bar's closing price falls within the current bar's real body range.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if close is between the current bar's real body high and real body low.
isOverlappingPrevBar()
Checks if there is any price overlap between the current bar's range and the previous bar's range.
Returns: bool True if the current bar's range has any intersection with the previous bar's range.
bodyOverlapRatio()
Calculates the percentage of the current real body that overlaps with the previous real body.
Returns: float The overlap ratio (0.0 to 1.0). 1.0 means the current body is entirely within the previous body's price range.
isCompletePriceGapUp()
Checks for a complete price gap up where the current bar's low is strictly above the previous bar's high, meaning there is zero price overlap between the two bars.
Returns: bool True if the current low is greater than the previous high.
isCompletePriceGapDown()
Checks for a complete price gap down where the current bar's high is strictly below the previous bar's low, meaning there is zero price overlap between the two bars.
Returns: bool True if the current high is less than the previous low.
isRealBodyGapUp()
Checks for a gap between the current and previous real bodies.
Returns: bool True if the current body is completely above the previous body.
isRealBodyGapDown()
Checks for a gap between the current and previous real bodies.
Returns: bool True if the current body is completely below the previous body.
gapRatio()
Calculates the percentage difference between the current open and the previous close, expressed as a decimal ratio.
Returns: float The gap ratio (positive for gap up, negative for gap down). Returns 0 if the previous close is 0.
gapPercentage()
Calculates the percentage difference between the current open and the previous close.
Returns: float The gap percentage (positive for gap up, negative for gap down). Returns 0 if previous close is 0.
isGapUp()
Checks for a basic gap up, where the current bar's open is strictly higher than the previous bar's close. This is the minimum condition for a gap up.
Returns: bool True if the current open is greater than the previous close (i.e., gapRatio is positive).
isGapDown()
Checks for a basic gap down, where the current bar's open is strictly lower than the previous bar's close. This is the minimum condition for a gap down.
Returns: bool True if the current open is less than the previous close (i.e., gapRatio is negative).
isSignificantGapUp(minRatio)
Checks if the current bar opened significantly higher than the previous close, as defined by a minimum percentage ratio.
Parameters:
minRatio (float) : The minimum required gap percentage ratio. Default is 0.03 (3%).
Returns: bool True if the gap ratio (open vs. previous close) is greater than or equal to the minimum ratio.
isSignificantGapDown(minRatio)
Checks if the current bar opened significantly lower than the previous close, as defined by a minimum percentage ratio.
Parameters:
minRatio (float) : The minimum required gap percentage ratio. Default is 0.03 (3%).
Returns: bool True if the absolute value of the gap ratio (open vs. previous close) is greater than or equal to the minimum ratio.
trueRangeComponentHigh()
Calculates the absolute distance from the current bar's High to the previous bar's Close, representing one of the components of the True Range.
Returns: float The absolute difference: |High - Close |.
trueRangeComponentLow()
Calculates the absolute distance from the current bar's Low to the previous bar's Close, representing one of the components of the True Range.
Returns: float The absolute difference: |Low - Close |.
isUpperWickDominant(minRatio)
Checks if the upper wick is significantly long relative to the total range.
Parameters:
minRatio (float) : Minimum ratio of the wick to the total bar range. Default is 0.7 (70%).
Returns: bool True if the upper wick dominates the bar's range.
isUpperWickNegligible(maxRatio)
Checks if the upper wick is very small relative to the total range.
Parameters:
maxRatio (float) : Maximum ratio of the wick to the total bar range. Default is 0.05 (5%).
Returns: bool True if the upper wick is negligible.
isLowerWickDominant(minRatio)
Checks if the lower wick is significantly long relative to the total range.
Parameters:
minRatio (float) : Minimum ratio of the wick to the total bar range. Default is 0.7 (70%).
Returns: bool True if the lower wick dominates the bar's range.
isLowerWickNegligible(maxRatio)
Checks if the lower wick is very small relative to the total range.
Parameters:
maxRatio (float) : Maximum ratio of the wick to the total bar range. Default is 0.05 (5%).
Returns: bool True if the lower wick is negligible.
isSymmetric(maxTolerance)
Checks if the upper and lower wicks are roughly equal in length.
Parameters:
maxTolerance (float) : Maximum allowable percentage difference between the two wicks. Default is 0.15 (15%).
Returns: bool True if wicks are symmetric within the tolerance level.
isMarubozuBody(minRatio)
Candle with a very large body relative to the total range (minimal wicks).
Parameters:
minRatio (float) : Minimum body size ratio. Default is 0.9 (90%).
Returns: bool True if the bar has minimal wicks (Marubozu body).
isLargeBody(minRatio)
Candle with a large body relative to the total range.
Parameters:
minRatio (float) : Minimum body size ratio. Default is 0.6 (60%).
Returns: bool True if the bar has a large body.
isSmallBody(maxRatio)
Candle with a small body relative to the total range.
Parameters:
maxRatio (float) : Maximum body size ratio. Default is 0.4 (40%).
Returns: bool True if the bar has small body.
isDojiBody(maxRatio)
Candle with a very small body relative to the total range (indecision).
Parameters:
maxRatio (float) : Maximum body size ratio. Default is 0.1 (10%).
Returns: bool True if the bar has a very small body.
isLowerWickExtended(minRatio)
Checks if the lower wick is significantly extended relative to the real body size.
Parameters:
minRatio (float) : Minimum required ratio of the lower wick length to the real body size. Default is 2.0 (Lower wick must be at least twice the body's size).
Returns: bool True if the lower wick's length is at least `minRatio` times the size of the real body.
isUpperWickExtended(minRatio)
Checks if the upper wick is significantly extended relative to the real body size.
Parameters:
minRatio (float) : Minimum required ratio of the upper wick length to the real body size. Default is 2.0 (Upper wick must be at least twice the body's size).
Returns: bool True if the upper wick's length is at least `minRatio` times the size of the real body.
isStrongBuyingBar(minCloseRatio, maxOpenRatio)
Checks for a bar with strong bullish momentum (open near low, close near high), indicating high conviction.
Parameters:
minCloseRatio (float) : Minimum required ratio for the close location (relative to range, e.g., 0.7 means close must be in the top 30%). Default is 0.7 (70%).
maxOpenRatio (float) : Maximum allowed ratio for the open location (relative to range, e.g., 0.3 means open must be in the bottom 30%). Default is 0.3 (30%).
Returns: bool True if the bar is bullish, opened in the low extreme, and closed in the high extreme.
isStrongSellingBar(maxCloseRatio, minOpenRatio)
Checks for a bar with strong bearish momentum (open near high, close near low), indicating high conviction.
Parameters:
maxCloseRatio (float) : Maximum allowed ratio for the close location (relative to range, e.g., 0.3 means close must be in the bottom 30%). Default is 0.3 (30%).
minOpenRatio (float) : Minimum required ratio for the open location (relative to range, e.g., 0.7 means open must be in the top 30%). Default is 0.7 (70%).
Returns: bool True if the bar is bearish, opened in the high extreme, and closed in the low extreme.
isWeakBuyingBar(maxCloseRatio, maxBodyRatio)
Identifies a bar that is technically bullish but shows significant weakness, characterized by a failure to close near the high and a small body size.
Parameters:
maxCloseRatio (float) : Maximum allowed ratio for the close location relative to the range (e.g., 0.6 means the close must be in the bottom 60% of the bar's range). Default is 0.6 (60%).
maxBodyRatio (float) : Maximum allowed ratio for the real body size relative to the bar's range (e.g., 0.4 means the body is small). Default is 0.4 (40%).
Returns: bool True if the bar is bullish, but its close is weak and its body is small.
isWeakSellingBar(minCloseRatio, maxBodyRatio)
Identifies a bar that is technically bearish but shows significant weakness, characterized by a failure to close near the low and a small body size.
Parameters:
minCloseRatio (float) : Minimum required ratio for the close location relative to the range (e.g., 0.4 means the close must be in the top 60% of the bar's range). Default is 0.4 (40%).
maxBodyRatio (float) : Maximum allowed ratio for the real body size relative to the bar's range (e.g., 0.4 means the body is small). Default is 0.4 (40%).
Returns: bool True if the bar is bearish, but its close is weak and its body is small.
balanceOfPower()
Measures the net pressure of buyers vs. sellers within the bar, normalized to the bar's range.
Returns: float A value between -1.0 (strong selling) and +1.0 (strong buying), representing the strength and direction of the close relative to the open.
buyingPressure()
Measures the net buying volume pressure based on the close location and volume.
Returns: float A numerical value representing the volume weighted buying pressure.
sellingPressure()
Measures the net selling volume pressure based on the close location and volume.
Returns: float A numerical value representing the volume weighted selling pressure.
moneyFlowMultiplier()
Calculates the Money Flow Multiplier (MFM), which is the price component of Money Flow and CMF.
Returns: float A normalized value from -1.0 (strong selling) to +1.0 (strong buying), representing the net directional pressure.
moneyFlowVolume()
Calculates the Money Flow Volume (MFV), which is the Money Flow Multiplier weighted by the bar's volume.
Returns: float A numerical value representing the volume-weighted money flow. Positive = buying dominance; negative = selling dominance.
isAccumulationBar()
Checks for basic accumulation on the current bar, requiring both positive Money Flow Volume and a buying bar (closing higher than opening).
Returns: bool True if the bar exhibits buying dominance through its internal range location and is a buying bar.
isDistributionBar()
Checks for basic distribution on the current bar, requiring both negative Money Flow Volume and a selling bar (closing lower than opening).
Returns: bool True if the bar exhibits selling dominance through its internal range location and is a selling bar. ספרייה

אינדיקטור

אינדיקטור

Smart Weekly Lines — Clean & Scroll-Proof (Pine v6)Because your chart deserves structure. Elegant weekly dividers that stay aligned, scroll smoothly, and project future weeks using your wished UTC offset.
Smart Weekly Lines draws precise, full-height vertical lines marking each new week — perfectly aligned to your local UTC offset. It stays clean, smooth, and consistent no matter how far you scroll.
Features
• Accurate weekly boundaries based on your local UTC offset (supports half-hour zones like India +5.5)
• Clean, full-height lines that never cut off with zoom or scroll
• Adjustable color, opacity, width, and style (solid, dashed, dotted)
• Future week projection for planning and alignment
• Optional visibility: show only on Daily and Intraday charts
Works with any market — stocks, crypto, forex, or futures.
Built for traders who value clarity, structure, and precision.
Developed collaboratively with the assistance of ChatGPT under my direction and testing. אינדיקטור

אינדיקטור

Chartlense Dashboard (Data, Trend & Levels)Chartlense Dashboard (Data, Trend & Levels)
Overview
This dashboard is designed to solve two common problems for traders: chart clutter and the manual drawing of support and resistance levels . It consolidates critical data from multiple indicators into a clean table overlay and automatically plots the most relevant S&R levels based on recent price action. The primary goal is to provide a clear, at-a-glance overview of the market's structure and data.
It offers both a vertical and horizontal layout to fit any trader's workspace.
Key Concepts & Calculations Explained
This indicator is more than a simple collection of values; it synthesizes data to provide unique insights. Here’s a conceptual look at how its core components work:
Automatic Support & Resistance (Pivot-Based):
The dashed support (green) and resistance (red) lines are not manually drawn. They are dynamically calculated based on the most recent confirmed pivot highs and pivot lows . A pivot is a foundational concept in technical analysis that identifies potential turning points in price action.
How it works: A pivot high is a candle whose `high` is higher than a specific number of candles to its left and right (the "Pivot Lookback" is set to 5 by default in the settings). A pivot low is the inverse. By automatically identifying these confirmed structural points, the script visualizes the most relevant levels of potential supply and demand on the chart.
Relative Volume (RVOL):
This value in the table is not the standard volume. It measures the current bar's volume against its recent average (specifically, `current volume / 10-period simple moving average of volume`).
Interpretation: A reading above 2.0 (indicated by green text) suggests that the current volume is more than double the recent average. This technique is used to identify significant volume spikes, which can add conviction to breakouts or signal potential market climaxes.
Consolidated Data for Context:
Other values displayed in the table, such as the EMAs (9, 20, 200) , Bollinger Bands (20, 2) , RSI (14) , MACD (12, 26, 9) , and VWAP (on intraday charts), use their standard industry calculations. They are included to provide a complete contextual picture without needing to load each indicator separately, saving valuable chart space.
How to Use This in Your Trading
This dashboard is designed as a tool for confluence and context , not as a standalone signal generator. Here are some ways to integrate it into your analysis workflow:
As a Trend Filter: Before considering a trade, quickly glance at the EMAs and the MACD values in the table. A price above the key EMAs and a positive MACD can serve as a quick confirmation that you are aligned with the dominant trend.
To Validate Breakouts: When the price is approaching a key Resistance level (red pivot line), watch the RVOL value . A reading above 2.0 on the breakout candle adds significant confirmation that the move is backed by strong interest. The same logic applies to breakdowns below a support level.
To Spot Potential Reversals: Confluence is key. For example, if the price is testing a Support level (green pivot line) AND the RSI in the table is approaching oversold levels (e.g., near 30), it can signal a higher probability reversal setup.
About This Indicator
This indicator was developed by the team at ChartLense to help traders declutter their charts and focus on the data that matters. We believe in making complex analysis more accessible and organized. We hope this free tool is a valuable addition to your trading process. אינדיקטור

ACR(Average Candle Range) With TargetsWhat is ACR?
The Average Candle Range (ACR) is a custom volatility metric that calculates the mean distance between the high and low of a set number of past candles. ACR focuses only on the actual candle range (high - low) of specific past candles on a chosen timeframe.
This script calculates and visualizes the Average Candle Range (ACR) over a user-defined number of candles on a custom timeframe. It displays a table of recent range values, plots dynamic bullish and bearish target levels, and marks the start of each new candle with a vertical line. All calculations update in real time as price action develops. This script was inspired by the “ICT ADR Levels - Judas x Daily Range Meter°” by toodegrees.
Key Features
Custom Timeframe Selection: Choose any timeframe (e.g., 1D, 4H, 15m) for analysis.
User-Defined Lookback: Calculate the average range across 1 to 10 previous candles.
Dynamic Targets:
Bullish Target: Current candle low + ACR.
Bearish Target: Current candle high – ACR.
Live Updates: Targets adjust intrabar as highs or lows change during the current candle.
Candle Start Markers: Vertical lines denote the open of each new candle on the selected timeframe.
Floating Range Table:
Displays the current ACR value.
Lists individual ranges for the previous five candles.
Extend Target Lines: Choose to extend bullish and bearish target levels fully across the screen.
Global Visibility Controls: Toggle on/off all visual elements (targets, vertical lines, and table) for a cleaner view.
How It Works
At each new candle on the user-selected timeframe, the script:
Draws a vertical line at the candle’s open.
Recalculates the ACR based on the inputted previous number of candles.
Plots target levels using the current candle's developing high and low values.
Limitation
Once the price has already moved a full ACR in the opposite direction from your intended trade, the associated target loses its practical value. For example, if you intended to trade long but the bearish ACR target is hit first, the bullish target is no longer a reliable reference for that session.
Use Case
This tool is designed for traders who:
Want to visualize the average movement range of candles over time.
Use higher or lower timeframe candles as structural anchors.
Require real-time range-based price levels for intraday or swing decision-making.
This script does not generate entry or exit signals. Instead, it supports range awareness and target projection based on historical candle behavior.
Key Difference from Similar Tools
While this script was inspired by “ICT ADR Levels - Judas x Daily Range Meter°” by toodegrees, it introduces a major enhancement: the ability to customize the timeframe used for calculating the range. Most ADR or candle-range tools are locked to a single timeframe (e.g., daily), but this version gives traders full control over the analysis window. This makes it adaptable to a wide range of strategies, including intraday and swing trading, across any market or asset. אינדיקטור

real_time_candlesIntroduction
The Real-Time Candles Library provides comprehensive tools for creating, manipulating, and visualizing custom timeframe candles in Pine Script. Unlike standard indicators that only update at bar close, this library enables real-time visualization of price action and indicators within the current bar, offering traders unprecedented insight into market dynamics as they unfold.
This library addresses a fundamental limitation in traditional technical analysis: the inability to see how indicators evolve between bar closes. By implementing sophisticated real-time data processing techniques, traders can now observe indicator movements, divergences, and trend changes as they develop, potentially identifying trading opportunities much earlier than with conventional approaches.
Key Features
The library supports two primary candle generation approaches:
Chart-Time Candles: Generate real-time OHLC data for any variable (like RSI, MACD, etc.) while maintaining synchronization with chart bars.
Custom Timeframe (CTF) Candles: Create candles with custom time intervals or tick counts completely independent of the chart's native timeframe.
Both approaches support traditional candlestick and Heikin-Ashi visualization styles, with options for moving average overlays to smooth the data.
Configuration Requirements
For optimal performance with this library:
Set max_bars_back = 5000 in your script settings
When using CTF drawing functions, set max_lines_count = 500, max_boxes_count = 500, and max_labels_count = 500
These settings ensure that you will be able to draw correctly and will avoid any runtime errors.
Usage Examples
Basic Chart-Time Candle Visualization
// Create real-time candles for RSI
float rsi = ta.rsi(close, 14)
Candle rsi_candle = candle_series(rsi, CandleType.candlestick)
// Plot the candles using Pine's built-in function
plotcandle(rsi_candle.Open, rsi_candle.High, rsi_candle.Low, rsi_candle.Close,
"RSI Candles", rsi_candle.candle_color, rsi_candle.candle_color)
Multiple Access Patterns
The library provides three ways to access candle data, accommodating different programming styles:
// 1. Array-based access for collection operations
Candle candles = candle_array(source)
// 2. Object-oriented access for single entity manipulation
Candle candle = candle_series(source)
float value = candle.source(Source.HLC3)
// 3. Tuple-based access for functional programming styles
= candle_tuple(source)
Custom Timeframe Examples
// Create 20-second candles with EMA overlay
plot_ctf_candles(
source = close,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 20,
timezone = -5,
tied_open = true,
ema_period = 9,
enable_ema = true
)
// Create tick-based candles (new candle every 15 ticks)
plot_ctf_tick_candles(
source = close,
candle_type = CandleType.heikin_ashi,
number_of_ticks = 15,
timezone = -5,
tied_open = true
)
Advanced Usage with Custom Visualization
// Get custom timeframe candles without automatic plotting
CandleCTF my_candles = ctf_candles_array(
source = close,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 30
)
// Apply custom logic to the candles
float ema_values = my_candles.ctf_ema(14)
// Draw candles and EMA using time-based coordinates
my_candles.draw_ctf_candles_time()
ema_values.draw_ctf_line_time(line_color = #FF6D00)
Library Components
Data Types
Candle: Structure representing chart-time candles with OHLC, polarity, and visualization properties
CandleCTF: Extended candle structure with additional time metadata for custom timeframes
TickData: Structure for individual price updates with time deltas
Enumerations
CandleType: Specifies visualization style (candlestick or Heikin-Ashi)
Source: Defines price components for calculations (Open, High, Low, Close, HL2, etc.)
SampleType: Sets sampling method (Time-based or Tick-based)
Core Functions
get_tick(): Captures current price as a tick data point
candle_array(): Creates an array of candles from price updates
candle_series(): Provides a single candle based on latest data
candle_tuple(): Returns OHLC values as a tuple
ctf_candles_array(): Creates custom timeframe candles without rendering
Visualization Functions
source(): Extracts specific price components from candles
candle_ctf_to_float(): Converts candle data to float arrays
ctf_ema(): Calculates exponential moving averages for candle arrays
draw_ctf_candles_time(): Renders candles using time coordinates
draw_ctf_candles_index(): Renders candles using bar index coordinates
draw_ctf_line_time(): Renders lines using time coordinates
draw_ctf_line_index(): Renders lines using bar index coordinates
Technical Implementation Notes
This library leverages Pine Script's varip variables for state management, creating a sophisticated real-time data processing system. The implementation includes:
Efficient tick capturing: Samples price at every execution, maintaining temporal tracking with time deltas
Smart state management: Uses a hybrid approach with mutable updates at index 0 and historical preservation at index 1+
Temporal synchronization: Manages two time domains (chart time and custom timeframe)
The tooltip implementation provides crucial temporal context for custom timeframe visualizations, allowing users to understand exactly when each candle formed regardless of chart timeframe.
Limitations
Custom timeframe candles cannot be backtested due to Pine Script's limitations with historical tick data
Real-time visualization is only available during live chart updates
Maximum history is constrained by Pine Script's array size limits
Applications
Indicator visualization: See how RSI, MACD, or other indicators evolve in real-time
Volume analysis: Create custom volume profiles independent of chart timeframe
Scalping strategies: Identify short-term patterns with precisely defined time windows
Volatility measurement: Track price movement characteristics within bars
Custom signal generation: Create entry/exit signals based on custom timeframe patterns
Conclusion
The Real-Time Candles Library bridges the gap between traditional technical analysis (based on discrete OHLC bars) and the continuous nature of market movement. By making indicators more responsive to real-time price action, it gives traders a significant edge in timing and decision-making, particularly in fast-moving markets where waiting for bar close could mean missing important opportunities.
Whether you're building custom indicators, researching price patterns, or developing trading strategies, this library provides the foundation for sophisticated real-time analysis in Pine Script.
Implementation Details & Advanced Guide
Core Implementation Concepts
The Real-Time Candles Library implements a sophisticated event-driven architecture within Pine Script's constraints. At its heart, the library creates what's essentially a reactive programming framework handling continuous data streams.
Tick Processing System
The foundation of the library is the get_tick() function, which captures price updates as they occur:
export get_tick(series float source = close, series float na_replace = na)=>
varip float price = na
varip int series_index = -1
varip int old_time = 0
varip int new_time = na
varip float time_delta = 0
// ...
This function:
Samples the current price
Calculates time elapsed since last update
Maintains a sequential index to track updates
The resulting TickData structure serves as the fundamental building block for all candle generation.
State Management Architecture
The library employs a sophisticated state management system using varip variables, which persist across executions within the same bar. This creates a hybrid programming paradigm that's different from standard Pine Script's bar-by-bar model.
For chart-time candles, the core state transition logic is:
// Real-time update of current candle
candle_data := Candle.new(Open, High, Low, Close, polarity, series_index, candle_color)
candles.set(0, candle_data)
// When a new bar starts, preserve the previous candle
if clear_state
candles.insert(1, candle_data)
price.clear()
// Reset state for new candle
Open := Close
price.push(Open)
series_index += 1
This pattern of updating index 0 in real-time while inserting completed candles at index 1 creates an elegant solution for maintaining both current state and historical data.
Custom Timeframe Implementation
The custom timeframe system manages its own time boundaries independent of chart bars:
bool clear_state = switch settings.sample_type
SampleType.Ticks => cumulative_series_idx >= settings.number_of_ticks
SampleType.Time => cumulative_time_delta >= settings.number_of_seconds
This dual-clock system synchronizes two time domains:
Pine's execution clock (bar-by-bar processing)
The custom timeframe clock (tick or time-based)
The library carefully handles temporal discontinuities, ensuring candle formation remains accurate despite irregular tick arrival or market gaps.
Advanced Usage Techniques
1. Creating Custom Indicators with Real-Time Candles
To develop indicators that process real-time data within the current bar:
// Get real-time candles for your data
Candle rsi_candles = candle_array(ta.rsi(close, 14))
// Calculate indicator values based on candle properties
float signal = ta.ema(rsi_candles.first().source(Source.Close), 9)
// Detect patterns that occur within the bar
bool divergence = close > close and rsi_candles.first().Close < rsi_candles.get(1).Close
2. Working with Custom Timeframes and Plotting
For maximum flexibility when visualizing custom timeframe data:
// Create custom timeframe candles
CandleCTF volume_candles = ctf_candles_array(
source = volume,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 60
)
// Convert specific candle properties to float arrays
float volume_closes = volume_candles.candle_ctf_to_float(Source.Close)
// Calculate derived values
float volume_ema = volume_candles.ctf_ema(14)
// Create custom visualization
volume_candles.draw_ctf_candles_time()
volume_ema.draw_ctf_line_time(line_color = color.orange)
3. Creating Hybrid Timeframe Analysis
One powerful application is comparing indicators across multiple timeframes:
// Standard chart timeframe RSI
float chart_rsi = ta.rsi(close, 14)
// Custom 5-second timeframe RSI
CandleCTF ctf_candles = ctf_candles_array(
source = close,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 5
)
float fast_rsi_array = ctf_candles.candle_ctf_to_float(Source.Close)
float fast_rsi = fast_rsi_array.first()
// Generate signals based on divergence between timeframes
bool entry_signal = chart_rsi < 30 and fast_rsi > fast_rsi_array.get(1)
Final Notes
This library represents an advanced implementation of real-time data processing within Pine Script's constraints. By creating a reactive programming framework for handling continuous data streams, it enables sophisticated analysis typically only available in dedicated trading platforms.
The design principles employed—including state management, temporal processing, and object-oriented architecture—can serve as patterns for other advanced Pine Script development beyond this specific application.
------------------------
Library "real_time_candles"
A comprehensive library for creating real-time candles with customizable timeframes and sampling methods.
Supports both chart-time and custom-time candles with options for candlestick and Heikin-Ashi visualization.
Allows for tick-based or time-based sampling with moving average overlay capabilities.
get_tick(source, na_replace)
Captures the current price as a tick data point
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
na_replace (float) : Optional - Value to use when source is na
Returns: TickData structure containing price, time since last update, and sequential index
candle_array(source, candle_type, sync_start, bullish_color, bearish_color)
Creates an array of candles based on price updates
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
candle_type (simple CandleType) : Optional - Type of candle chart to create (candlestick or Heikin-Ashi)
sync_start (simple bool) : Optional - Whether to synchronize with the start of a new bar
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: Array of Candle objects ordered with most recent at index 0
candle_series(source, candle_type, wait_for_sync, bullish_color, bearish_color)
Provides a single candle based on the latest price data
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
candle_type (simple CandleType) : Optional - Type of candle chart to create (candlestick or Heikin-Ashi)
wait_for_sync (simple bool) : Optional - Whether to wait for a new bar before starting
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: A single Candle object representing the current state
candle_tuple(source, candle_type, wait_for_sync, bullish_color, bearish_color)
Provides candle data as a tuple of OHLC values
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
candle_type (simple CandleType) : Optional - Type of candle chart to create (candlestick or Heikin-Ashi)
wait_for_sync (simple bool) : Optional - Whether to wait for a new bar before starting
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: Tuple representing current candle values
method source(self, source, na_replace)
Extracts a specific price component from a Candle
Namespace types: Candle
Parameters:
self (Candle)
source (series Source) : Type of price data to extract (Open, High, Low, Close, or composite values)
na_replace (float) : Optional - Value to use when source value is na
Returns: The requested price value from the candle
method source(self, source)
Extracts a specific price component from a CandleCTF
Namespace types: CandleCTF
Parameters:
self (CandleCTF)
source (simple Source) : Type of price data to extract (Open, High, Low, Close, or composite values)
Returns: The requested price value from the candle as a varip
method candle_ctf_to_float(self, source)
Converts a specific price component from each CandleCTF to a float array
Namespace types: array
Parameters:
self (array)
source (simple Source) : Optional - Type of price data to extract (defaults to Close)
Returns: Array of float values extracted from the candles, ordered with most recent at index 0
method ctf_ema(self, ema_period)
Calculates an Exponential Moving Average for a CandleCTF array
Namespace types: array
Parameters:
self (array)
ema_period (simple float) : Period for the EMA calculation
Returns: Array of float values representing the EMA of the candle data, ordered with most recent at index 0
method draw_ctf_candles_time(self, sample_type, number_of_ticks, number_of_seconds, timezone)
Renders custom timeframe candles using bar time coordinates
Namespace types: array
Parameters:
self (array)
sample_type (simple SampleType) : Optional - Method for sampling data (Time or Ticks), used for tooltips
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks), used for tooltips
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time), used for tooltips
timezone (simple int) : Optional - Timezone offset from UTC (-12 to +12), used for tooltips
Returns: void - Renders candles on the chart using time-based x-coordinates
method draw_ctf_candles_index(self, sample_type, number_of_ticks, number_of_seconds, timezone)
Renders custom timeframe candles using bar index coordinates
Namespace types: array
Parameters:
self (array)
sample_type (simple SampleType) : Optional - Method for sampling data (Time or Ticks), used for tooltips
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks), used for tooltips
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time), used for tooltips
timezone (simple int) : Optional - Timezone offset from UTC (-12 to +12), used for tooltips
Returns: void - Renders candles on the chart using index-based x-coordinates
method draw_ctf_line_time(self, source, line_size, line_color)
Renders a line representing a price component from the candles using time coordinates
Namespace types: array
Parameters:
self (array)
source (simple Source) : Optional - Type of price data to extract (defaults to Close)
line_size (simple int) : Optional - Width of the line
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using time-based x-coordinates
method draw_ctf_line_time(self, line_size, line_color)
Renders a line from a varip float array using time coordinates
Namespace types: array
Parameters:
self (array)
line_size (simple int) : Optional - Width of the line, defaults to 2
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using time-based x-coordinates
method draw_ctf_line_index(self, source, line_size, line_color)
Renders a line representing a price component from the candles using index coordinates
Namespace types: array
Parameters:
self (array)
source (simple Source) : Optional - Type of price data to extract (defaults to Close)
line_size (simple int) : Optional - Width of the line
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using index-based x-coordinates
method draw_ctf_line_index(self, line_size, line_color)
Renders a line from a varip float array using index coordinates
Namespace types: array
Parameters:
self (array)
line_size (simple int) : Optional - Width of the line, defaults to 2
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using index-based x-coordinates
plot_ctf_tick_candles(source, candle_type, number_of_ticks, timezone, tied_open, ema_period, bullish_color, bearish_color, line_width, ema_color, use_time_indexing)
Plots tick-based candles with moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_ticks (simple int) : Number of ticks per candle
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
ema_period (simple float) : Period for the exponential moving average
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
line_width (simple int) : Optional - Width of the moving average line, defaults to 2
ema_color (color) : Optional - Color of the moving average line
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart with EMA overlay
plot_ctf_tick_candles(source, candle_type, number_of_ticks, timezone, tied_open, bullish_color, bearish_color, use_time_indexing)
Plots tick-based candles without moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_ticks (simple int) : Number of ticks per candle
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart without moving average
plot_ctf_time_candles(source, candle_type, number_of_seconds, timezone, tied_open, ema_period, bullish_color, bearish_color, line_width, ema_color, use_time_indexing)
Plots time-based candles with moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_seconds (simple float) : Time duration per candle in seconds
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
ema_period (simple float) : Period for the exponential moving average
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
line_width (simple int) : Optional - Width of the moving average line, defaults to 2
ema_color (color) : Optional - Color of the moving average line
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart with EMA overlay
plot_ctf_time_candles(source, candle_type, number_of_seconds, timezone, tied_open, bullish_color, bearish_color, use_time_indexing)
Plots time-based candles without moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_seconds (simple float) : Time duration per candle in seconds
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart without moving average
plot_ctf_candles(source, candle_type, sample_type, number_of_ticks, number_of_seconds, timezone, tied_open, ema_period, bullish_color, bearish_color, enable_ema, line_width, ema_color, use_time_indexing)
Unified function for plotting candles with comprehensive options
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Optional - Type of candle chart to display
sample_type (simple SampleType) : Optional - Method for sampling data (Time or Ticks)
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks)
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time)
timezone (simple int) : Optional - Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Optional - Whether to tie open price to close of previous candle
ema_period (simple float) : Optional - Period for the exponential moving average
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
enable_ema (bool) : Optional - Whether to display the EMA overlay
line_width (simple int) : Optional - Width of the moving average line, defaults to 2
ema_color (color) : Optional - Color of the moving average line
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart with optional EMA overlay
ctf_candles_array(source, candle_type, sample_type, number_of_ticks, number_of_seconds, tied_open, bullish_color, bearish_color)
Creates an array of custom timeframe candles without rendering them
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to create (candlestick or Heikin-Ashi)
sample_type (simple SampleType) : Method for sampling data (Time or Ticks)
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks)
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time)
tied_open (simple bool) : Optional - Whether to tie open price to close of previous candle
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: Array of CandleCTF objects ordered with most recent at index 0
Candle
Structure representing a complete candle with price data and display properties
Fields:
Open (series float) : Opening price of the candle
High (series float) : Highest price of the candle
Low (series float) : Lowest price of the candle
Close (series float) : Closing price of the candle
polarity (series bool) : Boolean indicating if candle is bullish (true) or bearish (false)
series_index (series int) : Sequential index identifying the candle in the series
candle_color (series color) : Color to use when rendering the candle
ready (series bool) : Boolean indicating if candle data is valid and ready for use
TickData
Structure for storing individual price updates
Fields:
price (series float) : The price value at this tick
time_delta (series float) : Time elapsed since the previous tick in milliseconds
series_index (series int) : Sequential index identifying this tick
CandleCTF
Structure representing a custom timeframe candle with additional time metadata
Fields:
Open (series float) : Opening price of the candle
High (series float) : Highest price of the candle
Low (series float) : Lowest price of the candle
Close (series float) : Closing price of the candle
polarity (series bool) : Boolean indicating if candle is bullish (true) or bearish (false)
series_index (series int) : Sequential index identifying the candle in the series
open_time (series int) : Timestamp marking when the candle was opened (in Unix time)
time_delta (series float) : Duration of the candle in milliseconds
candle_color (series color) : Color to use when rendering the candle ספרייה

אינדיקטור

iteratorThe "Iterator" library is designed to provide a flexible way to work with sequences of values. This library offers a set of functions to create and manage iterators for various data types, including integers, floats, and more. Whether you need to generate an array of values with specific increments or iterate over elements in reverse order, this library has you covered.
Key Features:
Array Creation: Easily generate arrays of integers or floats with customizable steps, both inclusive and exclusive of the end values.
Flexible Iteration: Includes methods to iterate over arrays of different types, such as booleans, integers, floats, strings, colors, and drawing objects like lines and labels.
Reverse Iteration: Support for reverse iteration, giving you control over the order in which elements are processed.
Automatic Loop Control: One of the key advantages of this library is that when using the .iterate() method, it only loops over the array when there are values present. This means you don’t have to manually check if the array is populated before iterating, simplifying your code and reducing potential errors.
Versatile Use Cases: Ideal for scenarios where you need to loop over an array without worrying about empty arrays or checking conditions manually.
This library is particularly useful in cases where you need to perform operations on each element in an array, ensuring that your loops are efficient and free from unnecessary checks.
Library "iterator"
The "iterator" library provides a versatile and efficient set of functions for creating and managing iterators.
It allows you to generate arrays of integers or floats with customizable steps, both inclusive and exclusive of the end values.
The library also includes methods for iterating over various types, including booleans, integers, floats, strings, colors,
and drawing objects like lines and labels. With support for reverse iteration and flexible customization options.
iterator(stop, start, step)
Creates an array of integers from start to stop with a specified step, excluding the stop value.
Parameters:
stop (int) : The end value of the iterator, exclusive.
start (int) : The starting value of the iterator. Default is 0.
step (int) : The increment value for each step in the iterator. Default is 1. Must be greater than 0.
Returns: An array of integers incremented by the step value from start to stop. Will return and empty array if start = stop.
iterator(stop, start, step)
Creates an array of floats from start to stop with a specified step, excluding the stop value.
Parameters:
stop (float) : The end value of the iterator, exclusive.
start (float) : The starting value of the iterator. Default is 0.
step (float) : The increment value for each step in the iterator. Default is 1. Must be greater than 0.
Returns: An array of floats incremented by the step value from start to stop. Will return and empty array if start = stop.
iterator_inclusive(stop, start, step)
Creates an array of integers from start to stop with a specified step, including the stop value.
Parameters:
stop (int) : The end value of the iterator, inclusive.
start (int) : The starting value of the iterator. Default is 0.
step (int) : The increment value for each step in the iterator. Default is 1. Must be greater than 0.
Returns: An array of integers incremented by the step value from start to stop, including the stop value.
iterator_inclusive(stop, start, step)
Creates an array of floats from start to stop with a specified step, including the stop value.
Parameters:
stop (float) : The end value of the iterator, inclusive.
start (float) : The starting value of the iterator. Default is 0.
step (float) : The increment value for each step in the iterator. Default is 1. Must be greater than 0.
Returns: An array of floats incremented by the step value from start to stop, including the stop value.
itr(stop, start, step)
Creates an array of integers from start to stop with a specified step, excluding the stop value.
Parameters:
stop (int) : The end value of the iterator, exclusive.
start (int) : The starting value of the iterator. Default is 0.
step (int) : The increment value for each step in the iterator. Default is 1. Must be greater than 0.
Returns: An array of integers incremented by the step value from start to stop.
itr(stop, start, step)
Creates an array of floats from start to stop with a specified step, excluding the stop value.
Parameters:
stop (float) : The end value of the iterator, exclusive.
start (float) : The starting value of the iterator. Default is 0.
step (float) : The increment value for each step in the iterator. Default is 1. Must be greater than 0.
Returns: An array of floats incremented by the step value from start to stop.
itr_in(stop, start, step)
Creates an array of integers from start to stop with a specified step, including the stop value.
Parameters:
stop (int) : The end value of the iterator, inclusive.
start (int) : The starting value of the iterator. Default is 0.
step (int) : The increment value for each step in the iterator. Default is 1. Must be greater than 0.
Returns: An array of integers incremented by the step value from start to stop, including the stop value.
itr_in(stop, start, step)
Creates an array of floats from start to stop with a specified step, including the stop value.
Parameters:
stop (float) : The end value of the iterator, inclusive.
start (float) : The starting value of the iterator. Default is 0.
step (float) : The increment value for each step in the iterator. Default is 1. Must be greater than 0.
Returns: An array of floats incremented by the step value from start to stop, including the stop value.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified.
method iterate(self, reverse)
Creates an iterator array for the indices of ana array, with an option to reverse the order.
Namespace types: array
Parameters:
self (array) : The array to iterate over.
reverse (bool) : A boolean flag indicating whether to reverse the iterator order. Default is false.
Returns: An array of integers representing the indices of the array. The order can be reversed if specified. ספרייה

אינדיקטור
