Strong Liquidity Outlook | ProjectSyndicateStrong Liquidity Outlook tracks the two opposed states of liquidity — the voids price must fill and the order shelves price must sweep — scores them on a single 0–10 scale, merges them where they agree, and projects a forward route through them. Every number on the panel is measured, not invented.
🟥🟩 IMPORTANT INFO: Because zone height, reach and distance are all ATR-derived, the engine self-calibrates to each symbol. Start on M5–H1. On daily charts raise Min Gap Size (%), as intraday voids become noise.
🧲 Two Draw Engines, One Scoreboard — the core of this tool. Most level tools track one thing. This one tracks the two opposed states of liquidity and forces them to compete on the same 0–10 scale. Imbalance zones are the voids — bar-to-bar gaps where no trade occurred, an absence price is drawn back to fill. Stop-pool zones are the opposite — dense shelves of resting orders sitting above swing highs and below swing lows, ATR-sized and volume-weighted. A gap is a vacuum; a pool is a wall. Both pull price, for opposite reasons, and until now you had to run two indicators to see them together.
🎯 Confluence Merging — where the real levels come from. Overlapping same-side zones do not stack into visual mush. They fuse. When a gap opens into the same pocket a stop pool already occupies, the two merge into one confluence zone, their volume mass adds, their scores compound, and the zone is tagged ×2 or ×3 on the chart. The levels that survive this merge are the ones two independent mechanisms agree on — and they rise to the top of the ranked panel automatically. No manual confluence hunting.
⭐ 0–10 Zone Strength Score. Every zone is graded on a transparent weighted blend of five factors: volume pressure at formation, zone size relative to ATR, number of tests it has survived, confluence depth, and proximity to current price. Optional idle decay bleeds a zone's score toward a floor while price ignores it, so a stale level cannot masquerade as a live one. Strong zones render sharp and opaque; weak ones fade. Every weight is exposed in settings.
♻️ Live Zone Lifecycle — INTACT → CONSUMED % → FILLED / SWEPT. A zone above price is eaten from its floor upward. A zone below price is eaten from its ceiling down. The script renders that literally: the bright remainder is the unworked part of the void, the dimmed slice behind it is what price has already consumed, and the label reports the exact percentage. When price closes fully through, an imbalance is marked FILLED and a pool is marked SWEPT. Every fresh re-entry — not just the first — counts as a new test and feeds the score.
🗺️ Scenario Builder — the powerful new part. This is not a hand-drawn arrow. The script walks your live zone map forward from the last bar and assembles a route from surveyed levels:
1 · TRIGGER — the nearest qualifying zone in the trigger direction. Price runs the stops first.
2 · REVERSE — a retrace of that leg. If a real zone sits within your ATR tolerance of that level, the waypoint snaps onto it and is flagged ⚑.
3 · RETEST — a partial recovery that deliberately fails short of the trigger extreme.
4 · TARGET — the strongest-scoring zone on the far side of price. Not the flashiest, not the furthest. The highest-graded one.
5 · EXTENSION — the next zone beyond target, if one exists.
Trigger direction defaults to Auto, taken from the live net-pull bias. Bars-per-leg are allocated proportionally to price travel, so steep legs stay steep and the path never looks synthetic.
🧮 Honest Path Confidence (0–100), never a fake "chance". Here is the rule the entire script is built on: if a leg is not anchored to a real, scored zone, it is drawn hollow and labelled as projected. If no zone exists on the far side, the target falls back to a measured move — and it says so, the vertex is drawn unfilled, and the confidence meter is cut. An unsnapped reverse waypoint is dimmed. Path Confidence is the mean of the trigger and target zone scores, penalized for anything unanchored. It is labelled confidence in the levels, not probability of the path. You will never see an invented "87% chance price reaches this target." The path is level geometry rendered forward. It re-solves every tick as zones score up, decay, or get swept — a current-state projection, not a committed forecast.
📊 Five-Slide Dashboard — every figure measured. A compact panel that auto-rotates (or pins to one slide) with ●○○○○ position pips.
OVERVIEW — regime, live zone counts by side, elite count, a tug-of-war net-pull meter, and the nearest zone above and below with strength bars and real distance.
TOP ZONES — the eight highest-scored live zones, ranked, each with type icon, confluence multiplier, price, and a score meter.
STATISTICS — this is the part nobody else ships. Gap fill rate, pool sweep rate, average bars to resolution, and post-resolution reaction rate, each with its own meter and its raw hits / total count exposed beside it.
PRESSURE — zone mass by side, estimated volume split, net delta above and below, and how many zones are partially eaten.
SCENARIO — the full waypoint list with prices, move-to-target in % and ATR, an approximate R multiple, the confidence meter, and an explicit anchoring readout.
📐 Statistics That Cannot Lie To You. Every zone ever detected stays in the denominator. Retiring a stale zone from the chart never removes it from the fill-rate sample. The reaction test — did price travel back n × ATR within n bars after a fill or sweep? — scores each resolution exactly once, hit or miss, and both numbers are shown. Samples under 20 events are flagged THIN — read with care rather than dressed up as a rate. Volume and delta figures are derived from bar geometry, not tick data, and the panel states that on its own row.
🔬 Non-Repainting By Construction. Gaps are read off closed bars only. Pivot-confirmed pools lag by your Pivot Right setting — that is confirmation lag, not repainting, and nothing is ever redrawn backwards once a zone is placed. All state mutations happen on bar close.
🎨 Clean Themed Visuals. Dashed borders on imbalance zones, solid on stop pools, so you read the type at a glance. Midlines on elite zones. Nearest-zone rails extending to current price. The scenario path renders as a three-pass polyline — two soft glow layers under a crisp core — with diamond waypoint markers, a terminal arrowhead, and dotted trigger/target rails.
🔔 Built-In Alerts. New imbalance zone, new stop-pool zone, zone tested, imbalance filled, stop pool swept, elite zone approach, and scenario trigger reached — each firing on bar close, formatted for manual or automated use.
🔧 Fully Customizable. Both detectors toggle independently. Gap size floors in both % and ATR. Pivot sensitivity, pool height and offset. All five score weights, decay rate and floor. Merge threshold, stale-zone retirement, reaction window and size. The complete scenario filter set — path detail, trigger direction, waypoint score floor, projection length, retrace and retest ratios, snap tolerance. Plus every colour, label, meter and panel option.
🎯 Why this is different. Most liquidity tools show you one kind of level and attach a fabricated probability to it. This one tracks both kinds — the voids and the walls — scores them on one honest scale, merges them where they agree, then projects a route through them and tells you which parts of that route are real. Then it grades its own zones against history and shows you the fill rate, the sweep rate, and the reaction rate, with the raw counts, including when the sample is too thin to trust.
🧭 How to trade it. Read the panel before the chart. The net-pull meter tells you which side the field is leaning. The TOP ZONES slide tells you which levels have actually earned attention. Treat the scenario trigger as where liquidity gets taken and the target as the logical objective — and check the anchoring row first. A solid, snapped path into a high-scored target is a clean roadmap. A hollow TARGET (projected) vertex means the market has no graded level behind that move, and you should size accordingly. Cross-check the STATISTICS slide for your symbol: if gaps on your instrument fill 38% of the time, trade them like a 38% event.
⚠️ Important. This is a decision-support tool, not a standalone buy/sell system, and it makes no performance guarantees. Everything it displays is descriptive of current zone strength, real distance, and measured historical behaviour. Path Confidence is a read on the quality of the levels involved, not a forecast of price. Volume-pressure figures are geometric estimates, not tick data. Historical rates describe what has happened on the loaded chart and do not predict what will happen next; thin samples are flagged for exactly that reason. Behaviour varies by symbol, timeframe, and configuration. Always combine it with your own analysis and risk management, and test it on your market before trading it live. مؤشر

