PROTECTED SOURCE SCRIPT
מעודכן

HEKO-Acumulación/Distribución/Objetivo

392
HEKO — Accumulation / Distribution / Targets + Pi-Cycle is an all-in-one indicator designed for anyone who wants to spot smart-buy zones (accumulation) and smart-sell zones (distribution), filter them with simple rules, and turn them into quantified targets (blue triangle)—all without prior knowledge.

What it does, in 4 points

Detects candles with buying traits (high volume, high close, positive CMF, non-extreme RSI) and selling traits (upper rejection, low close, negative CMF, high RSI).

Filters signals to show them only when price is below all the 200s (green) or above all the 200s (red), reducing “noise” in the middle zones.

Generates automatic targets from the day’s high of the green signal (visible point), and confirms with a blue triangle when that target is reached.

Logs and numbers each green-point ↔ blue-triangle pair, adds a target average, simulates an educational assessment, and optionally marks tops with Pi-Cycle.

Recommended workflow

Turn on the moving averages (MA1…MA5) and the 200-channel filter (recommended).

Adjust sensitivity: volume (multipliers), closePct (80–90%), wickFrac (35–50%), RSI Low/High if you want to filter extremes.

Watch for green signals below the 200 channel. When one appears, the system sets a target (= day’s high × (1 + %)).

Wait for the blue triangle. When it touches the target you’ll see it on price and, if you want, in the panel as well.

You can number each green-blue pair for tracking.

Use Pi-Cycle as a macro top alert (especially in BTC/crypto or, with stock mode, in equities).

Check the TG average and, if useful, the assessment (simulation) to feed back into your parameters.

Key options and why they matter

200 channel (4h and 1D): separates “cheap zones” (green) from “expensive zones” (red).

CMF and volume: quantify whether buying/selling shows real commitment.

Close within the candle: avoids “indifferent” candles and favors decisive ones.

Targets from the daily high: reduces “close” bias and gives realistic room for the chosen %.

Point-triangle pairing: traceability. You know which target comes from which signal.

Pi-Cycle: cycle warning that helps you avoid “falling in love with tops.”

Best practices

Start conservative (default parameters).

Adjust mult and closePct if you see too many or too few signals.

In very volatile assets, raise wickFrac and multDist for reds.

Review the TG average per asset: it guides you on whether your target % is ambitious or too low.

Remember: this is not a complete strategy; it’s a reading and targeting tool. Use it with risk management and your own plan.

Limits and reminders

No indicator eliminates false positives. Filters only reduce noise.

Targets are triggered by the candle’s high. A spike can hit the % instantly.

Pi-Cycle isn’t magic. It’s a historically sensible pattern—useful as an alert, not as dogma.

הערות שחרור
HEKO – Accumulation / Distribution / Targets / RSI (with Pi-Cycle Tops & Valuation)
Complete Market-Cycle Detection Tool

This script combines technical, volume-flow, momentum and cycle-based signals into a single unified framework designed to detect accumulation phases, distribution events, trend strength, price targets, and overbought/oversold episodes directly on the chart.
It also includes optional fundamental valuation bands, Pi-Cycle Top detection, and a detailed trade-simulation HUD.

🔵 1. Accumulation Detection (Green Signals)

The indicator identifies high-confidence accumulation events using:

Volume expansion vs. SMA

Positive CMF (money flow pressure)

Candle closing in the upper range

Optional RSI filters

Optional ATR / Z-score filters

Optional MA-alignment (fast MA above slow MA)

Optional condition: price must be below all 200-period moving averages (4h & 1D)

These events can generate price targets (+X%) and matching triangle markers.

🔴 2. Distribution Detection (Red Signals)

Distribution is detected using:

High volume vs. reference average

Upper-wick rejection or weak close

Negative CMF

Optional RSI high filter

Optional ATR / body-size filters

Optional MA-alignment

Optional condition: price must be above all 200-period moving averages

Distribution marks potential exhaustion zones and can also interact with Pi-Cycle logic.

📌 3. Target System (TG1 / TG2 / TG3)

When a Pi-Cycle distribution event triggers, the script calculates three targets automatically:

TG1 — EMA200 (4h)

TG2 — 50% retracement between peak and prior swing low

TG3 — Previous range high

Each target is drawn once and automatically removed when price closes below the level.

⚠️ 4. RSI in Price (Overbought / Oversold Episodes)

Instead of showing a separate RSI panel, the indicator plots OB/OS directly on price:

Arrows or horizontal segments

Continuous “episode ranges” during extended OB/OS phases

Optional labels (“OVERBOUGHT”, “OVERSOLD”)

Cooldown to avoid excessive signals

Optional filter requiring price to be outside 200-MA channel

🏷 5. Moving Averages (Highly Customizable)

Five independent MAs with:

Custom period

Custom timeframe

EMA/SMA type

Right-side labels with dynamic color

Optional band-fills between certain MAs

