OPEN-SOURCE SCRIPT
Niveles Long/Short x10 - Consumo posterior v2 (PEAO)

Overview
The script "Niveles Long/Short x10 - Consumo posterior v2 (PEAO)" is a TradingView indicator that plots up to 10 laddered entry levels for both Long and Short sides, detects when those levels are consumed by price, and updates their visual status after consumption. It’s designed for traders using scaled/pyramided entries and who need immediate visual feedback about which levels remain active and which have been hit.
Main inputs and parameters
- Number of levels: up to 10 configurable levels per side (Long / Short).
- Distances / offsets: pips, ticks, or percentage spacing between levels.
- Size / weight per level: optional parameter to assign size or weight to each level.
- Enable direction: toggles to enable Long and/or Short.
- Visual mode: colors for active, consumed, and invalidated levels.
- Alerts: toggles for per-level or per-side consumption alerts.
- Persistence / history: option to save consumption state between sessions if implemented.
Core logic and behavior
- Builds a set of target prices above and below a reference (entry price, current price, base level, or pivot).
- Monitors market price each bar and marks a level as “consumed” when price touches or crosses it (configurable: wick, body, or close criteria).
- After consumption the script can change the level color, hide it, move it to a consumed registry, or trigger follow-up actions (recalculate remaining levels, update remaining size, send alerts).
- Includes debounce/protection to avoid registering duplicate consumptions from intra-bar noise or the same candle.
Chart output and UI
- Horizontal lines or shaded zones for each level; color reflects state: active, consumed, or invalidated.
- Labels showing level number (1..10), state, price, and remaining size or percentage.
- Compact summary panel or legend: number of levels consumed per side, total consumed, and simulated open positions.
- Optional markers/flechas to indicate recent consumption events.
Alerts and notifications
- Configurable alerts per level: triggers when a level is consumed (supports webhook, popup, or email via TradingView alerts).
- Aggregated alerts supported (e.g., “3/10 Long levels consumed”).
- Option to require confirmation by candle close or to trigger on touch only.
Practical usage and workflow
- Set the reference base (entry or pivot) and tune distance/offset for your ladder strategy.
- Enable only the side you trade (Long or Short) to reduce visual noise.
- Backtest and paper‑trade to confirm consumption criteria (wick vs close).
- Configure critical alerts (level 1 hit; N levels consumed) for fast execution.
- Use the consumed-level record to manage partial stops and remaining position sizing.
Known limitations and risks
- Intrabar detection depends on timeframe: higher timeframes may miss micro-touches; lower timeframes can produce noise.
- Using candle close to validate consumption introduces delay versus wick touches.
- Persistence across sessions requires state storage; without it, consumption state resets on reload.
- Must be reviewed for compatibility with hedging modes and with spot vs derivatives order execution if integrated with automation.
The script "Niveles Long/Short x10 - Consumo posterior v2 (PEAO)" is a TradingView indicator that plots up to 10 laddered entry levels for both Long and Short sides, detects when those levels are consumed by price, and updates their visual status after consumption. It’s designed for traders using scaled/pyramided entries and who need immediate visual feedback about which levels remain active and which have been hit.
Main inputs and parameters
- Number of levels: up to 10 configurable levels per side (Long / Short).
- Distances / offsets: pips, ticks, or percentage spacing between levels.
- Size / weight per level: optional parameter to assign size or weight to each level.
- Enable direction: toggles to enable Long and/or Short.
- Visual mode: colors for active, consumed, and invalidated levels.
- Alerts: toggles for per-level or per-side consumption alerts.
- Persistence / history: option to save consumption state between sessions if implemented.
Core logic and behavior
- Builds a set of target prices above and below a reference (entry price, current price, base level, or pivot).
- Monitors market price each bar and marks a level as “consumed” when price touches or crosses it (configurable: wick, body, or close criteria).
- After consumption the script can change the level color, hide it, move it to a consumed registry, or trigger follow-up actions (recalculate remaining levels, update remaining size, send alerts).
- Includes debounce/protection to avoid registering duplicate consumptions from intra-bar noise or the same candle.
Chart output and UI
- Horizontal lines or shaded zones for each level; color reflects state: active, consumed, or invalidated.
- Labels showing level number (1..10), state, price, and remaining size or percentage.
- Compact summary panel or legend: number of levels consumed per side, total consumed, and simulated open positions.
- Optional markers/flechas to indicate recent consumption events.
Alerts and notifications
- Configurable alerts per level: triggers when a level is consumed (supports webhook, popup, or email via TradingView alerts).
- Aggregated alerts supported (e.g., “3/10 Long levels consumed”).
- Option to require confirmation by candle close or to trigger on touch only.
Practical usage and workflow
- Set the reference base (entry or pivot) and tune distance/offset for your ladder strategy.
- Enable only the side you trade (Long or Short) to reduce visual noise.
- Backtest and paper‑trade to confirm consumption criteria (wick vs close).
- Configure critical alerts (level 1 hit; N levels consumed) for fast execution.
- Use the consumed-level record to manage partial stops and remaining position sizing.
Known limitations and risks
- Intrabar detection depends on timeframe: higher timeframes may miss micro-touches; lower timeframes can produce noise.
- Using candle close to validate consumption introduces delay versus wick touches.
- Persistence across sessions requires state storage; without it, consumption state resets on reload.
- Must be reviewed for compatibility with hedging modes and with spot vs derivatives order execution if integrated with automation.
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Pablo Oviedo Choco-Cap
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
开源脚本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Pablo Oviedo Choco-Cap
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.