StocksDeveloperAlertsLibrary "StocksDeveloperAlerts"
AutoTrader Web alert builder by Stocks Developer — turn TradingView alerts into real broker orders across many accounts and brokers. Ready-made functions for single orders, options the easy way, 8 option structures (straddle/strangle/spreads/iron condor/iron fly), custom multi-leg, account or group targeting, and your own risk limits. No alert-text typing. stocksdeveloper.in
order(symbol, exchange, producttype, tradetype, account, group, lots, quantity, ordertype, price, triggerprice, validity, amo, optiontype, strike, expiry, spothint, usespot, onslicefailure, risk, extra)
Build an alert message for a single order (stock, futures or one option leg). This is the full builder; equity() and option() are shorter wrappers over it. Set exactly one of account/group and exactly one of lots/quantity. Add optiontype to make it an option order.
Parameters:
symbol (string) : (series string) Broker-independent symbol, e.g. "NIFTY", "BANKNIFTY", "SBIN". For options, pass the underlier (e.g. "NIFTY"), not a full contract.
exchange (string) : (series string) Exchange code, e.g. "NSE"/"BSE" for stocks, "NFO" for options and futures.
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
tradetype (string) : (series string) BUY or SELL.
account (string) : (series string) Place in this single account. Set this OR group.
group (string) : (series string) Place in every live account in this group. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
ordertype (string) : (series string) MARKET (default), LIMIT, STOP_LOSS or SL_MARKET.
price (float) : (series float) Limit price (required for LIMIT).
triggerprice (float) : (series float) Trigger price (for stop-loss orders).
validity (string) : (series string) DAY (default) or IOC.
amo (bool) : (series bool) true for an after-market order.
optiontype (string) : (series string) CE for a call, PE for a put. Adding this makes it an option order.
strike (string) : (series string) ATM (default), ATM+1 / ATM-2, OTM / OTM2, ITM / ITM2, or an exact strike like "24500". Requires optiontype.
expiry (string) : (series string) weekly (default), next, monthly, or an exact date like "10-JUL-2026". Requires optiontype.
spothint (string) : (series string) Advanced: a spot price to help option-strike selection.
usespot (bool) : (series bool) Advanced: use the spot hint for strike selection.
onslicefailure (string) : (series string) Advanced: continue (default), alert or retry, if a large order that was auto-split has a slice fail.
risk (string) : (series string) A risk block from risk() — for example risk=atw.risk(maxloss=5000).
extra (string) : (series string) Advanced: any extra "key=value" lines to pass through unchanged (one per line).
Returns: (series string) The ready-to-send alert message.
equity(symbol, exchange, producttype, tradetype, account, group, lots, quantity, ordertype, price, triggerprice, validity, amo, risk, extra)
Build an alert for a single stock or futures order (no option fields). Set exactly one of account/group and exactly one of lots/quantity.
Parameters:
symbol (string) : (series string) Broker-independent symbol, e.g. "SBIN".
exchange (string) : (series string) Exchange code, e.g. "NSE" or "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
tradetype (string) : (series string) BUY or SELL.
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
ordertype (string) : (series string) MARKET (default), LIMIT, STOP_LOSS or SL_MARKET.
price (float) : (series float) Limit price (required for LIMIT).
triggerprice (float) : (series float) Trigger price (for stop-loss orders).
validity (string) : (series string) DAY (default) or IOC.
amo (bool) : (series bool) true for an after-market order.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
option(symbol, exchange, producttype, tradetype, optiontype, strike, expiry, account, group, lots, quantity, ordertype, price, triggerprice, validity, amo, spothint, usespot, risk, extra)
Build an option order the easy way — give the underlier and pick the strike + expiry; no need to type the full option symbol. Set exactly one of account/group and exactly one of lots/quantity.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY", "BANKNIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
tradetype (string) : (series string) BUY or SELL.
optiontype (string) : (series string) CE for a call, PE for a put.
strike (string) : (series string) ATM (default), ATM+1 / ATM-2, OTM / OTM2, ITM / ITM2, or an exact strike like "24500".
expiry (string) : (series string) weekly (default), next, monthly, or an exact date like "10-JUL-2026".
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
ordertype (string) : (series string) MARKET (default), LIMIT, STOP_LOSS or SL_MARKET.
price (float) : (series float) Limit price (required for LIMIT).
triggerprice (float) : (series float) Trigger price (for stop-loss orders).
validity (string) : (series string) DAY (default) or IOC.
amo (bool) : (series bool) true for an after-market order.
spothint (string) : (series string) Advanced: a spot price to help strike selection.
usespot (bool) : (series bool) Advanced: use the spot hint for strike selection.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
straddle(symbol, exchange, producttype, account, group, lots, quantity, expiry, direction, ordertype, price, onlegfailure, risk, extra)
Straddle — buy (or sell) a call and a put at the money. direction "BUY" = long straddle, "SELL" = short straddle.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
expiry (string) : (series string) weekly (default), next, monthly, or an exact date.
direction (string) : (series string) BUY (default) builds the structure as named; SELL flips every leg.
ordertype (string) : (series string) MARKET (default) or LIMIT.
price (float) : (series float) Limit price (required for LIMIT).
onlegfailure (string) : (series string) alert (default), cancel or continue, if one leg cannot be placed.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
strangle(symbol, exchange, producttype, account, group, lots, quantity, width, expiry, direction, ordertype, price, onlegfailure, risk, extra)
Strangle — buy (or sell) an out-of-the-money call and put, each 'width' strikes out. direction "BUY" = long strangle, "SELL" = short strangle.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
width (int) : (series int) How far out of the money the legs sit, in strike steps (default 2).
expiry (string) : (series string) weekly (default), next, monthly, or an exact date.
direction (string) : (series string) BUY (default) or SELL (flips every leg).
ordertype (string) : (series string) MARKET (default) or LIMIT.
price (float) : (series float) Limit price (required for LIMIT).
onlegfailure (string) : (series string) alert (default), cancel or continue.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
bullCall(symbol, exchange, producttype, account, group, lots, quantity, width, expiry, direction, ordertype, price, onlegfailure, risk, extra)
Bull call spread — buy a call at the money and sell a call 'width' strikes out. Use direction "SELL" to reverse.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
width (int) : (series int) Distance between the two strikes, in strike steps (default 2).
expiry (string) : (series string) weekly (default), next, monthly, or an exact date.
direction (string) : (series string) BUY (default) or SELL (flips every leg).
ordertype (string) : (series string) MARKET (default) or LIMIT.
price (float) : (series float) Limit price (required for LIMIT).
onlegfailure (string) : (series string) alert (default), cancel or continue.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
bearPut(symbol, exchange, producttype, account, group, lots, quantity, width, expiry, direction, ordertype, price, onlegfailure, risk, extra)
Bear put spread — buy a put at the money and sell a put 'width' strikes out. Use direction "SELL" to reverse.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
width (int) : (series int) Distance between the two strikes, in strike steps (default 2).
expiry (string) : (series string) weekly (default), next, monthly, or an exact date.
direction (string) : (series string) BUY (default) or SELL (flips every leg).
ordertype (string) : (series string) MARKET (default) or LIMIT.
price (float) : (series float) Limit price (required for LIMIT).
onlegfailure (string) : (series string) alert (default), cancel or continue.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
bullPut(symbol, exchange, producttype, account, group, lots, quantity, width, expiry, direction, ordertype, price, onlegfailure, risk, extra)
Bull put spread (credit) — sell a put at the money and buy a put 'width' strikes out. Use direction "SELL" to reverse.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
width (int) : (series int) Distance between the two strikes, in strike steps (default 2).
expiry (string) : (series string) weekly (default), next, monthly, or an exact date.
direction (string) : (series string) BUY (default) or SELL (flips every leg).
ordertype (string) : (series string) MARKET (default) or LIMIT.
price (float) : (series float) Limit price (required for LIMIT).
onlegfailure (string) : (series string) alert (default), cancel or continue.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
bearCall(symbol, exchange, producttype, account, group, lots, quantity, width, expiry, direction, ordertype, price, onlegfailure, risk, extra)
Bear call spread (credit) — sell a call at the money and buy a call 'width' strikes out. Use direction "SELL" to reverse.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
width (int) : (series int) Distance between the two strikes, in strike steps (default 2).
expiry (string) : (series string) weekly (default), next, monthly, or an exact date.
direction (string) : (series string) BUY (default) or SELL (flips every leg).
ordertype (string) : (series string) MARKET (default) or LIMIT.
price (float) : (series float) Limit price (required for LIMIT).
onlegfailure (string) : (series string) alert (default), cancel or continue.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
ironCondor(symbol, exchange, producttype, account, group, lots, quantity, width, wing, expiry, direction, ordertype, price, onlegfailure, risk, extra)
Iron condor — sell a call and a put 'width' strikes out, and buy a call and a put 'width'+'wing' strikes out as protection. direction "BUY" builds this credit condor; "SELL" reverses it.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
width (int) : (series int) How far out the sold legs sit, in strike steps (default 2).
wing (int) : (series int) Extra distance out to the protective legs, in strike steps (defaults to width).
expiry (string) : (series string) weekly (default), next, monthly, or an exact date.
direction (string) : (series string) BUY (default) or SELL (flips every leg).
ordertype (string) : (series string) MARKET (default) or LIMIT.
price (float) : (series float) Limit price (required for LIMIT).
onlegfailure (string) : (series string) alert (default), cancel or continue.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
ironFly(symbol, exchange, producttype, account, group, lots, quantity, wing, expiry, direction, ordertype, price, onlegfailure, risk, extra)
Iron fly — sell a call and a put at the money, and buy a call and a put 'wing' strikes out as protection. direction "BUY" builds this credit fly; "SELL" reverses it.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
wing (int) : (series int) How far out the protective legs sit, in strike steps (default 2).
expiry (string) : (series string) weekly (default), next, monthly, or an exact date.
direction (string) : (series string) BUY (default) or SELL (flips every leg).
ordertype (string) : (series string) MARKET (default) or LIMIT.
price (float) : (series float) Limit price (required for LIMIT).
onlegfailure (string) : (series string) alert (default), cancel or continue.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
leg(optiontype, strike, tradetype, multiplier)
Build one option leg string for use with multiLeg(), e.g. atw.leg("CE", "ATM+2", "SELL", 2) -> "CE ATM+2 SELL x2".
Parameters:
optiontype (string) : (series string) CE for a call, PE for a put.
strike (string) : (series string) ATM, ATM+2, OTM2, ITM1, or an exact strike like "24500".
tradetype (string) : (series string) BUY or SELL for this leg.
multiplier (int) : (series int) Size multiplier for this leg (default 1).
Returns: (series string) The leg descriptor.
multiLeg(symbol, exchange, producttype, legs, account, group, lots, quantity, expiry, ordertype, price, onlegfailure, risk, extra)
Build an alert for a fully custom multi-leg order from a list of legs (1 to 10) made with leg(). Set exactly one of account/group and exactly one of lots/quantity.
Parameters:
symbol (string) : (series string) The underlier, e.g. "NIFTY".
exchange (string) : (series string) Options exchange code, e.g. "NFO".
producttype (string) : (series string) INTRADAY, DELIVERY, NORMAL or MTF.
legs (array) : (array) The legs, e.g. array.from(atw.leg("PE","ATM-2","SELL"), atw.leg("PE","ATM-6","BUY")).
account (string) : (series string) Single account. Set this OR group.
group (string) : (series string) Group of accounts. Set this OR account.
lots (int) : (series int) Number of lots. Set this OR quantity.
quantity (int) : (series int) Exact quantity. Set this OR lots.
expiry (string) : (series string) weekly (default), next, monthly, or an exact date.
ordertype (string) : (series string) MARKET (default) or LIMIT.
price (float) : (series float) Limit price (required for LIMIT).
onlegfailure (string) : (series string) alert (default), cancel or continue.
risk (string) : (series string) A risk block from risk().
extra (string) : (series string) Extra "key=value" lines to pass through unchanged.
Returns: (series string) The ready-to-send alert message.
riskLimits(maxloss, forceexit, entrywindow, blockExpiry)
Build a risk-limits block to attach to any order via risk=. Example: risk=atw.riskLimits(maxloss=5000). These are your own limits; see the Alert Automation guide for exactly how each one behaves.
Parameters:
maxloss (float) : (series float) Maximum day loss for the account, in your account currency.
forceexit (string) : (series string) A square-off time as "HH:mm", e.g. "15:15".
entrywindow (string) : (series string) An allowed entry-time window "HH:mm-HH:mm", e.g. "09:30-14:30".
blockExpiry (bool) : (series bool) Block new entries on the instrument's expiry day.
Returns: (series string) The risk lines, ready to pass as risk=. مكتبة