This makes it easy to follow major trend structure on any timeframe.

💰 6. Fundamental Valuation (Optional)

For stocks with available fundamentals, the script loads:

EPS (TTM)

Book Value per Share

Then computes:

Percentile-based valuation bands

“Cheap”, “Neutral”, “Expensive” states

p50 line

Highlighted “cheap zone” area on price

If fundamentals are unavailable, manual values can be entered.

📊 7. Evaluation HUD (Trade Simulation)

Optional HUD that:

Simulates a fixed-amount purchase on each accumulation signal

Sells half at the first target hit

Manages positions internally

Displays total invested amount and cumulative PnL

Integrated with the valuation HUD

🚨 8. Alerts

The script includes alerts for:

Accumulation events

Distribution events

TG target hits

RSI overbought/oversold signals

Pi-Cycle distribution start

🎯 9. Pi-Cycle Top Detection (BTC-style and 80/250 variant)

The script includes both classic and alternative Pi-Cycle calculations:

111 / 350 SMA (classic Bitcoin top model)

80 / 250 SMA (multi-asset friendly)

When triggered, the zone is highlighted and the TG system is activated.

✔️ Summary

This tool provides a complete market-cycle framework:

Where accumulation begins

Where distribution emerges

Where major tops form

How far price may retrace

Whether the asset is fundamentally cheap or expensive

How much profit a systematic strategy could generate

Designed for traders who want clarity, structure and high-signal information directly on their chart without extra panels.
הערות שחרור
This script combines several of my HEKO tools into a single multi-purpose framework for swing and position trading. It focuses on spotting meaningful accumulation/distribution, visualising risk/targets on price, and adding a lightweight fundamental “cheap/expensive” overlay when TradingView provides financial data.

Main features

5 configurable MAs on price

Up to five moving averages (EMA or SMA, any timeframe) with optional fills and auto-labels on the right of the chart.

Default set is oriented to 200-day / 200 4h / 55 4h trend structure.

Accumulation & Distribution engine (green/red dots)

Accumulation (green) requires: volume spike vs. its SMA (or Z-score), CMF > threshold, close near the high, bullish candle and optional “RSI not too high” filter.

Distribution (red) requires: strong volume, negative CMF, weak close and/or upper wick, plus optional “RSI high” filter.

Extra filters: ATR-based minimum range, minimum body size, fast/slow MA alignment, consecutive-bar confirmation and cooldown between signals.

Optional “200-channel filter”: show accumulation only when price is below the 200 EMAs/SMAs (4h & 1D) and distribution only when price is above them. If some 200 MAs don’t exist on a symbol, the filter uses only the ones that are available.

Price targets from accumulation (blue triangles)

Each confirmed accumulation day anchors a daily high and sets a percentage target (default +50%).

When price hits the target, a blue triangle is drawn on price and optionally at the bottom, with an ID that matches the original green point.

Evaluation HUD – simple backtest of “buy accum / sell on target or distribution”

Simulates buying a fixed € amount on each accumulation, selling half at the blue target and the rest on the next target or distribution.

Shows a compact HUD with “Invested” and “P&L” either in the top-right of the pane or floating above the last N candles.

Fundamental valuation overlay (P/E or P/BV percentiles)

When financial data is available, the script estimates a “cheap band” by computing rolling percentiles of P/E (TTM) or P/BV over the available history (up to 200 bars, minimum 40).

Converts those percentiles back to prices and shades a “cheap zone” band on the chart, plus an optional p50 line.

The HUD line “Para comprar ahora: muy barata / barata / neutral / cara / muy cara” is driven by where today’s ratio sits vs. those percentiles.

If there are not enough data points or no fundamental data for the symbol/exchange, the HUD shows “NA” instead of forcing a signal.

RSI episodes plotted directly on price (no RSI panel needed)

Detects RSI overbought/oversold crosses and draws arrows or continuous dotted ranges above/below price.

Optional horizontal segments on the price level of the signal.

Independent cooldown for OB/OS and an option to require price to be outside the 200-channel (only show OB above, OS below).

Pi-Cycle Top signals (111/350 and 80/250)

Classic 111/350 Pi-Cycle for BTC plus an alternative 80/250 variant that can be applied to any asset.

On trigger, plots a big “distribution” label, a dot on top and shades the next 5 bars as a potential blow-off region.

Distribution targets after Pi-Cycle tops

When a Pi-Cycle distribution fires, the script arms three downside targets:

TG1 = 4h EMA 200

TG2 = mid-point of the swing (from local peak to prior swing low)

TG3 = prior range high over a configurable lookback

Each target is drawn as a dashed horizontal line with a label and is removed once price closes below it, or if the whole episode is invalidated (e.g., price breaks above the peak by more than a chosen % or EMA 55 4h condition).

The script is intended for educational and discretionary use. It does not give financial advice and does not guarantee profits; it simply organises price/volume structure, RSI and basic valuation into a visual framework to support your own analysis and risk management.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.