OPEN-SOURCE SCRIPT
Telah dikemas kini

Rebound V-Fib

579
Rebound V-Fib
Detects rebound setups from a downtrend using slanted Fibonacci levels that tilt along the uptrend slope. The current price position within the band is output as a V-Fib Ratio - ideal for filtering with the Pine Screener.
Designed for US equities on intraday or daily timeframes. Default parameters assume a 6.5-hour trading day; adjust 'Trading hours per day' for other markets.
Note: the built-in back-test is a simplified simulation based on end-of-bar closes with fixed capital allocation. It does not account for slippage, commissions, liquidity, or compounding, and should be used for reference only.

OUTPUTS

Overlay (price chart):
  • Slanted Fibonacci lines - tilted Fib levels projected from the detected trend structure
  • V-Fib Ratio label - current ratio displayed on the last bar
  • Green background - price is within the entry window (defined by 'Max / Min entry V-Fib ratio')
  • Red background - exit signal triggered (uptrend rate fell below 'Min uptrend rate')


Sub-pane:
  • Capital - equity curve from the back-test start date
  • Capital floor - lowest equity level reached during open trades
  • Capital gain/day - average daily gain over all closed trades


Screener:
  • V-Fib Ratio - position within the Fib band
  • Leading Days - how many days the price leads or lags the uptrend baseline
  • Capital - current equity value
  • Capital floor - lowest equity level reached during open trades
  • Capital gain/day - average daily gain over all closed trades


INPUTS
  • Lookback days - historical window used for trend detection
  • Trading hours per day - used to convert days into bars (intraday charts)
  • Min downtrend days - minimum length of the prior downtrend
  • Min uptrend days - minimum length of the current uptrend
  • Min uptrend rate - uptrend must exceed this rate (%/day); otherwise exit
  • Max downtrend rate - maximum acceptable downtrend slope (%/day)
  • Max / Min entry V-Fib ratio - entry window within the Fib band (default 0.786 / 0.50)
  • Start capital - initial capital for the back-test
  • Risk ratio - fraction of capital risked per trade
  • Start date - back-test start date (year / month / day)


DISCLAIMER
This script is provided "AS IS" without warranty of any kind. It is for informational purposes only and does not constitute financial advice. Past performance is not indicative of future results. The author is not liable for any losses arising from the use of this script. Trade at your own risk.
Nota Keluaran
CHANGES IN v1.1

- Added screener columns for multi-timeframe filtering
- Added trailing stop exit and on-chart entry/exit labels with P/L
- Added Min V-Trend entry condition to filter out dominant downtrend pressure
Nota Keluaran
v1.2
  • Improve entry and trailing stop accuracy by verifying with lower-timeframe bars
  • Fix uptrend slope calculation to include all bars from bottom
  • Show screener columns in Data Window
Nota Keluaran
v1.2.1
  • Fix example chart.
Nota Keluaran
v1.3.0
  • Added support-line detection and support-based entry logic with adaptive trailing stops and gap filtering via the new trail_gap_limit setting.
  • Refactored entry handling and chart labeling, introducing reusable helpers plus enhanced visualizations for support lines, trailing guides, and entry labels.
Nota Keluaran
v1.3.1
  • Improved support-line performance with last-bar-only support calculation by default, faster candidate validation, and accelerated-support filtering.
  • Added Enable backtest and Backtest bars settings so backtest processing and Capital/Risk/Gain/d plots are limited to the selected recent range.
  • Hardened chart drawing against TradingView's future bar drawing limit and cleaned up backtest plot visibility.
Nota Keluaran
v1.3.2
  • Show trailing stop level as a blue dotted line when holding a trend entry position
  • Fix support_rate to reflect current support price rather than the initial bottom price
  • Suppress support entry label (IF) when a trend entry signal occurs on the same bar
  • Change default of "Support last bar only" to false to show support line history for backtest visibility and avoid redundant entry signals on already-entered bars
Nota Keluaran
v1.3.3
  • Add ActiveTrail and SupportTrail values to the Data Window for easier stop-level review.
  • Align the orange support trail guide with the raw SupTrail-based stop level.
  • Simplify support entry trail handling and remove redundant trend trail state.

Nota Keluaran
v1.3.4
  • Fixed V-Fib going N/A when downtrend top and bottom are detected at the same bar.
Nota Keluaran
v1.3.5
  • Added SupAge screener column showing how many days the current support line has been active, to help assess support maturity.
Nota Keluaran
v1.3.6
  • Stabilized support detection by excluding the unconfirmed current bar from candidate validation.

Nota Keluaran
v1.4.0
  • Support entries require a pullback-and-rebound on V-Fib and fire at the intraday price.
  • Wide trail gaps are capped (not rejected); Max trend trail / Max support trail.
  • Trend/support entry logic decoupled, and V-shape geometry no longer changes with Enable backtest.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.