AlgoAI Swing Point Reversal Hunter╔═══════════════════════════════════════════════════════════╗
║ 🚀 ALGOAI SWING POINT REVERSAL HUNTER ║
║ Support/Resistance Bounces • Pin Bars • Retest Confirmation ║
╚═══════════════════════════════════════════════════════════╝
🔥 FREE INDICATOR - UPGRADE TO ALGOAI PRO: algoai.store
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS INDICATOR?
This indicator hunts for REVERSALS at key swing points (previous highs/lows)!
It detects:
✅ Swing highs (resistance) and swing lows (support)
✅ Price approaching swing zones
✅ Pin bars and engulfing patterns at swings
✅ Retest confirmations (pullback → retest → reversal)
Perfect for trading BOUNCES at support/resistance levels!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 HOW IT WORKS:
STEP 1: SWING DETECTION
━━━━━━━━━━━━━━━━━━━━
• Finds swing highs (pivot points where price rejected down)
• Finds swing lows (pivot points where price bounced up)
• Marks them with diamond ✦ symbols
STEP 2: ZONE CREATION
━━━━━━━━━━━━━━━━━━━━
• Creates zones around swings (support/resistance areas)
• Resistance zone: Around swing high (pink box)
• Support zone: Around swing low (aqua box)
• Price in zone = potential reversal
STEP 3: REVERSAL PATTERNS
━━━━━━━━━━━━━━━━━━━━
At resistance (bearish reversal):
• Bearish pin bar: High spikes above swing, close below open
• Bearish engulfing: Close below previous close, open above previous high
At support (bullish reversal):
• Bullish pin bar: Low spikes below swing, close above open
• Bullish engulfing: Close above previous close, open below previous low
STEP 4: RETEST CONFIRMATION (Optional)
━━━━━━━━━━━━━━━━━━━━
• First touch: Price hits swing zone
• Pullback: Price moves away from zone
• Retest: Price returns to zone + reversal pattern
• MORE CONFIDENT SIGNAL!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 CHART VISUALS:
✦ PINK DIAMOND (down) = Swing High
• Resistance pivot point
• Price rejected from here
• зона: Pink box below
✦ AQUA DIAMOND (up) = Swing Low
• Support pivot point
• Price bounced from here
• Zone: Aqua box above
🟡 PINK BOX = Resistance Zone
• Around swing high
• Price approaching = watch for bearish reversal
• Background flashes pink
🟡 AQUA BOX = Support Zone
• Around swing low
• Price approaching = watch for bullish reversal
• Background flashes aqua
🟢 "AlgoAI Swing 🟢 BUY" = Bullish Reversal at Support
• Price hit swing low + reversal pattern
• High-probability long
• ENTER on confirmation
🔴 "AlgoAI Swing 🔴 SELL" = Bearish Reversal at Resistance
• Price hit swing high + reversal pattern
• High-probability short
• ENTER on confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ TRADING STRATEGY:
LONG SETUP (BUY at Support):
━━━━━━━━━━━━━━━━━━━━━━━━━━
1. WAIT for Aqua diamond + box (swing low identified)
2. Price drops to approach/swing low zone
3. Look for bullish pin bar or engulfing at swing
4. If retestConfirm ON: Wait for pullback → retest
5. ENTER when "AlgoAI Swing 🟢 BUY" appears
6. STOP loss: Below swing low
7. TARGET: Next swing high or 2:1 R:R
SHORT SETUP (SELL at Resistance):
━━━━━━━━━━━━━━━━━━━━━━━━━━
1. WAIT for Pink diamond + box (swing high identified)
2. Price rises to approach/swing high zone
3. Look for bearish pin bar or engulfing at swing
4. If retestConfirm ON: Wait for pullback → retest
5. ENTER when "AlgoAI Swing 🔴 SELL" appears
6. STOP loss: Above swing high
7. TARGET: Next swing low or 2:1 R:R
NO TRADE ZONES:
━━━━━━━━━━━━━━━━━━━━━━━━━━
• Price between swings (no zone touch)
• No reversal pattern (just normal candles)
• Retest not confirmed (if enabled)
• Wait for proper setup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 SETTINGS EXPLAINED:
Swing Settings:
• Swing Lookback (default 5): How many bars to look for pivots
- Lower (3-4): More swings, tighter zones
- Higher (7-10): Fewer swings, stronger zones
- Recommendation: 5 for day trading, 7-10 for swing
Signal Settings:
• Require Retest Confirmation (default ON):
- ON: More confident, fewer signals
- OFF: More signals, less confident
- Recommendation: ON for higher quality
Swing Settings:
• Min Swing Distance % (default 1.0):
- Lower (0.5-0.8): Smaller swings, more zones
- Higher (1.5-2.0): Larger swings, stronger zones
- Recommendation: 1.0% for most markets
Visual Settings:
• Show Swing Zones (default ON): Show pink/aqua boxes
• Show Reversal Signals (default ON): Show BUY/SELL labels
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱️ BEST TIMEFRAMES:
• SCALPING: 1-min, 3-min (quick bounces)
• DAY TRADING: 5-min, 15-min (best for swings)
• SWING TRADING: 1-hour, 4-hour (cleaner levels)
• POSITION TRADING: Daily (major support/resistance)
Works BEST on 15-min and 1-hour for day/swing trading!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌍 BEST MARKETS:
✓ Crypto (BTC/ETH - clear swing bounces)
✓ Forex (EUR/USD, GBP/USD - S/R levels)
✓ Stocks (trending stocks with swings)
✓ Futures (ES, NS - institutional swings)
Best in markets with clear support/resistance!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 SWING REVERSAL STATS:
Typical results (with retest confirmation):
• Win Rate: 68-75% (at key swing levels)
• Pin Bar Accuracy: 65-72%
• Engulfing Accuracy: 70-78%
• Average R:R: 2.3:1 (swing-based targets)
• Best Setup: Retest + pin bar at major swing
KEY: Swings = major previous highs/lows
→ Higher timeframes = stronger swings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔓 FREE vs PRO COMPARISON:
FREE (This Indicator) PRO VERSION at algoai.store
──────────────────────────────────────────────────────────
✓ Swing detection ✓ + Multi-Timeframe Swings
✓ Zone boxes ✓ + Swing Strength Ranking
✓ Pin/engulf patterns ✓ + Automated HTF S/R
✓ Retest confirmation ✓ + Tradovate/NT8 Auto-Trading
✓ BUY/SELL signals ✓ + Swing Backtesting Suite
✓ Basic alerts ✓ + Dynamic Zone Sizes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 WHY SWING REVERSAL TRADING WORKS:
1. OBJECTIVE LEVELS: Clear swings = clear S/R
2. PATTERN CONFIRMATION: Pin/engulf adds proof
3. RETEST FILTER: Pullback → retest = confidence
4. TIGHT STOPS: Stop at swing (known level)
5. NATURAL TARGETS: Next swing = exit point
Swings are where institutions place orders!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 GET ALGOAI PRO (Full Swing System):
→ algoai.store
Complete swing reversal suite:
• Multi-timeframe swing alignment
• Automated HTF support/resistance
• Swing strength ranking
• Dynamic zone sizing
• Auto-trading integration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 TAGS:
#AlgoAI #SwingTrading #SupportResistance #ReversalTrading #PinBar #Engulfing #DayTrading #PriceAction #TradingView #PineScript #S/R #Reversals
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER:
Swing reversal trading works best at major support/resistance levels. Always wait for pattern confirmation and use proper risk management. Retest confirmation increases quality but reduces signal frequency.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔥 START TRADING SWING REVERSALS:
FREE: Learn swing bounces with this hunter → Master S/R
PRO: Get multi-timeframe system → Automate → Scale
→ algoai.store
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AlgoAI © 2026 | Advanced Algorithmic Trading Intelligence
Powering 10,000+ Traders Worldwide مؤشر

AlgoAI SuperTrend Volatility Tracker╔═══════════════════════════════════════════════════════════╗
║ 🚀 ALGOAI SUPERTROND VOLATILITY TRACKER ║
║ Adaptive ATR-Based Trend Following System (SuperTrend) ║
╚═══════════════════════════════════════════════════════════╝
🔥 FREE INDICATOR - UPGRADE TO ALGOAI PRO: algoai.store
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS SUPERTROND?
SuperTrend is ONE OF THE MOST POPULAR trend-following indicators used by professional traders worldwide!
It uses ATR (Average True Range) to create ADAPTIVE bands that:
✅ Follow price during trends
✅ Stay away during choppy markets
✅ Automatically flip when trend reverses
This is DIFFERENT from EMA/MACD indicators - SuperTrend is PURE price + volatility!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 HOW SUPERTROND WORKS:
1. Calculates ATR (volatility measure)
2. Multiplies ATR by your multiplier (default 3.0)
3. Places band ABOVE price (bearish) or BELOW price (bullish)
4. Band stays until price BREAKS through it
5. When price breaks band → TREND FLIPS
KEY ADVANTAGE: SuperTrend ADJUSTS to market volatility!
• High volatility = Wider bands (less fake signals)
• Low volatility = Tighter bands (catch trends faster)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 CHART VISUALS:
📊 SUPERTROND LINE (Main Signal):
• TEAL line = Bullish trend (below price)
• VIOLET line = Bearish trend (above price)
• Thick line (3px) - easy to see
🟢 LIME BACKGROUND = Bullish trend
• Price ABOVE SuperTrend line
• Trade LONG only
🔴 CRIMSON BACKGROUND = Bearish trend
• Price BELOW SuperTrend line
• Trade SHORT only
🟢 "AlgoAI 🟢 BUY" = Trend flipped BULLISH
🔴 "AlgoAI 🔴 SELL" = Trend flipped BEARISH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ TRADING STRATEGY:
LONG SETUP (BUY):
1. Wait for LIME background (bullish SuperTrend)
2. Look for "AlgoAI 🟢 BUY" label (trend flip)
3. ENTER when price closes above SuperTrend line
4. STOP loss = Below SuperTrend line (auto-trailing!)
5. EXIT = When background turns CRIMSON
SHORT SETUP (SELL):
1. Wait for CRIMSON background (bearish SuperTrend)
2. Look for "AlgoAI 🔴 SELL" label (trend flip)
3. ENTER when price closes below SuperTrend line
4. STOP loss = Above SuperTrend line (auto-trailing!)
5. EXIT = When background turns LIME
的神奇 feature: SuperTrend line = YOUR trailing stop!
• In longs: Stop always below SuperTrend
• In shorts: Stop always above SuperTrend
• Automatically trails as trend progresses!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 SETTINGS EXPLAINED:
ATR Period (default 10):
• Lower (5-7) = Faster signals, more fakeouts
• Higher (14-20) = Slower signals, fewer fakeouts
• Recommendation: 10 for day trading, 14 for swing
Multiplier (default 3.0):
• Lower (2.0-2.5) = Tighter bands, more signals
• Higher (3.5-5.0) = Wider bands, fewer signals
• Recommendation: 3.0 for most markets
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⏱️ BEST TIMEFRAMES:
• SCALPING: 1-min, 3-min (crypto, forex)
• DAY TRADING: 5-min, 15-min, 30-min (all markets)
• SWING TRADING: 1-hour, 4-hour (stocks, crypto)
• POSITION TRADING: Daily (long-term trends)
SuperTrend works on ANY timeframe!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌍 BEST MARKETS FOR SUPERTROND:
✓ Crypto (BTC, ETH - very trend-friendly)
✓ Forex (EUR/USD, GBP/USD during trends)
✓ Stocks (trending stocks, ETFs)
✓ Futures (S&P 500, Nasdaq, Oil)
SuperTrend is ESPECIALLY good for:
• Crypto (strong trends, high volatility)
• Forex majors (clean trends)
• Trending stocks (momentum plays)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 SUPERTROND PERFORMANCE STATS:
Professional traders report:
• Win Rate: 65-75% (in trending markets)
• Average R:R: 2.5:1 (trailing stop helps!)
• Best Markets: Crypto, Forex majors
• Worst Conditions: Choppy/neutral markets
KEY: SuperTrendEXCELLS in trends, fails in chop!
→ Use with trend filter (like our other AlgoAI indicators)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔓 FREE vs PRO COMPARISON:
FREE (This Indicator) PRO VERSION at algoai.store
──────────────────────────────────────────────────────────
✓ SuperTrend basic ✓ + AI SuperTrend Optimization
✓ ATR-based bands ✓ + Multi-Timeframe SuperTrend
✓ Buy/Sell signals ✓ + Auto-Trailing Stop Calculator
✓ Trend flip alerts ✓ + Tradovate/NT8 Auto-Trading
✓ Lime/Crimson colors ✓ + Custom ATR Settings
✓ + SuperTrend + RSI Combo
✓ + Priority Support
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 WHY PROFESSIONALS USE SUPERTROND:
1. SIMPLICITY: One line tells you everything
2. ADAPTIVE: Adjusts to volatility automatically
3. TRAILING STOP: Line = your stop loss
4. TREND FLIPS: Clear entry/exit signals
5. NO LAG: Based on price, not delayed averages
SuperTrend is used by:
• Retail traders (easy to use)
• Prop desks (reliable trends)
• Hedge funds (volatility-based)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 GET ALGOAI PRO NOW:
→ algoai.store
Complete SuperTrend system:
• AI-optimized ATR settings
• Multi-timeframe confirmation
• Auto-trailing stop calculator
• Direct Tradovate/NT8 integration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 TAGS:
#AlgoAI #SuperTrend #ATR #TrendFollowing #DayTrading #CryptoTrading #ForexTrading #StockTrading #TradingView #PineScript #AutoTrading #AITrading #Volatility #TrailingStop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER:
Trading involves significant risk. SuperTrend works best in trending markets and fails in choppy conditions. Always use proper risk management and combine with other indicators for confirmation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔥 START TRADING WITH SUPERTROND:
FREE: Test this SuperTrend → Learn trend following
PRO: Get AI-optimized system → Automate → Scale
→ algoai.store
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AlgoAI © 2026 | Advanced Algorithmic Trading Intelligence
Powering 10,000+ Traders Worldwide مؤشر

