OPEN-SOURCE SCRIPT
Undertow Backtest

STRATEGY — UNDERTOW BACKTEST [UNDR BT]

SHORT SUMMARY
The backtest engine for Undertow. Simulate the buy/sell dots across any asset and timeframe, and choose whether to trade only the strong signals or every crossover.
WHAT IT IS
Undertow Backtest is the strategy version of the Undertow indicator. It applies Undertow's buy and sell logic to historical data and reports how a simple long-only approach would have performed — net profit, win rate, drawdown, and a full trade list — in TradingView's Strategy Tester.
HOW IT WORKS
— Entry (long): on an Undertow buy signal
— Exit: on an Undertow sell signal
— You independently choose, via dropdowns, whether buys fire on strong dots only (crosses beyond the oversold bound) or on all dots (every upward cross), and likewise for sells.
This lets you compare four behaviors: patient (strong/strong), active (all/all), aggressive long-bias (all buys / strong sells), and defensive (strong buys / all sells).
SETTINGS
— All the same WaveTrend and threshold inputs as the indicator
— Buy On: Strong dots only / All dots
— Sell On: Strong dots only / All dots
— Default starting capital, position sizing, and commission are set in the strategy properties and can be edited
IMPORTANT LIMITATIONS — PLEASE READ
— The backtest fills orders at bar close and does NOT model slippage; real-world results would typically be worse.
— It is long-only and goes effectively all-in per signal by default; this is a simplification, not a recommended position-sizing method.
— Higher timeframes (weekly, monthly) produce few trades, which is too small a sample to draw firm conclusions from. Test across multiple assets and timeframes.
— Optimizing the settings until the backtest looks great ("curve fitting") usually produces results that fall apart on live data. Prefer settings that are robust across many markets over ones that are perfect on one.
CREDITS & BASIS
Based on the open-source WaveTrend Oscillator concept (LazyBear) plus a standard RSI. Published open-source.
DISCLAIMER
For educational purposes only. Not financial advice. Backtested performance is hypothetical and does not represent actual trading. No system guarantees future profits. Trade at your own risk and never risk more than you can afford to lose.
SHORT SUMMARY
The backtest engine for Undertow. Simulate the buy/sell dots across any asset and timeframe, and choose whether to trade only the strong signals or every crossover.
WHAT IT IS
Undertow Backtest is the strategy version of the Undertow indicator. It applies Undertow's buy and sell logic to historical data and reports how a simple long-only approach would have performed — net profit, win rate, drawdown, and a full trade list — in TradingView's Strategy Tester.
HOW IT WORKS
— Entry (long): on an Undertow buy signal
— Exit: on an Undertow sell signal
— You independently choose, via dropdowns, whether buys fire on strong dots only (crosses beyond the oversold bound) or on all dots (every upward cross), and likewise for sells.
This lets you compare four behaviors: patient (strong/strong), active (all/all), aggressive long-bias (all buys / strong sells), and defensive (strong buys / all sells).
SETTINGS
— All the same WaveTrend and threshold inputs as the indicator
— Buy On: Strong dots only / All dots
— Sell On: Strong dots only / All dots
— Default starting capital, position sizing, and commission are set in the strategy properties and can be edited
IMPORTANT LIMITATIONS — PLEASE READ
— The backtest fills orders at bar close and does NOT model slippage; real-world results would typically be worse.
— It is long-only and goes effectively all-in per signal by default; this is a simplification, not a recommended position-sizing method.
— Higher timeframes (weekly, monthly) produce few trades, which is too small a sample to draw firm conclusions from. Test across multiple assets and timeframes.
— Optimizing the settings until the backtest looks great ("curve fitting") usually produces results that fall apart on live data. Prefer settings that are robust across many markets over ones that are perfect on one.
CREDITS & BASIS
Based on the open-source WaveTrend Oscillator concept (LazyBear) plus a standard RSI. Published open-source.
DISCLAIMER
For educational purposes only. Not financial advice. Backtested performance is hypothetical and does not represent actual trading. No system guarantees future profits. Trade at your own risk and never risk more than you can afford to lose.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.