PROTECTED SOURCE SCRIPT
Diupdate RaVen V2.1

Designed for Polymarket: Deeply adapted to the trading rules and rhythm of the Polymarket 15-minute crypto market.
Catatan Rilis
本次核心升级:强制以自定义开盘价为准 — 只要您在设置中输入了开盘价(> 0),脚本就会自动使用它判断信号方向,无需再勾选"启用自定义开盘价"开关。这样可以避免您忘记勾选开关导致信号方向错误。
版本号更新为 V2.2 — 面板标题和脚本名称都已更新。
===================================================================================
RaVen V2.2 Release Notes
Core Upgrade
1. Force Signal Direction Based on Custom Open Price 🎯
Background:
In V2.1 and earlier versions, the logic for determining signal direction was:
•
If the "Enable Custom Open Price" switch was on → Use custom open price.
•
If the switch was off → Use the open price automatically detected by TradingView.
This could lead to users forgetting to check the switch, causing the entered open price to not take effect.
V2.2 Improvement:
Plain Text
Priority: Custom Open Price > TV Auto Open Price
As long as custom_open_price > 0, it is forcibly used to determine the signal direction.
Actual Effect:
•
After entering the Polymarket open price in the settings, you no longer need to check the "Enable Custom Open Price" switch.
•
The script will automatically detect: if open price > 0 → use custom open price; if open price = 0 → use TV open price.
•
The signal direction (UP/DOWN) is strictly based on the comparison between the custom open price and the current price.
Inherited Core Features (from V2.1)
Anti-Flicker Mechanism ✅
•
Ironclad Lock-in: Signals are only triggered after the K-line is confirmed (closed), eliminating false signals that "flash for a moment."
•
Tri-State Display: Waiting → Pre-trigger (Yellow) → Confirmed Lock-in (Green/Red).
•
Pre-trigger Countdown: Displays the remaining seconds until the K-line is confirmed on unconfirmed K-lines.
New Round Auto-Reset Protection 🛡️
•
confirm_history Reset: Automatically clears the confirmation history from the previous round at the start of a new round to prevent cross-round contamination.
•
Stale Open Price Detection: Automatically identifies if you are using an old open price from the previous round and displays a red warning on the panel.
Signal Window Correction ⏰
•
Correct Meaning of "1s-8min": The signal is allowed only when the remaining time is between 1 second and 8 minutes (i.e., the last 8 minutes of a 15-minute round).
•
This avoids triggering signals too early in the round, waiting for the market to stabilize before generating a signal.
Usage Recommendations
Recommended Settings (Polymarket 15-Minute Round)
Setting
Recommended Value
Description
Strategy Mode
Polymarket
A balanced mode optimized for Polymarket.
Chart Timeframe
30 seconds
Requires a TradingView Premium membership.
Signal Window
1s-8min
Signals are triggered within the last 8 minutes.
Polymarket Open Price
Manual Input
Enter the actual open price at the start of each round.
Force Open Price Input
Enabled
Prevents incorrect signals due to forgetting to enter the open price.
Live Trading Workflow
1.New Round Starts → The panel automatically turns red, displaying "Stale Open Price."
2.Check Open Price on Polymarket → Enter the new price in the settings → Click OK.
3.Panel Returns to Normal Blue → Wait for the signal window (last 8 minutes).
4.Pre-trigger State (Yellow) → Displays "⏳ Confirming" and a countdown. No action needed.
5.Confirmed Lock-in (Green/Red) → Displays "💎 Locked-in." Execute the trade immediately.
Known Issues & Fix Log
Version
Issue
Fix
V2.2
Signal direction was not strictly based on custom open price.
Forcibly prioritized the use of custom open price.
V2.1
Signals were locking in at 0.5-1.5 minutes into a new round.
confirm_history is now cleared at the start of a new round.
V2.1
Signals flashed momentarily, causing confusion.
Implemented "Ironclad Lock-in" with barstate.isconfirmed protection.
V2.1
Signal window logic was confusing.
Changed judgment to be based on remaining time.
Next Optimization Directions (Pending User Feedback)
Comprehensive visual beautification: color schemes, fonts, layout optimization.
More customization options: allow users to customize panel color themes.
Performance optimization: reduce unnecessary calculations to improve runtime efficiency.
Please feel free to provide any feedback or suggestions!
Catatan Rilis
本次修复汇总:时间段标签时区修复 — 从 UTC 改为用户可配置时区(默认 UTC-5),与 Polymarket 完全对齐
移除 calc_on_every_tick — 该参数仅适用于 strategy(),indicator() 不支持
头部注释更新 — 标注为 Final 版本,补充时区特性说明,本次更新是针对新的5分钟市场,推荐使用15秒K线图和1秒-3分钟出信号
=====================================================
Summary of this fix:
Time period label timezone fix: Changed from UTC to a user-configurable timezone (defaulting to UTC-5) to fully align with Polymarket.
Removed calc_on_every_tick: This parameter is only applicable to strategy() and is not supported by indicator().
Header comment update: Marked as the Final version, added notes about the timezone feature. This update targets the new 5-minute markets, and it is recommended to use a 15-second candlestick chart with signal generation between 1 second and 3 minutes.
Catatan Rilis
fix time syncSkrip terproteksi
Skrip ini diterbitkan sebagai sumber tertutup. Namun, Anda dapat menggunakannya dengan bebas dan tanpa batasan apa pun – pelajari lebih lanjut di sini.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip terproteksi
Skrip ini diterbitkan sebagai sumber tertutup. Namun, Anda dapat menggunakannya dengan bebas dan tanpa batasan apa pun – pelajari lebih lanjut di sini.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.