Fix Webhook Latency & DH-905 Errors (PineScript to Python BridgeIf you are routing TradingView alerts directly to an Indian broker API (like Dhan or Zerodha) and experiencing execution delays or DH-905 lot size rejections, the flaw is in your routing architecture.
The Problem: Dynamic vs. Static Data
PineScript generates dynamic data. A moving average crossover fires a signal based on a dynamic {{close}} price. However, broker APIs require static Exchange Tokens and rigid SEM_LOT_SIZE multipliers (e.g., Nifty = 65).
If you try to pass quantity: 1 directly to the Dhan API, or if your hardcoded exchange token moves out of the ATM range overnight, the exchange rejects the payload. Furthermore, standard third-party webhook routing adds 1 to 2 seconds of latency, destroying your entry price on fast breakouts.
The Middleware Solution
The PineScript above is Step 1. It formats a clean JSON payload containing the dynamic variables.
Step 2 is interception. You must not send this JSON to the broker. You must send it to a localized Python Flask server hosted on a headless Ubuntu VPS.
On startup, your Python server downloads the NSE Scrip Master directly into a Pandas DataFrame stored in RAM. When this PineScript webhook hits your VPS, the Pandas logic instantly snaps the dynamic {{close}} price to the nearest ATM strike, extracts the exact static Exchange Token, and routes the order to the API.
By removing the third-party webhook bottleneck and relying on RAM-cached token lookups, execution time drops to sub-50ms.
The Open-Source Architecture
I engineered this complete routing logic to eliminate my own Nifty options slippage. I have open-sourced the underlying Python Flask and Pandas routing logic so you can build out the middleware yourself.
Check the GitHub repository for the full Python architecture: github.com مؤشر

MTF Matrix Strategy
**MTF Matrix & Hybrid Strategy V2: Smart Trend & Ambush System**
> **⚠️ DISCLAIMER:** *This script and the following explanations are strictly for educational and algorithmic coding purposes. It is NOT financial or investment advice. Always backtest strategies thoroughly and apply your own risk management before using them in live markets.*
This strategy is designed to eliminate overtrading and only enter the market during the highest-probability moments. It strips away the noise of complex charts: it identifies a strong trend, waits for a discount, and protects your capital with a mathematical armor.
**How Does It Work? (3 Simple Steps)**
1. **Confirms the Direction (Trend Filter):** The system first checks the 5, 8, and 13 Simple Moving Averages (SMA). If they are aligned perfectly (5 > 8 > 13), it confirms a strong uptrend and activates its "Long-only" mode.
2. **Sets the Ambush (The Pullback):** A smart trader never buys the top (No FOMO). This strategy waits for the price to cool down and pull back to the **SMA 8** baseline. This specific zone is defined as the "Ambush Area".
3. **Pulls the Trigger (Candle Confirmation):** Once the price drops into the ambush zone, the system doesn't buy blindly. It waits for visual proof of a reversal using Price Action. It executes the trade only if it detects a valid reversal pattern like a Pin Bar, Engulfing, Doji, or Morning Star.
**How Does It Manage Risk? (Hybrid Exit Mechanism)**
Entering a trade is only half the battle; keeping the money is the real challenge. The system uses a two-layered defense:
* **Step-by-Step Profit Locking (D-Levels):** The algorithm calculates invisible Fibonacci targets (D1, D2, D3...) based on the Higher Timeframe (HTF). As the price climbs and breaches these levels, the system automatically trails your stop-loss up to the previous level, locking in your profits step-by-step.
* **Dynamic Trailing Stop (The Safety Net):** Just in case of sudden market crashes, it maintains a dynamic trailing stop based on a percentage (e.g., 2%) below the highest seen price. As the peak rises, the stop rises. If the price drops by that percentage, it closes the trade to secure gains or minimize losses.
**Customizable Features (Inputs)**
* **Ambush Sensitivity (ATR %):** Adjust how close the price needs to get to the moving average before triggering an entry. Widen or narrow the zone based on market volatility.
* **Price Action Filters:** Toggle specific candlestick patterns on or off based on your personal preference.
* **Live Dashboard:** A sleek panel on the top right gives you real-time visibility of your current stop price, HTF targets, and trade status at a single glance.
---
### 🇹🇷 TÜRKÇE AÇIKLAMA
**MTF Matrix & Hybrid Strategy V2: Akıllı Trend ve Pusu Sistemi**
> **⚠️ YASAL UYARI:** *Bu strateji kodu ve aşağıdaki açıklamalar tamamen algoritmik düşünce yapısını incelemek ve kodlama eğitimi amacıyla hazırlanmıştır. Kesinlikle finansal veya yatırım tavsiyesi (YTD) değildir. Gerçek piyasalarda işlem yapmadan önce sistemin matematiğini anlayın, test edin ve kendi risk yönetiminizi uygulayın.*
Bu strateji, piyasada sürekli işlem yapma hastalığını ortadan kaldırmak ve sadece "en güvenli" anlarda oyuna dahil olmak için tasarlanmıştır. Karmaşık grafik analizlerini bir kenara bırakır; güçlü bir trend bulur, fiyatın ucuzlamasını bekler ve kârı matematiksel bir zırhla korur.
**Sistem Nasıl Çalışır? (3 Basit Adım)**
1. **Yönü Teyit Eder (Trend Filtresi):** Sistem ilk olarak 5, 8 ve 13 günlük Basit Hareketli Ortalamalara (SMA) bakar. Eğer bu üçü kusursuz bir sıraya dizilmişse (5 > 8 > 13), piyasanın güçlü bir yükseliş trendinde olduğunu anlar ve sadece "Alım" (Long) yönlü fırsat aramaya başlar.
2. **Pusuya Yatar (Geri Çekilme):** Usta bir avcı avının üzerine koşmaz, bekler. Bu strateji de fiyatlar zirvedeyken alım yapmaz (FOMO'yu engeller). Fiyatın, trendin dinlenme bölgesi olan **SMA 8** çizgisine doğru geri çekilmesini bekler. Bu bölge sistemin "Pusu Alanı"dır.
3. **Tetiği Çeker (Mum Onayı):** Fiyat pusu alanına geldiğinde sistem körü körüne alım yapmaz. Dönüşün başladığını kanıtlayan bir Price Action (Fiyat Hareketi) mumu arar. Pin Bar, Yutan Mum (Engulfing), Doji veya Sabah Yıldızı formasyonlarından birini gördüğü an işleme girer.
**Riski Nasıl Yönetir? (Hibrit Çıkış Mekanizması)**
İşleme girmek işin sadece yarısıdır, asıl marifet parayı korumaktır. Sistem bu noktada devreye iki katmanlı bir zırh sokar:
* **Adım Adım Kâr Kilitleme (D-Seviyeleri):** Sistem, üst zaman diliminden (HTF) aldığı verilerle görünmez Fibonacci hedefleri (D1, D2, D3...) çizer. Fiyat yükselip bu hedefleri aştıkça, zarar kes (stop-loss) seviyenizi bir alt kademeye taşır. Böylece kazandığınız kârı piyasaya geri vermezsiniz.
* **Dinamik İzleyen Stop (Emniyet Kemeri):** İşler ters giderse diye, fiyatın gördüğü en yüksek zirveden belirlediğiniz bir yüzde (örn: %2) gerisine dinamik bir stop koyar. Zirve yükseldikçe stop da yükselir; fiyat aniden %2 düşerse işlemi kârla veya minimum zararla kapatır.
**Kullanıcı Dostu Özellikler (Ayarlar)**
* **Pusu Hassasiyeti (Ambush Sensitivity):** Fiyatın ortalamaya ne kadar yaklaşması gerektiğini ayarlarsınız. Piyasaya göre alanı daraltıp genişletebilirsiniz.
* **Fiyat Hareketi (PA) Filtreleri:** İstemediğiniz mum formasyonlarını ayarlardan kapatıp sadece güvendiklerinizle işlem yapabilirsiniz.
* **Bilgi Panosu (Dashboard):** Sağ üst köşedeki şık panel sayesinde anlık stop seviyenizi, hedeflerinizi ve piyasa durumunu tek bakışta görürsünüz.
استراتيجية

Strong Gold Breakouts M5 | ProjectSyndicate⚙️ Gold short-term entries off M5 timeframe using dynamic consolidation zones with ADR-based TP targets.
📦 Advanced Consolidation Structure: The indicator detects and plots high-probability consolidation zones using a multi-dimensional 0–10 scoring algorithm. Only the strongest zones (score 6+) that span at least 10 candles are displayed, providing a robust breakout structure based on pure price compression. This is the default setting and is designed for intraday trading.
🎯 Precision Entry & Exit Levels: A color-coded consolidation box is plotted, with Buy Stop and Sell Stop dashed lines automatically placed 2 USD away from its borders. This buffer creates a neutral zone and helps filter out fakeouts.
💰 ADR-Based Profit Targets: Three Take Profit (TP) lines are plotted for both long and short trades (TP1, TP2, TP3). These levels are dynamically calculated as a percentage of the 10-day Average Daily Range (ADR), ensuring targets adapt to current market volatility.
⚙️ Fully Customizable Levels: Every element is adjustable. You can change the buffer between the consolidation box and stop lines, and customize the exact ADR percentages for TP1 (10%), TP2 (15%), and TP3 (20%) to suit your risk profile.
🔔 M5 Breakout Alerts: The indicator includes a powerful alerts module that triggers when an M5 candle closes above the Buy Stop level or below the Sell Stop level. This provides real-time notifications with full trade details for potential entries.
🎨 Clean Visuals & Clear Labels: The zones are color-coded based on strength — White=6, Yellow=7, Orange=8, Red=9–10 — for instant recognition. The Buy Stop, Sell Stop, and TP lines are fully labeled with exact price levels, ensuring zero confusion.
⚙️ Trading Strategy & Logic
This strategy is designed for precision and requires patience. The core idea is to wait for the market to confirm a breakout of an established high-scoring consolidation zone before entering a trade.
📌 Entry Logic
🕒 Wait for a Strong Zone: Allow the indicator to detect and plot a new high-scoring consolidation zone. Do not trade old or expired zones.
🔔 Set Your Alerts: In TradingView, create a new alert and select the indicator. For the condition, choose "Any alert() function call". This will notify you the moment an M5 candle closes across a stop level.
👀 Wait for the M5 Close: For a Long Buy Trade, wait for an M5 candle to close above the Buy Stop line. For a Short Sell Trade, wait for an M5 candle to close below the Sell Stop line.
✅ Enter on Confirmation: Once you receive the alert and visually confirm the M5 candle has closed past the level, you can enter the trade targeting the dynamic ADR levels. مؤشر

مؤشر

Scalp Signal Bot - 5 min v3.0.1A precision-built intraday trading system designed for fast-moving markets like crypto and metals, optimized for 5-minute charts. This strategy focuses on capturing high-probability liquidity-driven moves while minimizing exposure to noise and false breakouts.
Core Concept
Scalp Signal Bot combines market structure, liquidity sweeps, and confirmation logic to identify actionable trade setups. It is engineered to enter after key levels are reclaimed and structure is confirmed, helping avoid common traps during volatile conditions.
Key Features
Market Structure Engine
Detects swing highs/lows and triggers entries on confirmed structure breaks.
Liquidity Sweep Detection
Identifies stop-hunt behavior and uses it as context for higher-probability reversals or continuations.
Reclaim Confirmation Logic
Ensures price reclaims key levels before entering, filtering out weak or premature signals.
Anti-Fakeout Entry Delay
Optional candle delay reduces entries during impulsive spikes and false breakouts.
Volume Filtering (Optional)
Uses relative volume conditions to validate participation and reduce low-liquidity signals.
Trend & Chop Modes
Flexible regime detection allows the bot to adapt between trending and ranging environments.
Configurable Risk Model
Supports R-based take profit and dynamic stop logic aligned with structure and volatility.
Live Trade HUD
Displays real-time signal state, entry, TP/SL levels, and system context directly on chart.
Designed For
5-minute scalping strategies
High-volatility assets (e.g., BTC, ETH, XAU, XAG)
Traders seeking structured, rule-based entries without emotional bias
Strengths
Avoids chasing moves with confirmation-based entries
Filters noise in choppy markets
Adapts to multiple market conditions with configurable logic
Important Notes
Performance varies by market regime (trend vs range)
Works best when tuned to the current volatility environment
Not intended for passive buy-and-hold strategies
Best Use
Run on 5-minute charts with proper parameter tuning. Ideal for traders who want consistent, rule-driven setups and are comfortable optimizing settings for current market conditions.
Disclaimer
This script is for educational and informational purposes only and does not constitute financial advice. The creator is not a registered financial advisor.
Trading financial markets involves significant risk. Past performance is not indicative of future results. This strategy does not guarantee profits and may result in losses, including the loss of principal.
Users are solely responsible for their own trading decisions. Always conduct your own research and risk management before using this script in live markets.
This script is a tool designed to assist in decision-making and should not be used as a standalone system without proper understanding and testing.
No representation is being made that any account will or is likely to achieve profits or losses similar to those shown.
If you want stricter (sometimes helps approval faster), use this slightly heavier version:
Risk Disclosure
This script is provided “as is” without any guarantees or warranties. The developer assumes no responsibility for any trading losses incurred.
All trading involves risk, and you should only trade with capital you can afford to lose. Hypothetical or backtested results have inherent limitations and do not reflect actual trading performance.
By using this script, you acknowledge that you are fully responsible for your trading decisions and outcomes. استراتيجية

Strong Liquidity Zones Pro | ProjectSyndicateStrong Liquidity Zones Pro
Strong Liquidity Zones Pro automatically identifies and power-ranks high-probability Sell Liquidity and Buy Liquidity zones by analyzing swing structure, zone age, and retest activity. It filters for quality, calculates a POWER score for every zone based on its freshness and historical interaction, and presents all data on the chart and in three comprehensive dashboards to eliminate clutter and focus on levels that matter.
•🎯 True First-Touch Engine — the built-in simulator is hard-coded to only enter on the first touch of a fresh or once-tested zone, ensuring backtest results are clean and reflect a real-world edge.
•🎨 Power-Based Visuals — zones are labeled with a POWER score from 0-10, calculated from age and retests. The simulator can be set to only trade zones with a minimum POWER score (e.g., >= 6/10) for higher-quality setups.
•🧠 Advanced Zone Management — automatically detects zones from confirmed swing pivots, merges overlapping zones to create stronger liquidity areas, and invalidates zones based on user-selected criteria (wick or close through).
•📈 Detailed On-Chart Markup — every zone is plotted with a detailed label: SELL SIDE LIQ. | FRESH | POWER 8/10 | 0.18% | London | 42 bars | 0.15% away. The simulator adds entry/SL/TP lines, shaded TP/SL boxes, and entry/exit labels with R-multiple results.
•🧭 Three-Panel Dashboard Display — get a complete market overview without leaving your chart:
•MTF Alignment: M5/M15/H1/H4/D1 direction, price, bars-ago, and a final MTF Bias score.
•Performance Statistics: 19 essential metrics covering core PnL, risk/reward, streaks, and long/short performance.
•Daily PnL Tracker: A running log of the last 20 trading days with PnL (R), PnL (Pips), and trade count, with green/red row backgrounds for at-a-glance performance.
•🔔 Comprehensive Alerts — get a simple alert whenever a new zone is confirmed, signaling that the liquidity map has been updated.
•✅ Quality Control Filters — user-configurable inputs for swing detection length, max/min zone height (ATR-based), minimum zone strength to trade, and lookback periods allow for deep customization to match any trading style.
•🔧 Fully Customizable — control everything from the max number of zones shown and simulator RR/SL settings to the text size of all labels and dashboard positions.
•🎯 Why this algo is unique: Standard S&D indicators either flood the chart with every potential zone or use simplistic logic. This algorithm intelligently filters, merges, and ranks them. It doesn't just show you where liquidity might be, it quantifies how powerful that zone is based on its history, and the built-in simulator provides a realistic edge by only trading the first touch of high-quality zones.
•🚀 Apply to Gold (XAUUSD), Forex, Crypto, and Indices on any timeframe. The ATR-based zone height and SL settings allow it to adapt to anything from scalping to swing trading.
•🎯 How to use this? Use the dashboards to confirm higher-timeframe bias. Focus on simulator entries from high-POWER zones (>= 6/10) that align with the MTF trend. Use the alerts to know when a new, potentially high-quality zone has formed.
•⚠️ IMPORTANT NOTICE: This indicator is designed to identify high-probability liquidity zones and provide a realistic backtesting simulator. It should NOT be used as a standalone signal for entering live trades. Always use it in conjunction with your own trading strategy, price action analysis, and other technical indicators to confirm trade setups and manage risk. مؤشر

Quant Reversal Index [AlgoPoint]Overview
The AlgoPoint Quant Reversal Index is a normalized (0-100) oscillator designed to measure mean-reverting tendencies in financial time series. By combining the Hurst Exponent, an Autoregressive AR(1) Half-Life model, and Ornstein-Uhlenbeck (OU) boundaries, this indicator evaluates whether an asset is in a trending or ranging regime and calculates its proportional deviation from a dynamic historical mean.
Mathematical Core & Components
This indicator relies on three primary quantitative concepts:
1. Hurst Exponent ( H ) : Approximated using the log variance ratio of price differences over distinct time lags. It determines the current market regime:
- H < 0.5: Indicates a Mean Reverting (ranging) regime.
- H > 0.5: Indicates a Trending (momentum) regime.
2. AR(1) Half-Life : Calculates the estimated time (in bars) it takes for the price to revert to its mean. This is derived from the linear regression slope (covariance/variance) of price changes against previous prices. This dynamic half-life dictates the lookback length for the oscillator's mean and standard deviation.
3. Ornstein-Uhlenbeck (OU) Conversion : Calculates the mean ($\mu$) and standard deviation ($\sigma$) over the dynamic half-life period to establish upper and lower OU boundaries. The current price is then normalized into a 0 to 100 index based on its position relative to these boundaries.
Visual Elements & Interpretation
- The 0-100 Scale : * A value of 50 represents the dynamic mean ($\mu$).
- A value of 0 represents the Lower OU boundary (Standard Deviation limit).
- A value of 100 represents the Upper OU boundary.
- Values extending beyond 0 or 100 highlight statistical extremes.
- Dynamic Regime Background : When the Hurst Exponent is strictly below the user-defined threshold (default 0.5), the oscillator's background is highlighted. This visually confirms that the asset exhibits stationary, mean-reverting properties. If the background is not highlighted, the asset is considered to be trending, and mean-reversion logic is disabled.
- Signal Generation : The indicator plots "Buy" and "Sell" labels strictly when the market is in a confirmed mean-reverting regime ($H < 0.5$) AND the oscillator crosses back into the 0-100 range from an extreme (e.g., crossing above 0 or crossing below 100). All signals use barstate.isconfirmed to prevent repainting.
- Quant Dashboard : Displays real-time data for the current market regime, exact Hurst Exponent value, and the estimated Half-Life in bars.
How to Use
- Wait for the background to highlight, confirming a mean-reverting regime.
- Monitor the index as it reaches extreme values (< 0 or > 100).
- A statistical reversion is indicated when the index crosses back inside the core 0-100 range.
- Signals should be combined with broader macro analysis and strict risk management protocols.
Alerts
The indicator includes standard alert conditions and dynamic JSON webhook strings for automated trading systems, providing variables such as asset name, price, hurst value, and half-life duration on signal generation. مؤشر

مؤشر

مؤشر

Adaptive AI SuperTrend [AlgoPoint]🚀 Adaptive AI SuperTrend
Adaptive AI SuperTrend is a high-performance trading terminal that redefines trend-following by integrating Machine Learning (ML) principles with advanced market regime detection. Unlike static indicators, this system dynamically recalibrates its internal parameters to match the ever-changing volatility of the financial markets.
Equipped with a custom "Wizard Engine," it filters out market noise during consolidation and identifies high-probability trend continuation points, making it an essential tool for scalpers, day traders, and swing traders alike.
🧠 What Makes it "AI"?
While traditional indicators use fixed rules, Adaptive AI SuperTrend utilizes Algorithmic Intelligence to make real-time decisions:
KNN-Inspired Adaptation: The engine analyzes the last 150 bars of volatility and trend strength to automatically adjust its sensitivity.
Market Regime Intelligence: It distinguishes between "Trending" and "Ranging" states using a sophisticated Squeeze Momentum module, preventing "whipsaws" during low-volume periods.
Self-Backtesting Logic: The indicator continuously calculates its own historical Win-Rate. If the probability of success falls below a certain threshold, it suppresses lower-quality signals.
🛠 Key Features
Dynamic Consolidation Boxes: Automatically identifies and wraps "choppy" price action in professional gray boxes. It waits for 3+ bars of consolidation before marking the zone, helping you spot breakout opportunities early.
Multi-Strategy Aggression:
- Conservative: Filtered signals for long-term trend following.
- Balanced: Optimized for daily volatility.
- Aggressive: High-frequency signals for capturing micro-trends.
Dual-Exit Risk Management:
- ATR TP-SL Mode: Sets mathematical targets based on market volatility with persistent on-screen lines.
- Smart Trailing Mode: Rides the trend to its exhaustion point. Includes intelligent labeling (🎯 TP or 🛑 SL) based on the trade's net profitability.
- RSI Pullback Confirmation: Beyond simple trend flips, it detects "buy the dip" or "sell the rip" opportunities within an existing trend using RSI 50-level crossovers.
📊 Real-Time Analytics Dashboard
The integrated AlgoPoint Dashboard provides a surgical view of the market:
- Market State: Instant "Trending" vs. "Ranging" (Consolidation) detection.
- Trend Strength: ADX-based momentum tracking.
- Strategy Status: Real-time feedback on your active aggression and exit modes.
🎨 Clean Charting & Customization
Built for professional clarity, you have total control over the UI:
Toggle Consolidation Boxes on/off.
Toggle ATR Target Lines and Exit Labels.
Customize background filters and dashboard visibility. مؤشر

BE-QuantFlow: Adaptive Momentum Trading█ Overview: QuantFlow: Adaptive Momentum Trading
QuantFlow is a sophisticated algorithmic momentum trading method designed specifically for indices and high-beta stocks. However, its logic is universal; with appropriate parameter tuning, it adapts to various asset classes and timeframes.
While the standard momentum indicators (like RSI or MACD) simply measure how fast price is moving (Velocity), QuantFlow analyzes the quality and conviction of the trend . Features like Dynamic Volatility Filtering and Trend Shielding, combined with volatility weighting and a "Dual-Line" approach to distinguish between a sustainable institutional trend and a temporary retail spike, make the indicator unique and more powerful.
█ Why QuantFlow ?
Quant (The Engine): This replaces subjective guessing with objective math.
Instead of just seeing that the price is "up," we measure "how it got there". For example, a stock that rises 1 currency value every day for 10 days (smooth trend) gets a much higher score than a stock that jumps 10 currency value in one minute and does nothing else (erratic noise). This mathematical rigor provides the structure.
█ Core Logic & Philosophy
To understand how QuantFlow calculates momentum, imagine a "Tug-of-War" between Buyers (Bulls) and Sellers (Bears). Most indicators (like RSI) use a single line. If RSI is at 50, it means "Neutral." But "Neutral" can mean two very different things:
Peace: Nothing is happening. No one is buying or selling.
War: Buyers are pushing hard, but Sellers are pushing back equally hard. Volatility is massive.
A single line hides this reality. QuantFlow splits the market into two separate scores:
Bull Score (Green Line): How hard are the buyers pushing?
Bear Score (Red Line): How hard are the sellers pushing?
The Layman's Advantage:
If both lines are low = Sleepy Market (Avoid).
If Green is high and Red is low = Clean Uptrend (Buy).
If Red is high and Green is low = Clean Downtrend (Sell).
If both lines are high = Chaos/War Zone (Wait).
█ How it Weight "Sustenance" (The Critical Quality Check)
This is the most unique aspect of QuantFlow: Trend direction alone is not enough; Sustenance is weighed equally . Standard indicators treat every 10 currency value movements the same way with no distinction. However, QuantFlow asks, "Did you hold the ground you gained?"
Scenario A (High Sustenance) : A stock opens at 100, marches to 110, and closes at 110.
Verdict : Buyers pushed up and sustained the price.
QuantFlow Weight : 100%. This is a high-quality move.
Scenario B (Low Sustenance) : A stock opens at 100, spikes to 110, but gets sold off to close at 102.
Verdict : Buyers pushed up (Trend is Up), but failed to sustain it (Long Wick).
QuantFlow Weight : 20%. This is treated as "Noise" or a trap.
By mathematically weighing the Close Location Value (where the candle closes relative to its high/low), QuantFlow filters out "Gap-and-Fade" traps and exhaustion spikes that fool traditional indicators.
Comparisons: QuantFlow vs. The Rest
Calculation Logic : Standard RSI/MACD measures simple price change over time. QuantFlow measures Price Change 'times (x)' Conviction (Sustenance Weighting).
Visual Output : Standard tools show a single line (0-100), often hiding market conflict. QuantFlow displays Dual Lines (Bull vs Bear Intensity) to reveal the true state of the battle.
Trap Handling : Standard indicators are often fooled by sharp spikes. QuantFlow ignores "Gap-and-Fade" moves with poor closing conviction.
Adaptability : Standard tools use static levels (e.g., Overbought > 70). QuantFlow uses Dynamic Bands that adjust automatically to recent volatility.
█ Dynamic Volatility Filtering
Unlike standard indicators that use fixed levels (e.g., "Buy if RSI > 50"), QuantFlow acknowledges that "50" means something different in a quiet market versus a crashing market. This section explains the statistical engine driving the signals.
The Problem with Static Levels : In a low-volatility environment, a momentum score of 55 might indicate a massive breakout. In a high-volatility environment, a score of 55 might just be random noise. A fixed threshold cannot handle both scenarios.
The Solution: Adaptive Statistics : The script maintains a memory of the Momentum Events. It doesn't just look at price; it looks at where the momentum occurred in the past and draws a "Noise Zone" (Grey Band). This logic acts as a "Smart Gatekeeper" for trade entries:
Scenario A: Inside the Noise (The Filter)
If a new momentum signal happens inside the Noise Zone, the script assumes it is likely chop or noise.
Action : It forces a wait period. The signal is delayed until the trend sustains itself for Confirm Bars; else the signal is cancelled. This filters out ~70% of false signals in sideways markets.
Scenario B: Outside the Noise (The Breakout)
If a new momentum signal happens outside the Noise Zone (or the momentum score smashes through the Upper Band), it is statistically significant (an outlier event).
Action: It triggers an Immediate Entry. No waiting is required because the move is powerful enough to escape the historical noise zone.
█ The ⚠️ "Warning" System (Heads-up for Smart Reversals)
While you are directional if there is potential reversal signal, it provides the heads-up warning for a better decision-making
█ Special Utility: Ghost Mode
For intraday traders, the biggest disruption to "Flow" is the mandatory broker square-off at 3:15 PM (considering Indian Market). Often, a trend continues overnight, and the trader misses the gap-up opening the next morning because their algo was flat.
Ghost Mode is a unique feature that runs silently in the background:
At Square-off: The strategy closes your official position to satisfy the broker.
In the Background: It keeps the trade "alive" virtually (Ghost).
Next Morning: If the market opens in the trend's favor, the strategy re-enters the trade automatically. This approach ensures you capture the full swing of the trend, even if you are forced to exit at the previous session.
█ Advice on this indicator:
Parameter Calibration: The default settings are optimized for BankNifty on 5-minute charts. If you trade stocks, crypto, commodities, or any higher timeframes (e.g., 15-min or hourly), you must adjust these.
Low Volatility Assets: Reduce Stop Multiplier to 2.0.
High Volatility Assets: Increase Momentum Lookback to 50 to filter noise.
Confluence (Additional Confirmation): While QuantFlow is a complete system, using it alongside Key Support/Resistance Levels or Volume Profile provides the highest probability setups. استراتيجية

Adaptive Bull Ratio Strategy█ Overview: Why This Strategy
Most option strategies fall into two traps:
They are too rigid: A "Call Ratio Spread" works great in slow markets but gets destroyed if the market rallies hard.
They are too simple: A simple "Buy Call" suffers from time decay (Theta) if the market chops sideways.
The Adaptive Bull Ratio Strategy solves both . It is a living strategy that "shifts gears" based on price action.
It is called "Adaptive" because it morphs its structure three times during a trade. It starts conservative to harvest Time Decay, but if the market explodes upwards, it "uncaps" itself to ride the trend aggressively.
█ The Entry Philosophy: Why Supertrend?
The default setting uses the Supertrend indicator as the trigger. This is intentional:
Volatility Awareness: Supertrend adapts to market noise using ATR. In high volatility, bands widen to prevent false entries.
Trend Confirmation: Since Phase 1 involves selling options, entering "too early" against a falling market is dangerous. Supertrend forces patience, waiting for a confirmed reversal (Close > Trend Line), ensuring the momentum is actually in your favor before you commit capital.
The "Drift" Benefit: This strategy excels in markets that "drift" upwards. Supertrend identifies these trends while filtering out short-term chop.
Flexibility with External Sources:
While Supertrend is the default, the strategy is designed to be flexible. You can enable the 'Enable External Source' option in the settings to plug in any custom indicator (e.g., Moving Averages, Parabolic SAR, or a proprietary trendline).
The Golden Rule for External Sources: The script interprets a Bullish Signal whenever your External Source line is below the Close price (Ext Source < Close).
Compatibility: As long as your custom indicator behaves like a support line in an uptrend (plotting below the candles), it will work seamlessly with this strategy's logic.
█ The "Long Only" Rationale: Avoiding the Volatility Trap
Why not trade this on the short side (Puts) during crashes?
The Volatility Trap (Vega Risk): In Bull markets, Implied Volatility (IV) usually drops, helping your sold options decay faster. In Bear markets, IV explodes (panic). Selling OTM Puts during a crash is dangerous as their value skyrockets, neutralizing gains.
Velocity Risk: Bear markets crash fast ("Elevator Down"). Prices can blow through adjustment levels faster than the strategy can safely roll down, causing slippage.
Structural Skew: OTM Puts are inherently more expensive. Buying expensive ITM Puts and selling expensive OTM Puts shifts the breakeven further away, making V-shape recoveries painful.
█ How It Works & Stands Out
This strategy actively transforms risk profiles based on market movement:
Phase 1: The "Safe" Start (Entry)
Setup: Initiates a Call Ratio Spread (Buy 2 ITM, Sell 4 OTM) + Protective Puts.
Logic: Profits from sideways drift or slow rallies via Time Decay (Theta). The sold options finance the trade.
Phase 2: The "Shift" (Adjustment Level 1)
Trigger: Market moves above Leg 2 (3 OTM Call).
Action: Rolls Up the position. Exits initial legs, enters new higher legs, and adds a Short Put to finance the roll.
Impact: Aggressive. You bet the trend is strong enough to support the added downside risk of the short put.
Phase 3: The "Uncap" (Adjustment Level 2)
Trigger: Market moves above Leg 3 (4 OTM Call).
Action: Exits all Sold Calls.
Impact: Uncaps profit potential. The trade becomes a Net Long position (Long Calls + Short Puts), allowing you to ride a massive rally without a ceiling.
Phase 4: The "Lock-In" (Optional Trail Adjustment)
Trigger: The market goes parabolic (price rises X levels above Leg 3, configurable in settings).
Action (If Enabled):
Call Adj: Exits the Phase 3 calls and buys fresh 1-OTM calls (Rolling Up to lock profits).
Put Adj: Exits all Put legs (Removing downside risk completely).
Impact: Maximum Safety. This phase is about "banking" the windfall from a massive rally and leaving a smaller, risk-free runner to capture any final extension.
█ How to Start: A Quick Setup Guide
Step 1: Map Expiry Dates
Manually input your trading expiry dates in Settings -> Expiry Management.
Format: YYYY-MM-DD (e.g., 2025-12-25). Strict adherence required for DhanHQ.
Step 2: Configure Symbol & Size
Exchange/Symbol: Enter NSE and NIFTY (or your ticker).
Lot Multiplier: Default is 1. Set to 2 to double all quantities (e.g., Buy 2 becomes Buy 4).
Step 3: Understand Visuals
Entry Window (Light Blue): Strategy is scanning for new trades.
Non-Entry Window (Dark Blue): Trading blocked (Day before Expiry & Expiry Day). Only management allowed.
Green Box: Valid Late Entry Zone.
Red Dashed Line: Invalidation Level (if price touches this, no late entry).
Fuchsia Line: Trigger level for Special Trail Adjustments (Phase 4).
IMPORTANT: Broker & Technology Heads-Up:
The alerts generated by this script ({"secret": "...", "alertType": "multi_leg_order"...}) are specifically formatted for the DhanHQ webhook structure.
Dhan Users: Plug-and-play.
Other Brokers: You need middleware (NextLevelBot, Quantiply) to parse the JSON.
█ Risk Disclaimer & Advice
Trading options involves substantial risk.
The Whipsaw Risk: In Phase 2, you are Long Calls and Short Puts. A sharp reversal causes losses on both sides.
Margin: Selling options requires significant margin. Keep a 15-20% cash buffer to handle adjustments instantly.
Testing: This strategy is optimized for NIFTY Weekly Options. Effectiveness on BankNifty or Stocks is untested and may require parameter tuning.
Advice:
Backtest: Use TradingView Replay.
Paper Trade: Run for at least one expiry cycle before live deployment.
Consult: Seek professional financial advice before trading.
Practical Tips for Smooth Execution
For a new trader deploying this system, these operational tips are vital:
Capital Buffer: Do not trade at your limit. Always keep 10-15% free cash in your broker account. Adjustments (specifically Phase 2, where you sell an extra Put) require additional margin instantly. If margin is short, the order fails, and your hedge breaks.
Liquidity Awareness : The script trades "Far Deep OTM" options (Leg 4) to reduce margin. On indices like Nifty/BankNifty, this is fine. On individual stocks, these deep strikes might be illiquid. Check the option chain volume before deploying on stocks.
Trust the Process (but Verify) : While the algo drives, you are the pilot.
Check your API connection every morning.
Ensure the "Entry Window" background color on the chart matches your real-world date.
Verify that your broker executed all legs of a multi-leg order (partial fills are rare but possible).
The "Human" Stop: If major news breaks (e.g., unexpected election results, war announcements), volatility can expand faster than any algo can react. It is acceptable—and smart—to pause the strategy during known "Black Swan" events or earnings releases.
█ Timeframe Selection: The 30-Minute Standard
Critical Requirement: This indicator must be applied to a 30-minute chart.
Why?
Noise Filtering: The Supertrend logic is tuned to capture multi-day trends. Lower timeframes (5m, 15m) are full of "noise"—random fluctuations that look like trend changes but aren't.
Execution Logic (The Hybrid Engine): The script has a built-in "Dual Timeframe" architecture.
Decision Layer (30m): Uses the chart timeframe to decide when to be Bullish or Bearish.
Execution Layer (5m): Internally fetches 5-minute data to manage the how (Adjustments, Late Entries, and precise invalidation).
The Risk of Lower Timeframes: If you run the main chart on 5-minutes, you destroy this hierarchy. You will get too many signals, pay too much brokerage, and the internal logic may behave erratically.
Recommendation: Always keep your TradingView chart interval at 30m. Do not switch to lower timeframes expecting "faster" signals; you will likely just get "false" signals.
█ Testing Scope, Feedback
⚠️ Important Note on Asset Classes:
This strategy logic and the associated strike step calculations have been rigorously tested ONLY on NIFTY Index Options with Weekly Expiry.
BankNifty / Sensex / FinNifty: The volatility characteristics (ATR) and strike intervals of these instruments differ significantly from NIFTY. The effectiveness of this strategy on these other scripts has not been verified and may require different parameter tuning (e.g., strike_step or ATR Length).
Stocks: Individual stock options often lack the liquidity required for the "Deep OTM" legs, leading to potential execution failures.
We encourage traders to backtest this logic on other indices and share their findings! If you find a robust parameter set for BankNifty or observe unique behaviors on other scripts, please let us know in the comments below so we can improve the algorithm for everyone. Your feedback is appriciated. مؤشر

QUANT TRADING ENGINE [PointAlgo]Quant Trading Engine is a quantitative market-analysis indicator that combines multiple statistical factors to study trend behavior, mean reversion, volatility, execution efficiency, and market stability.
The indicator converts raw price behavior into standardized signals to help evaluate directional bias and risk conditions in a systematic way.
This script focuses on factor alignment and regime awareness, not prediction certainty.
Design Philosophy
Markets move through different regimes such as trending, ranging, volatile expansion, and instability.
This indicator attempts to model these regimes by blending:
Momentum strength
Mean-reversion pressure
Volatility risk
Trend filtering
Execution context (VWAP)
Correlation structure
Each component is normalized and combined into a single Quant Alpha framework.
Factor Construction
1. Momentum Factor
Measures directional strength using percentage price change over a rolling window.
Standardized using mean and standard deviation.
Represents trend continuation pressure.
2. Mean Reversion Factor
Measures deviation from a longer moving average.
Standardized to identify stretched conditions.
Designed to capture counter-trend behavior.
Directional Clamping
Mean-reversion signals are dynamically restricted:
No counter-trend buying during downtrends.
No counter-trend selling during uptrends.
Allows both sides only in neutral regimes.
This prevents conflicting signals in strong trends.
3. Volatility Factor
Uses realized volatility derived from price changes.
Penalizes environments where volatility deviates significantly from its norm.
Acts as a risk adjustment rather than a directional driver.
4. Composite Quant Alpha
The final Quant Alpha is a weighted blend of:
Momentum
Mean reversion (trend-clamped)
Volatility risk
The composite is standardized into a Z-score, allowing consistent interpretation across instruments and timeframes.
Signal Logic
Buy signal occurs when Quant Alpha crosses above zero.
Sell signal occurs when Quant Alpha crosses below zero.
Zero-cross logic is used to represent shifts from negative to positive statistical bias and vice versa.
Signals reflect statistical regime change, not trade instructions.
Volatility Smile Context
Measures price deviation from its statistical distribution.
Identifies skewed conditions where upside or downside volatility becomes dominant.
Highlights extreme deviations that may imply elevated derivative risk.
Exotic Risk Conditions
Detects sudden price expansion combined with volatility spikes.
Highlights environments where execution and risk become unstable.
Visual background cues are used for awareness only.
Execution Context (VWAP)
Measures price distance from VWAP.
Used to assess execution efficiency rather than direction.
Helps identify stretched conditions relative to average traded price.
Correlation Structure
Evaluates short-term return correlations.
Detects when price behavior becomes less predictable.
Flags structural instability rather than trend direction.
Visualization
The indicator plots:
Quant Alpha (scaled) with directional coloring
Volatility smile deviation
Price vs VWAP distance
Correlation structure
Signal markers indicate Quant Alpha zero-cross events and risk conditions.
Dashboard
A compact dashboard summarizes:
Trend filter state
Quant Alpha polarity and value
Individual factor readings
Current action state (Buy / Sell / Wait / Risk)
The dashboard provides a real-time snapshot of internal model conditions.
Usage Notes
Designed for analytical interpretation and research.
Best used alongside price action and risk management tools.
Factor behavior depends on instrument liquidity and volatility.
Not optimized for illiquid or irregular markets.
Disclaimer
This script is provided for educational and analytical purposes only.
It does not provide financial, investment, or trading advice.
All outputs should be independently validated before making any trading decisions. مؤشر

استراتيجية

Smart Cloud by Ilker (Custom Matriks)A Proprietary Hybrid Trend System for All Major Financial Assets
This indicator, originally developed for the Matriks platform, is a highly effective hybrid trend identification system designed for day-to-day analysis across all major asset classes, including Stocks, Forex, Indices, and Cryptocurrencies. It combines the forward-looking principle of the Ichimoku Kinko Hyo Cloud with heavily smoothed Moving Averages (MAs) to create a clear, visually guided trading signal. (Daily Timeframe recommended for optimal results).
📊 Algorithmic Structure and Parameters
The "Smart Cloud" utilizes six primary user-adjustable parameters that govern its sensitivity and shape, moving away from standard Ichimoku settings to provide a robust, customized trend view:
P1, P2, P3 (60, 56, 248): These long-term settings define the core structure and width of the cloud, acting as the primary dynamic support and resistance zone. The significantly longer P3 (Lagging Period) ensures the cloud reflects strong, deep market cycles.
P4 (Displacement 26): Maintains the traditional Ichimoku principle of projecting the cloud 26 periods forward to provide a predictive view of future trend support/resistance.
P5 (MA50 - Blue) & P6 (MA10 - Purple): These are the two primary Moving Averages plotted inside the cloud. They serve as fast-response momentum lines:
P5 (MA50): Represents the middle-term trend average.
P6 (MA10): Represents the short-term market momentum.
📈 Core Trend and Signal Interpretation
The indicator provides powerful trend identification based on three key components:
The Cloud (Kumo):
Green Cloud (Bullish): Indicates the dominant trend is up, suggesting dynamic support for price action.
Red Cloud (Bearish): Indicates the dominant trend is down, suggesting dynamic resistance.
The thickness and slope of the cloud are key indicators of trend strength.
MA Crossover Signal (Blue/Purple):
Buy Signal: When the faster Purple MA (P6=10) crosses above the slower Blue MA (P5=50).
Sell Signal: When the faster Purple MA (P6=10) crosses below the slower Blue MA (P5=50).
Price Action & Confirmation:
The most powerful signals occur when a MA Crossover is confirmed by price breaking out of the cloud in the same direction.
Price above the cloud and MA crossover to the upside suggests a strong buy entry.
Disclaimer: This tool is intended for analysis and decision-making support. It is not financial advice. Always use stop-loss orders and manage your risk accordingly. مؤشر

استراتيجية

DayFlow VWAP Relay Forex Majors StrategySummary in one paragraph
DayFlow VWAP Relay is a day-trading strategy for major FX pairs on intraday timeframes, demonstrated on EURUSD 15 minutes. It waits for alignment between a daily anchored VWAP regime check, residual percentiles, and lower-timeframe micro flow before suggesting trades. The originality is the fusion of daily VWAP residual percentiles with a live micro-flow score from 1 minute data to switch between fade and breakout behavior inside the same session. Add it to a clean chart and use the markers and alerts.
Scope and intent
• Markets: Major FX pairs such as EURUSD, GBPUSD, USDJPY, AUDUSD, USDCHF, USDCAD
• Timeframes: One minute to one hour
• Default demo in this publication: EURUSD on 15 minutes
• Purpose: Reduce false starts by acting only when context, location and micro flow agree
• Limits: This is a strategy. Orders are simulated on standard candles only
Originality and usefulness
• Core novelty: Residual percentiles to daily anchored VWAP decide “balanced versus expanding day”. A separate 1 minute micro-flow score confirms direction, so the same model fades extremes in balance and rides range breaks in expansion
• Failure modes addressed: Chop fakeouts and unconfirmed breakouts are filtered by the expansion gate and micro-flow threshold
• Testability: Every input is exposed. Bands, background regime color, and markers show why a suggestion appears
• Portable yardstick: Stops and targets are ATR multiples converted to ticks, which transfer across symbols
• Open source status: No reused third-party code that requires attribution
Method overview in plain language
The day is anchored with a VWAP that updates from the daily session start. Price minus VWAP is the residual. Percentiles of that residual measured over a rolling window define location extremes for the current day. A regime score compares residual volatility to price volatility. When expansion is low, the day is treated as balanced and the model fades residual extremes if 1 minute micro flow points back to VWAP. When expansion is high, the model trades breakouts outside the VWAP bands if slope and micro flow agree with the move.
Base measures
• Range basis: True Range smoothed by ATR for stops and targets, length 14
• Return basis: Not required for signals; residuals are absolute price distance to VWAP
Components
• Daily Anchor VWAP Bands. VWAP with standard-deviation bands. Slope sign is used for trend confirmation on breakouts
• Residual Percentiles. Rolling percentiles of close minus VWAP over Signal length. Identify location extremes inside the day
• Expansion Ratio. Standard deviation of residuals divided by standard deviation of price over Signal length. Classifies balanced versus expanding day
• Micro Flow. Net up minus down closes from 1 minute data across a short span, normalized to −1..+1. Confirms direction and avoids fades against pressure
• Session Window optional. Restricts trading to your configured hours to avoid thin periods
• Cooldown optional. Bars to wait after a position closes to prevent immediate re-entry
Fusion rule
Gating rather than weighting. First choose regime by Expansion Ratio versus the Expansion gate. Inside each regime all listed conditions must be true: location test plus micro-flow threshold plus session window plus cooldown. Breakouts also require VWAP slope alignment.
Signal rule
• Long suggestion on balanced day: residual at or below the lower percentile and micro flow positive above the gate while inside session and cooldown is satisfied
• Short suggestion on balanced day: residual at or above the upper percentile and micro flow negative below the gate while inside session and cooldown is satisfied
• Long suggestion on expanding day: close above the upper VWAP band, VWAP slope positive, micro flow positive, session and cooldown satisfied
• Short suggestion on expanding day: close below the lower VWAP band, VWAP slope negative, micro flow negative, session and cooldown satisfied
• Positions flip on opposite suggestions or exit by brackets
What you will see on the chart
• Markers on suggestion bars: L for long, S for short
• Exit occurs on reverse signal or when a bracket order is filled
• Reference lines: daily anchored VWAP with upper and lower bands
• Optional background: teal for balanced day, orange for expanding day
Inputs with guidance
Setup
• Signal length. Residual and regime window. Typical 40 to 100. Higher smooths, lower reacts faster
Micro Flow
• Micro TF. Lower timeframe used for micro flow, default 1 minute
• Micro span bars. Count of lower-TF bars. Typical 5 to 20
• Micro flow gate 0..1. Minimum absolute flow. Raising it demands stronger confirmation and reduces trade count
VWAP Bands
• VWAP stdev multiplier. Band width. Typical 0.8 to 1.6. Wider bands reduce breakout frequency and increase fade distance
• Expansion gate 0..3. Threshold to switch from fades to breakouts. Raising it favors fades, lowering it favors breakouts
Sessions
• Use session filter. Enable to trade only inside your window
• Trade window UTC. Default 07:00 to 17:00
Risk
• ATR length. Stop and target basis. Typical 10 to 21
• Stop ATR x. Initial stop distance in ATR multiples
• Target ATR x. Profit target distance in ATR multiples
• Cooldown bars after close. Wait bars before a new entry
• Side. Both, long only, or short only
View
• Show VWAP and bands
• Color bars by residual regime
Properties visible in this publication
• Initial capital 10000
• Base currency Default
• request.security uses lookahead off everywhere
• Strategy: Percent of equity with value 3. Pyramiding 0. Commission cash per order 0.0001 USD. Slippage 3 ticks. Process orders on close ON. Bar magnifier ON. Recalculate after order is filled OFF. Calc on every tick OFF. Using standard OHLC fills ON.
Realism and responsible publication
No performance claims. Past results never guarantee future outcomes. Fills and slippage vary by venue. Shapes can move while a bar forms and settle on close. Strategies must run on standard candles for signals and orders.
Honest limitations and failure modes
High impact news, session opens, and thin liquidity can invalidate assumptions. Very quiet days can reduce contrast between residuals and price volatility. Session windows use the chart exchange time. If both stop and target are touched within a single bar, TradingView’s standard OHLC price-movement model decides the outcome.
Expect different behavior on illiquid pairs or during holidays. The model is sensitive to session definitions and feed time. Past results never guarantee future outcomes.
Legal
Education and research only. Not investment advice. You are responsible for your decisions. Test on historical data and in simulation before any live use. Use realistic costs.
استراتيجية

Hyper SAR Reactor Trend StrategyHyperSAR Reactor Adaptive PSAR Strategy
Summary
Adaptive Parabolic SAR strategy for liquid stocks, ETFs, futures, and crypto across intraday to daily timeframes. It acts only when an adaptive trail flips and confirmation gates agree. Originality comes from a logistic boost of the SAR acceleration using drift versus ATR, plus ATR hysteresis, inertia on the trail, and a bear-only gate for shorts. Add to a clean chart and run on bar close for conservative alerts.
Scope and intent
• Markets: large cap equities and ETFs, index futures, major FX, liquid crypto
• Timeframes: one minute to daily
• Default demo: BTC on 60 minute
• Purpose: faster yet calmer PSAR that resists chop and improves short discipline
• Limits: this is a strategy that places simulated orders on standard candles
Originality and usefulness
• Novel fusion: PSAR AF is boosted by a logistic function of normalized drift, trail is monotone with inertia, entries use ATR buffers and optional cooldown, shorts are allowed only in a bear bias
• Addresses false flips in low volatility and weak downtrends
• All controls are exposed in Inputs for testability
• Yardstick: ATR normalizes drift so settings port across symbols
• Open source. No links. No solicitation
Method overview
Components
• Adaptive AF: base step plus boost factor times logistic strength
• Trail inertia: one sided blend that keeps the SAR monotone
• Flip hysteresis: price must clear SAR by a buffer times ATR
• Volatility gate: ATR over its mean must exceed a ratio
• Bear bias for shorts: price below EMA of length 91 with negative slope window 54
• Cooldown bars optional after any entry
• Visual SAR smoothing is cosmetic and does not drive orders
Fusion rule
Entry requires the internal flip plus all enabled gates. No weighted scores.
Signal rule
• Long when trend flips up and close is above SAR plus buffer times ATR and gates pass
• Short when trend flips down and close is below SAR minus buffer times ATR and gates pass
• Exit uses SAR as stop and optional ATR take profit per side
Inputs with guidance
Reactor Engine
• Start AF 0.02. Lower slows new trends. Higher reacts quicker
• Max AF 1. Typical 0.2 to 1. Caps acceleration
• Base step 0.04. Typical 0.01 to 0.08. Raises speed in trends
• Strength window 18. Typical 10 to 40. Drift estimation window
• ATR length 16. Typical 10 to 30. Volatility unit
• Strength gain 4.5. Typical 2 to 6. Steepness of logistic
• Strength center 0.45. Typical 0.3 to 0.8. Midpoint of logistic
• Boost factor 0.03. Typical 0.01 to 0.08. Adds to step when strength rises
• AF smoothing 0.50. Typical 0.2 to 0.7. Adds inertia to AF growth
• Trail smoothing 0.35. Typical 0.15 to 0.45. Adds inertia to the trail
• Allow Long, Allow Short toggles
Trade Filters
• Flip confirm buffer ATR 0.50. Typical 0.2 to 0.8. Raise to cut flips
• Cooldown bars after entry 0. Typical 0 to 8. Blocks re entry for N bars
• Vol gate length 30 and Vol gate ratio 1. Raise ratio to trade only in active regimes
• Gate shorts by bear regime ON. Bear bias window 54 and Bias MA length 91 tune strictness
Risk
• TP long ATR 1.0. Set to zero to disable
• TP short ATR 0.0. Set to 0.8 to 1.2 for quicker shorts
Usage recipes
Intraday trend focus
Confirm buffer 0.35 to 0.5. Cooldown 2 to 4. Vol gate ratio 1.1. Shorts gated by bear regime.
Intraday mean reversion focus
Confirm buffer 0.6 to 0.8. Cooldown 4 to 6. Lower boost factor. Leave shorts gated.
Swing continuation
Strength window 24 to 34. ATR length 20 to 30. Confirm buffer 0.4 to 0.6. Use daily or four hour charts.
Properties visible in this publication
Initial capital 10000. Base currency USD. Order size Percent of equity 3. Pyramiding 0. Commission 0.05 percent. Slippage 5 ticks. Process orders on close OFF. Bar magnifier OFF. Recalculate after order filled OFF. Calc on every tick OFF. No security calls.
Realism and responsible publication
No performance claims. Past results never guarantee future outcomes. Shapes can move while a bar forms and settle on close. Strategies execute only on standard candles.
Honest limitations and failure modes
High impact events and thin books can void assumptions. Gap heavy symbols may prefer longer ATR. Very quiet regimes can reduce contrast and invite false flips.
Open source reuse and credits
Public domain building blocks used: PSAR concept and ATR. Implementation and fusion are original. No borrowed code from other authors.
Strategy notice
Orders are simulated on standard candles. No lookahead.
Entries and exits
Long: flip up plus ATR buffer and all gates true
Short: flip down plus ATR buffer and gates true with bear bias when enabled
Exit: SAR stop per side, optional ATR take profit, optional cooldown after entry
Tie handling: stop first if both stop and target could fill in one bar
استراتيجية

TriAnchor Elastic Reversion US Market SPY and QQQ adaptedSummary in one paragraph
Mean-reversion strategy for liquid ETFs, index futures, large-cap equities, and major crypto on intraday to daily timeframes. It waits for three anchored VWAP stretches to become statistically extreme, aligns with bar-shape and breadth, and fades the move. Originality comes from fusing daily, weekly, and monthly AVWAP distances into a single ATR-normalized energy percentile, then gating with a robust Z-score and a session-safe gap filter.
Scope and intent
• Markets: SPY QQQ IWM NDX large caps liquid futures liquid crypto
• Timeframes: 5 min to 1 day
• Default demo: SPY on 60 min
• Purpose: fade stretched moves only when multi-anchor context and breadth agree
• Limits: strategy uses standard candles for signals and orders only
Originality and usefulness
• Unique fusion: tri-anchor AVWAP energy percentile plus robust Z of close plus shape-in-range gate plus breadth Z of SPY QQQ IWM
• Failure mode addressed: chasing extended moves and fading during index-wide thrusts
• Testability: each component is an input and visible in orders list via L and S tags
• Portable yardstick: distances are ATR-normalized so thresholds transfer across symbols
• Open source: method and implementation are disclosed for community review
Method overview in plain language
Base measures
• Range basis: ATR(length = atr_len) as the normalization unit
• Return basis: not used directly; we use rank statistics for stability
Components
• Tri-Anchor Energy: squared distances of price from daily, weekly, monthly AVWAPs, each divided by ATR, then summed and ranked to a percentile over base_len
• Robust Z of Close: median and MAD based Z to avoid outliers
• Shape Gate: position of close inside bar range to require capitulation for longs and exhaustion for shorts
• Breadth Gate: average robust Z of SPY QQQ IWM to avoid fading when the tape is one-sided
• Gap Shock: skip signals after large session gaps
Fusion rule
• All required gates must be true: Energy ≥ energy_trig_prc, |Robust Z| ≥ z_trig, Shape satisfied, Breadth confirmed, Gap filter clear
Signal rule
• Long: energy extreme, Z negative beyond threshold, close near bar low, breadth Z ≤ −breadth_z_ok
• Short: energy extreme, Z positive beyond threshold, close near bar high, breadth Z ≥ +breadth_z_ok
What you will see on the chart
• Standard strategy arrows for entries and exits
• Optional short-side brackets: ATR stop and ATR take profit if enabled
Inputs with guidance
Setup
• Base length: window for percentile ranks and medians. Typical 40 to 80. Longer smooths, shorter reacts.
• ATR length: normalization unit. Typical 10 to 20. Higher reduces noise.
• VWAP band stdev: volatility bands for anchors. Typical 2.0 to 4.0.
• Robust Z window: 40 to 100. Larger for stability.
• Robust Z entry magnitude: 1.2 to 2.2. Higher means stronger extremes only.
• Energy percentile trigger: 90 to 99.5. Higher limits signals to rare stretches.
• Bar close in range gate long: 0.05 to 0.25. Larger requires deeper capitulation for longs.
Regime and Breadth
• Use breadth gate: on when trading indices or broad ETFs.
• Breadth Z confirm magnitude: 0.8 to 1.8. Higher avoids fighting thrusts.
• Gap shock percent: 1.0 to 5.0. Larger allows more gaps to trade.
Risk — Short only
• Enable short SL TP: on to bracket shorts.
• Short ATR stop mult: 1.0 to 3.0.
• Short ATR take profit mult: 1.0 to 6.0.
Properties visible in this publication
• Initial capital: 25000USD
• Default order size: Percent of total equity 3%
• Pyramiding: 0
• Commission: 0.03 percent
• Slippage: 5 ticks
• Process orders on close: OFF
• Bar magnifier: OFF
• Recalculate after order is filled: OFF
• Calc on every tick: OFF
• request.security lookahead off where used
Realism and responsible publication
• No performance claims. Past results never guarantee future outcomes
• Fills and slippage vary by venue
• Shapes can move during bar formation and settle on close
• Standard candles only for strategies
Honest limitations and failure modes
• Economic releases or very thin liquidity can overwhelm mean-reversion logic
• Heavy gap regimes may require larger gap filter or TR-based tuning
• Very quiet regimes reduce signal contrast; extend windows or raise thresholds
Open source reuse and credits
• None
Strategy notice
Orders are simulated by TradingView on standard candles. request.security uses lookahead off where applicable. Non-standard charts are not supported for execution.
Entries and exits
• Entry logic: as in Signal rule above
• Exit logic: short side optional ATR stop and ATR take profit via brackets; long side closes on opposite setup
• Risk model: ATR-based brackets on shorts when enabled
• Tie handling: stop first when both could be touched inside one bar
Dataset and sample size
• Test across your visible history. For robust inference prefer 100 plus trades. استراتيجية
